Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

"Loading dependency graph, done" #51

Closed
dillon opened this issue Sep 1, 2018 · 12 comments
Closed

"Loading dependency graph, done" #51

dillon opened this issue Sep 1, 2018 · 12 comments

Comments

@dillon
Copy link

dillon commented Sep 1, 2018

Environment

  1. Application Target Platform:
  • Both
  1. Development Operating System:

macOS High Sierra 10.13.6

  1. Build Tools:

Xcode 9.4.1

  1. React Native version:

react-native-cli: 2.0.1
react-native: 0.55.4

  1. React Native Firebase Version:

    "react-native-firebase": "^4.3.6",

  2. Firebase Module:

auth, database

  1. Are you using typescript?

no


My project can never get past Loading dependency graph, done.

I rolled back to a previous version when it was working and reinstalled node_moduels with yarn, but it didn't help.

So I then tried starting from scratch, but the same happens with a completely blank react-native-firebase-starter (into which I imported my previous firebase project's credentials).

Note that it works fine when using a blank create-react-native-app app

Terminal shows the following output indefinitely (I've waited for up to 40 minutes):

Scanning folders for symlinks in /Users/dillon/Dropbox/Code/Projects/react-native-firebase-starter/node_modules (22ms)

...

Running Metro Bundler on port 8081.                       

...

Looking for JS files in
   /Users/dillon/Dropbox/Code/Projects/react-native-firebase-starter 


Metro Bundler ready.

Loading dependency graph, done.

The simulator never opens. If I try opening the simulator first and then running yarn start, the simulator doesn't change at all (or even open expo). Opening expo manually doesn't do anything either.

This has happened once before, and I managed to fix it. I believe it was from installing watchman (which I hadn't had installed globally with brew yet)

Here are the fixes I've tried so far, (mostly one at a time, and then rolling back changes):

  1. deleting and reinstalling watchman with brew
  2. watchman watch-del-all after each attempt at bundling
  3. updating node
  4. reinstalling cocoapods
  5. putting various things in my Podfile that stackoverflow suggested
  6. rm -rf node_modules && yarn
  7. `npm start -- --reset-cache
  8. react-native run-ios (this generates a ton of new files in the ios/ folder, but works initially, until I try to add an import statement of any module (even import firebase from 'firebase') in any of my js files and it throws an error on the ios simulator screen that it can't find the module. I can do this again to get that error for you if you'd like me to).
  9. react-native upgrade
  10. remove /usr/local/var/run/watchman/ then brew reinstall the watchman
  11. make sure 127.0.0.1 localhost is in your /etc/hosts file. (it already was)
  12. make sure you aren't using a VPN
  13. uninstall watchman and yarn start
  14. restart computer -___-
  15. Erase all content and settings on xcode simulator
  16. enter http://localhost:8081/index.ios.bundle into the browser resulted in the following output in browser window:

{"message":"Cannot find entry file index.ios.js in any of the roots: [\"/Users/dillon/Dropbox/Code/Projects/monitor\"]","name":"NotFoundError","type":"NotFoundError","status":404,"errors":[{"description":"Cannot find entry file index.ios.js in any of the roots: [\"/Users/dillon/Dropbox/Code/Projects/monitor\"]"}],"stack":"NotFoundError: Cannot find entry file index.ios.js in any of the roots: [\"/Users/dillon/Dropbox/Code/Projects/monitor\"]\n at DependencyGraph.getAbsolutePath (/Users/dillon/Dropbox/Code/Projects/monitor/node_modules/metro/src/node-haste/DependencyGraph.js:317:11)\n at /Users/dillon/Dropbox/Code/Projects/monitor/node_modules/metro/src/DeltaBundler/DeltaCalculator.js:280:416\n at Generator.next (<anonymous>)\n at step (/Users/dillon/Dropbox/Code/Projects/monitor/node_modules/metro/src/DeltaBundler/DeltaCalculator.js:11:445)\n at /Users/dillon/Dropbox/Code/Projects/monitor/node_modules/metro/src/DeltaBundler/DeltaCalculator.js:11:605\n at process._tickCallback (internal/process/next_tick.js:68:7)"}

package.json:

{
  "name": "monitor",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "babel-jest": "^23.4.0",
    "babel-preset-react-native-stage-0": "^1.0.1",
    "detox": "^8.2.3",
    "fs-extra": "^6.0.1",
    "jest": "^23.5.0",
    "react-test-renderer": "^16.4.1",
    "replace-in-file": "^3.4.0"
  },
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "rename": "node ./bin/rename.js",
    "start": "react-native start",
    "test": "jest"
  },
  "jest": {
    "preset": "react-native"
  },
  "detox": {
    "text-runner": "jest",
    "runner-config": "e2e/config.json",
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/monitor.app",
        "build": "xcodebuild -workspace ios/monitor.xcworkspace -scheme monitor -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "name": "iPhone 7"
      }
    }
  },
  "dependencies": {
    "etherscan-api": "^8.1.2",
    "fbjs": "^0.8.17",
    "react": "^16.3.2",
    "react-native": "^0.55.3",
    "react-native-firebase": "^4.3.6",
    "react-navigation": "^2.12.1"
  }
}
@dillon
Copy link
Author

dillon commented Sep 3, 2018

@dillon
Copy link
Author

dillon commented Sep 3, 2018

also tried:

sudo sysctl -w kern.maxfiles=5242880
sudo sysctl -w kern.maxfilesperproc=524288

as per this github issue

also tried:
watchman watch-del-all && rm -rf node_modules && yarn && rm -rf /tmp/metro-bundler-cache-* && rm -rf /tmp/haste-map-react-native-packager-* as per the recommendations from this screen that comes up when i run react-native run-ios.
screen shot 2018-09-02 at 10 18 01 pm

Running react-native run-ios also changes a ton of files (about 310)
screen shot 2018-09-02 at 10 24 56 pm
screen shot 2018-09-02 at 10 24 43 pm

@dillon
Copy link
Author

dillon commented Sep 3, 2018

react-native start similarly hangs. Anything with start in it hangs, but run-ios seems to break the build/dependencies.

@dillon
Copy link
Author

dillon commented Sep 3, 2018

when running react-native run-ios :
screen shot 2018-09-02 at 10 29 40 pm

@dillon
Copy link
Author

dillon commented Sep 3, 2018

I've noticed that when it used to run successfully, or when i use run-ios, the metro bundler opens in a new terminal window. When I use start, it opens in the same terminal window and then hangs.

screen shot 2018-09-02 at 10 34 39 pm

@JacekRojek
Copy link

JacekRojek commented Sep 3, 2018

@dillon Did you manage to fix it? I'm having the same issue on Android

EDIT: Fixed it for android by following this: https://stackoverflow.com/questions/52111298/how-to-solve-app-launch-app-is-stuck-on-white-screen?noredirect=1

@dillon
Copy link
Author

dillon commented Sep 3, 2018

@JacekRojek no I haven’t been able to fix it

@dillon
Copy link
Author

dillon commented Sep 7, 2018

This is still an issue for me

@elimydlarz
Copy link

elimydlarz commented Sep 22, 2018

I'm having this problem too. I can start a new project as per the instructions and I get this:

yarn run v1.9.4
$ react-native start
Scanning folders for symlinks in /Users/x/projects/x/x/node_modules (16ms)
┌──────────────────────────────────────────────────────────────────────────────┐
│                                                                              │
│  Running Metro Bundler on port 8081.                                         │
│                                                                              │
│  Keep Metro running while developing on any JS projects. Feel free to        │
│  close this tab and run your own Metro instance if you prefer.               │
│                                                                              │
│  https://github.com/facebook/react-native                                    │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

Looking for JS files in
   /Users/x/projects/x/x


Metro Bundler ready.

Loading dependency graph, done.

Then it hangs forever.

Creating an app using create-react-native-app works fine, so this seems like a bug with react-native-firebase-starter.

@Salakar
Copy link
Contributor

Salakar commented Oct 11, 2018

Please try the latest changes on master, thanks 👍


Loving react-native-firebase and the support we provide? Please consider supporting us with any of the below:

@mdere
Copy link

mdere commented Dec 3, 2018

So I have a similar issue when I follow this https://rnfirebase.io/docs/v5.x.x/installation/ios, anyone here still running into this issue?

@devil1527
Copy link

i have found the perfect solution for it

use command prompt to run the react-native start, let it be stuck on dependency graph

then run react-native run-android on your ide terminal

works for me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants