Cli: Metro not bundling Android ("done", but doesn't bundle)

Created on 26 Nov 2019  路  10Comments  路  Source: react-native-community/cli

Environment

System:
    OS: macOS 10.15.1
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 150.90 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.12.0 - /usr/local/bin/node
    Yarn: 1.19.1 - /usr/local/bin/yarn
    npm: 6.13.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5791312
    Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.4 => 0.61.4
  npmGlobalPackages:
    react-native-cli: 2.0.1

Description

Since upgrading to RN 61, I haven't been able to properly open my app on Android.

When I try to run the app with react-native run-android, the Metro bundler does not launch automatically.

When I run Metro with npx react-native start --reset-cache, it runs on port 8081 and loads the dependency graph but it doesn't bundle when I attempt to run the app on the CLI. It seems to behave like this in debug and release environments.

Any insight would be greatly appreciated!

Steps I've tried

  • npx react-native start --reset-cache
  • watchman watch-del-all
  • watchman watch-del-all && rm -rf node_modules/ && npm cache clean && npm install && npm start --reset-cache
  • brew uninstall watchman && brew install watchman
  • delete node_modules, npm install clean project, rebuild project, invalidate caches / restart.
  • migrating my node_modules to AndroidX
bug report

All 10 comments

Giving this a bump. Anybody?

In my case I had multiple version of the applications installed on my physical device and react-native run-android opened an older version of the app and it didn't show up in the bundler.
After deleting all the old versions it worked like a charm.

Make sure that the physical device is connected to the same internet source as the system.

If that doesn't help another possible solution can be found here:
https://stackoverflow.com/a/55903474/1985227

Hope this helps.

same problem here

subscribed, same problem, 'Metro server' not running automatically when starting.

Thanks for all the comments - please report this to Metro repository. There's not much we can do.

is there any solution yet? this is happened today and i need a fix :/

nothing yet.. I've opened an issue on the Metro repo, though there hasn't been much activity yet.

https://github.com/facebook/metro/issues/543

I'm having this problem too. Been hours cleaning up, reinstall packages, synced gradles many times, but no luck. Anyone got solution? Please provide the steps 馃檹

i got a solution. i simply stopped developing react native apps. sorry boss

I fixed this by setting ONLY_ACTIVE_ARCH = YES; in _project.pbxproj_ file.

Was this page helpful?
0 / 5 - 0 ratings