-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
RN is unable to communicate with metro bundler when targetSdkVersion 28 #22024
Comments
I suspect |
Ah, it sounds likely that is the issue. I just tried whitelisting metro, but I don't think my config is quite right because I still can't reload my bundle. Here is my config
The |
Just to add to @luisnaranjo733 's answer, I managed to get the app to connect to the bundler by adding the security config as such to
And then adding these config to
|
I also had to add.. (on 0.55.3)
|
Works for me as well:
Generally it's a good idea to put this config to a separate debug resource, so it won't land in production... @hramos Could you point this out in the official documentation? I don't see a better solution for now 😄 |
@tobi512 can you send a PR to https://github.com/facebook/react-native-website? |
I can confirm that @kronosfere answer works (react-native version = "0.57.5"). Thank you! |
This should work in 0.59 (or 0.60 coming soon). |
Environment
React Native Environment Info:
System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 32.63 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 9.11.1 - ~/.nvm/versions/node/v9.11.1/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 5.6.0 - ~/.nvm/versions/node/v9.11.1/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.2, macOS 10.13, tvOS 11.2, watchOS 4.2
Android SDK:
Build Tools: 23.0.1, 23.0.2, 23.0.3, 25.0.2, 26.0.1, 26.0.2, 27.0.1, 27.0.3, 28.0.3
API Levels: 23, 24, 25, 26, 27, 28
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 9.2/9C40b - /usr/bin/xcodebuild
npmPackages:
@types/react: ^16.4.7 => 16.4.7
@types/react-native: ^0.57.5 => 0.57.5
react: 16.5.1 => 16.5.1
react-native: 0.57 => 0.57.2
✨ Done in 5.26s.
Description
When running a RN app with targetSdkVersion 28 on Android Pie, the app is unable to communicate with metro bundler. If you type the expected url and port into the browser, you can see some stuff about metro bundler appear, so I don't think it is a proxy issue.
When I revert targetSdkVersion to 27, the issue does not reproduce. It seems likely that this is related to one of these Pie changes for apps that target 28.
Reproducible Demo
Set targetSdkVersion to 28 and run the app on Android Pie. Observe that the app won't be able to load the bundle from metro bundler.
The text was updated successfully, but these errors were encountered: