-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Fix crash on certain versions of Tizen and Samsung Internet #11148
base: dev
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 8d9ec2a The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@tacheometry This issue is getting more attention since the jellyfin 10.9.x release. Is there any way you can fix the CI issue, repush and notify the maintainer ? |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
Should be good to go @CLEMENTINATOR |
Regarding getting more attention on this, engagement from affected users might help |
In that case I'll just mention that I am affected by this as well. |
webOS 4 (at least the emulator) has the same bug. |
Issue description
A friend was having issues with Jellyfin on his Samsung Smart TV. Running the program, the following stack trace displayed:
It reads out:
TypeError: Failed to construct 'Headers': No matching constructor signature.
Tracking this down, it is due to some
react-router
code. Turns out, this is due to a bug in Samsung's JavaScript implementation.new Headers(undefined)
should be a valid constructor, but running this on Samsung, this errors. I suggested updating the browser, but this was not possible, as the version was locked.Fix
Thus, like in other projects I've seen, I've implemented the fix of running the constructor with no parameters (
new Headers()
) instead ofundefined
ornull
().new Headers(undefined)
This is inspired from the following work:
new Headers(undefined)
throw? whatwg/fetch#185These changes increase compatibility, making it possible to run
react-router
on older browser implementations, and introduce no breaking changes.After building using this fork of React Router, the program was no longer crashing on my friend's Tizen system.