-
Notifications
You must be signed in to change notification settings - Fork 24.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
Regression on 0.55.0 crash: WebSocketModule.close got 1 arguments, expected 3 #18696
Comments
Thanks for posting this! It looks like your issue may refer to an older version of React Native. Can you reproduce the issue on the latest release, v0.54? Thank you for your contributions. |
same problem |
This commit probably breaks it: b9be289
|
In my code I use
|
@kelset could you maybe remove the Also, I have made the repro steps more clear. I think this is all it takes to reproduce. If you agree, could you remove |
If I just remove the call to I don't see this as a stable workaround though. There used to be a bug (crash) with the websocket module trying to send a message over a websocket connection that did not exist any more. This happened despite closing the connection in js and it's supposed to be fixed, but the websocket connection should still be properly closed before doing anything else. |
b9be289 is definitely causing this issue, since Since this really is a severe bug, causing the entire app to crash and not to respond whenever one tries to close a websocket connection, I hope someone from the react-native team is going to revert the referenced commit and publish |
Summary: This reverts commit b9be289. Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. <!-- Required: Write your motivation here. If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged. --> Fix facebook#18696 <!-- Required: Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! --> Run Jest tests. Run WebSocket example from RNTester on Android. <!-- Does this PR require a documentation change? Create a PR at https://github.com/facebook/react-native-website and add a link to it here. --> <!-- Required. Help reviewers and the release process by writing your own release notes. See below for an example. --> [CATEGORY] [TYPE] [LOCATION] - Message <!-- **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [ {Component} ] [ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [ANDROID][BUGFIX][WebSocketModule] - revert change that regresses WebSocketModule Closes facebook#18733 Differential Revision: D7548850 Pulled By: hramos fbshipit-source-id: b8c79810c1cd6e5a30ec4118bd5ff8ad719f04b9
Summary: This reverts commit b9be289. Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. <!-- Required: Write your motivation here. If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged. --> Fix facebook#18696 <!-- Required: Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! --> Run Jest tests. Run WebSocket example from RNTester on Android. <!-- Does this PR require a documentation change? Create a PR at https://github.com/facebook/react-native-website and add a link to it here. --> <!-- Required. Help reviewers and the release process by writing your own release notes. See below for an example. --> [CATEGORY] [TYPE] [LOCATION] - Message <!-- **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [ {Component} ] [ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [ANDROID][BUGFIX][WebSocketModule] - revert change that regresses WebSocketModule Closes facebook#18733 Differential Revision: D7548850 Pulled By: hramos fbshipit-source-id: b8c79810c1cd6e5a30ec4118bd5ff8ad719f04b9
Summary: This reverts commit b9be289. Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. <!-- Required: Write your motivation here. If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged. --> Fix facebook#18696 <!-- Required: Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! --> Run Jest tests. Run WebSocket example from RNTester on Android. <!-- Does this PR require a documentation change? Create a PR at https://github.com/facebook/react-native-website and add a link to it here. --> <!-- Required. Help reviewers and the release process by writing your own release notes. See below for an example. --> [CATEGORY] [TYPE] [LOCATION] - Message <!-- **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [ {Component} ] [ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [ANDROID][BUGFIX][WebSocketModule] - revert change that regresses WebSocketModule Closes facebook#18733 Differential Revision: D7548850 Pulled By: hramos fbshipit-source-id: b8c79810c1cd6e5a30ec4118bd5ff8ad719f04b9
This is still an issue on RN-0.55.2. This is a very serious issue! Why was this closed? |
@ujwal-setlur The fix is merged to master and a request was put in to cherry-pick it for RN 0.55.3. |
Thanks @rozele! |
@rozele do we have the release date of 0.55.3? We faced the same issue and this fix is critical for our application. |
While we wait, i have a postinstall script to download the patch and apply it. |
@ujwal-setlur any reference to this script is appreciated. |
Please release v0.55.3 to fixed this |
@vahanNasibyan, this is what I did: In your package.json file, declare the postinstall script:
In a scripts folder in root directory, I have a script
Delete your node_modules and reinstall them with |
@ujwal-setlur i'm working on Window, please help me! |
Summary: This reverts commit b9be289. Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. <!-- Required: Write your motivation here. If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged. --> Fix #18696 <!-- Required: Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! --> Run Jest tests. Run WebSocket example from RNTester on Android. <!-- Does this PR require a documentation change? Create a PR at https://github.com/facebook/react-native-website and add a link to it here. --> <!-- Required. Help reviewers and the release process by writing your own release notes. See below for an example. --> [CATEGORY] [TYPE] [LOCATION] - Message <!-- **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [ {Component} ] [ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [ANDROID][BUGFIX][WebSocketModule] - revert change that regresses WebSocketModule Closes #18733 Differential Revision: D7548850 Pulled By: hramos fbshipit-source-id: b8c79810c1cd6e5a30ec4118bd5ff8ad719f04b9
I just installed the current latest version |
Summary: This reverts commit b9be289. Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. <!-- Required: Write your motivation here. If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged. --> Fix facebook#18696 <!-- Required: Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! --> Run Jest tests. Run WebSocket example from RNTester on Android. <!-- Does this PR require a documentation change? Create a PR at https://github.com/facebook/react-native-website and add a link to it here. --> <!-- Required. Help reviewers and the release process by writing your own release notes. See below for an example. --> [CATEGORY] [TYPE] [LOCATION] - Message <!-- **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [ {Component} ] [ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [ANDROID][BUGFIX][WebSocketModule] - revert change that regresses WebSocketModule Closes facebook#18733 Differential Revision: D7548850 Pulled By: hramos fbshipit-source-id: b8c79810c1cd6e5a30ec4118bd5ff8ad719f04b9
Summary: This reverts commit b9be289. Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. <!-- Required: Write your motivation here. If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged. --> Fix facebook#18696 <!-- Required: Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! --> Run Jest tests. Run WebSocket example from RNTester on Android. <!-- Does this PR require a documentation change? Create a PR at https://github.com/facebook/react-native-website and add a link to it here. --> <!-- Required. Help reviewers and the release process by writing your own release notes. See below for an example. --> [CATEGORY] [TYPE] [LOCATION] - Message <!-- **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [ {Component} ] [ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [ANDROID][BUGFIX][WebSocketModule] - revert change that regresses WebSocketModule Closes facebook#18733 Differential Revision: D7548850 Pulled By: hramos fbshipit-source-id: b8c79810c1cd6e5a30ec4118bd5ff8ad719f04b9
I'm still experiencing WebSocketModule.close got 1 arguments, expected 3 on React native version 0.55.4. Using expo sdk 28.0.1. Anyone else having this issue? |
For those using expo. If anyone one else is having this issue, I resolved it by rm -rf node_modules and then running exp publish afterwards. It seems that exp still had version 28.0.0 cached from the node_modules |
@wrightmk I don't think a Also expo requires you to publish with dependencies installed. So
I tried setting my dependencies to:
But still getting this error, what does your package.json look like @wrightmk ? EDIT I can get past this bug temporarily by knocking down to these versions (Not ideal but until 29 comes out this could unblock you)
|
Closing a websocket crashes the app
Environment
Steps to Reproduce
Expected Behavior
the websocket connection closes, no error
Actual Behavior
Logcat:
related:
#18623
The text was updated successfully, but these errors were encountered: