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

Unable to debug app with 'No 'Access-Control-Allow-Origin' header is present' error #545

Closed
psyanite opened this issue Jan 31, 2018 · 7 comments

Comments

@psyanite
Copy link

psyanite commented Jan 31, 2018

When I start up my Android Samsung S8+ device over wifi or Genymotion S8 emulator on the same machine to access the expo project using expo XDE, in the Chrome console, I see the following errors:

Failed to load http://192.168.1.6:19004/node_modules/expo/AppEntry.delta?platform=android&dev=true&strict=false&minify=false&hot=false&assetPlugin=G:\Projects\bt\ff\node_modules\expo\tools\hashAssetFiles: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:19004' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Uncaught (in promise) TypeError: Failed to fetch

I believe this could potentially be caused by updating sdkVersion from 24.0.0 to 25.0.0. @brentvatne Do you have any idea? Does anyone not have this issue?

I believe it could be related to this issue reported 9 days ago which seems similar to what @jugutier has:
facebook/react-native#17618

I can't debug and see what's happening on Redux 😭

Okay, I think the CORS error that @jugutier and I are experiencing is different to the original issue...

It won't let me downgrade to 24.0.0 😭 If anyone knows how I can downgrade to 24.0.0 please let me know.

A few other users have reported this issue on this thread:
#392

And also here:
expo/expo#1351

If this is an issue that is a duplicate of expo/expo#1351, please feel free to close this issue.

@quinlanj
Copy link
Member

quinlanj commented Feb 1, 2018

this is an issue that occurred upstream with react native and the fix will ship in the next Expo SDK. Sorry for the inconvenience!

@psyanite
Copy link
Author

psyanite commented Feb 1, 2018

@quinlanj Thanks!

Workarounds are provided expo/expo#1351 (comment), but not sure if they will work with mobile apps.... If anyone knows how any workarounds with the app please let me know.

@psyanite psyanite closed this as completed Feb 1, 2018
@digitalmaster
Copy link

@psyanite Worked for me! 🙏🏽

@arfa123
Copy link

arfa123 commented May 2, 2018

try to install the extension "Allow-Control-Allow-Origin" in your chrome browser, from this my problem is solved, you may try this.

@bezenson
Copy link

@arfa123 Or simply use React Native Debugger :)

@whck6
Copy link

whck6 commented Aug 30, 2018

@arfa123 you save me

@proffnick
Copy link

Allow-Control-Allow-Origin

How safe is this extension ?

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

7 participants