-
Notifications
You must be signed in to change notification settings - Fork 958
Flipper 0.126 crashing metro #3189
Comments
This should be fixable by changing I'll try to submit a PR for that when back from PTO, or feel free to submit a PR already at https://github.com/react-native-community/cli/blob/master/packages/cli-server-api/src/websocket/eventsSocketServer.ts#L129. You can solve the issue locally by using |
Faced with this issue too, downgrading Flipper to 0.125 will fix it |
ye i downgrade too |
@davydspotnana @artstylee how did you downgrade a flipper? I mean, how can I downgrade the desktop app? |
the same issue on Mac
downgrade here: https://github.com/facebook/flipper/releases |
@sytolk thank you! |
@mweststrate I have been able to test your fix and it works. I can make a PR, but I am not sure this is the best issue as this check is here for security reasons, and allowing empty origins could be an issue. |
Thanks @mweststrate ! Your solution works for me |
+1 |
Fixes per work around: facebook/flipper#3189 (comment). The same fix has been applied to FB infra, and the next release will temporarily set an `origin` header as work around for existing RN versions. Fixes: * facebook/flipper#2870 * facebook/flipper#3189 The essence of the fix is that we shouldn't check the `origin` header if it is not present. That might sound unsafe, but it actually is just a check to protect from malicious websites, and browsers ensure the origin header is set for cross site requests. For websocket connections created outside a browser context, the creator has full control over the origin header anyway, so checking it would not add any safety.
Summary: Changelog: Work-around for missing `origin` header problem #3189; causing Metro to crash when Flipper tries to connect Will follow up with separate fix in React Native itself as well Reviewed By: nikoant Differential Revision: D33276414 fbshipit-source-id: 34d1510262ac24172ac1c6660799bb755b0f1f11
Happens on MacOS with Apple Silicon as well. |
Should be fixed in Flipper 0.127 which will ship later today, and/or in the next version of RN |
* Fix metro crash when Flipper connects Fixes per work around: facebook/flipper#3189 (comment). The same fix has been applied to FB infra, and the next release will temporarily set an `origin` header as work around for existing RN versions. Fixes: * facebook/flipper#2870 * facebook/flipper#3189 The essence of the fix is that we shouldn't check the `origin` header if it is not present. That might sound unsafe, but it actually is just a check to protect from malicious websites, and browsers ensure the origin header is set for cross site requests. For websocket connections created outside a browser context, the creator has full control over the origin header anyway, so checking it would not add any safety. * Fix lint error
I'm not sure this is a duplicate of #1523 ? I downgraded to 0.125.0 then upgraded to 0.127.0 but none of them fixed my issue.
|
🐛 Bug Report
after installing flipper 0.126 my metro crashing every time with an error
Environment
WIN 10
The text was updated successfully, but these errors were encountered: