Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case Sensitivity Issue with 'audioHostUrl' #2992

Open
4 tasks done
svatkowski opened this issue Nov 6, 2024 · 1 comment
Open
4 tasks done

Case Sensitivity Issue with 'audioHostUrl' #2992

svatkowski opened this issue Nov 6, 2024 · 1 comment

Comments

@svatkowski
Copy link

svatkowski commented Nov 6, 2024

What happened and what did you expect to happen?

When using the Amazon Chime SDK (amazon-chime-sdk-jsv. 3.25.0) in an Electron app (MacOS ARM64), there is an issue with accessing the AudioHostUrlproperty. The SDK appears to expect the audioHostUrl property with a lowercase "a", while the server response provides AudioHostUrl with an uppercase "A", resulting in a TypeError: Cannot read properties of null (reading 'audioHostUrl'). when using object.audioVideo.start()

Environment:

  • Client-Side Library: amazon-chime-sdk-js version 3.25.0
  • Server-Side Library: aws-sdk version 2.1691.0
  • Client Platform: Electron app on macOS (ARM64)
  • Browser Engine: Chromium

Expected Behavior:

The SDK should access the AudioHostUrl property in a case-insensitive manner or support AudioHostUrl in its current form without requiring transformations on the client side.

Actual Behavior:

The SDK throws an error: TypeError: Cannot read properties of null (reading 'audioHostUrl'), because it expects audioHostUrlwith a lowercase "a", while the server response includes AudioHostUrlwith an uppercase "A".

Additional Context: As a workaround, I tried normalizing the keys on the client side, but this adds extra complexity and processing overhead.

Have you reviewed our existing documentation?

Reproduction steps

  • Set up a meeting session using Amazon Chime SDK (Electron app in my case).
  • Invoke an API call from the client that retrieves meeting configuration data from a server, which uses aws-sdk to create a Chime meeting.
  • The server responds with meeting details, including AudioHostUrl (capitalized).
  • The client code tries to access object.MediaPlacement.audioHostUrl (lowercase) based on the SDK's requirements.

Amazon Chime SDK for JavaScript version

amazon-chime-sdk-js version 3.25.0

What browsers are you seeing the problem on?

Chromium

Browser version

//

Meeting and Attendee ID Information.

//

Browser console logs

MyLogger - start failed: TypeError: Cannot read properties of null (reading 'audioHostURL')

@ltrung
Copy link
Contributor

ltrung commented Nov 12, 2024

We convert the response to lowercase here https://github.com/aws/amazon-chime-sdk-js/blob/main/src/meetingsession/MeetingSessionConfiguration.ts#L174 so it should support both lower and uppercase.
Could you try to manually run this function on your server response to see if it does not convert all the properties to lowercase?
https://github.com/aws/amazon-chime-sdk-js/blob/main/src/utils/Utils.ts#L26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants