Skip to content

Conversation

Json031
Copy link
Contributor

@Json031 Json031 commented Mar 15, 2025

Issue #, if available:
If the phone's time format is set to a 12-hour system, the iso8601() method in KVSSigner returns a datetime string with a space, e.g., "20250315T73633 AMZ". This causes a crash at line 147 in KVSSigner, where components.percentEncodedQueryItems = queryParamsBuilderArray. This issue has been fixed.

Description of changes:
Fixed an issue in KVSSigner.iso8601() where the 12-hour time format included a space (e.g., "20250315T73633 AMZ"), causing a crash at line 147 when setting components.percentEncodedQueryItems.

Testing:

  • Unit tests pass
  • Manually tested the application with the JS test page, iOS, C SDK's - verified that we can see the media on both ends.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

If the phone's time format is set to a 12-hour system, the iso8601() method in KVSSigner returns a timestamp with a space, e.g., "20250315T73633 AMZ". This causes a crash at line 147 in KVSSigner, where components.percentEncodedQueryItems = queryParamsBuilderArray. This issue has been fixed.
@Json031
Copy link
Contributor Author

Json031 commented Mar 24, 2025

@sirknightj @niyatim23 Could you please help review this PR? At least two approving reviews from reviewers with write access are required for merging. Thanks! 😄

@sirknightj
Copy link
Contributor

Hi @Json031, thanks for the contribution. I was able to confirm the crash mentioned after changing the date format to 12 hours:

  • Settings -> General -> Date & Time -> 24-Hour Time (OFF)
date: 20250325T52015 PMZ
Foundation/URLComponents.swift:1048: Fatal error: Attempting to set percentEncodedQueryItems with invalid characters

And after your changes, it connects successfully:

date: 20250325T172405Z
"Connection to signaling success."

@sirknightj
Copy link
Contributor

Note: CI failing due to outdated configurations, can update in a future PR.

@sirknightj sirknightj requested a review from stefankiesz March 25, 2025 17:34
@sirknightj sirknightj added bug Something isn't working Crash Application or framework crash labels Mar 25, 2025
@sirknightj sirknightj merged commit 0a2460e into awslabs:master Mar 28, 2025
2 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Crash Application or framework crash

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants