cli icon indicating copy to clipboard operation
cli copied to clipboard

Debugger causes error in chrome and blank screen in App

Open jkohlin opened this issue 3 years ago • 5 comments

Environment

OS: macOS 12.3.1
    CPU: (10) x64 Apple M1 Max
    Memory: 81.19 MB / 64.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
    Yarn: 1.22.11 - ~/.nvm/versions/node/v14.17.0/bin/yarn
    npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8309675
    Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: ^17.0.2 => 17.0.2
    react-native: 0.68.0 => 0.68.0
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Description

When I start debug in Chrome, the App screen is blanked out and I get this error message in the react console:

None of these files exist:
  * debugger-ui/debuggerWorker.aca173c4(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
  * debugger-ui/debuggerWorker.aca173c4/index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
    at ModuleResolver.resolveDependency (/Users/kojo/Documents/Projekt/Egna/bas068/Bas/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:136:15)

and in chrome I get this:

index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=se.lejman.bask…:22543 Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

And a console log saying: Failed to mount LogBox within 1s

Reproducible Demo

Unfortunately I don't have one that I can share...

jkohlin avatar Apr 26 '22 07:04 jkohlin

have upgraded the react native version 0.63.xx to 0.67.xx using command 'npx react-native upgrade' iOS working as expected with and without debugger but in android it is working as expected without debugger but if try to connect with debugger i.e react-native-debugger, chrome browser, firefox browser the android app getting crashed and throwing below error and warnings

After try to connect with debugger

  1. showing error on debugger console,

File name: ExceptionsManager.js:149 Error: i. Invariant Violation: Calling synchronous methods on native modules is not supported in Chrome.
Consider providing alternative methods to expose this method in debug mode, e.g. by exposing constants ahead-of- time. ii. Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

  1. showing error on terminal where packager starts,

Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4 from /Users/userdirectory/Projects/MyApp/.:

None of these files exist:

  • debugger-ui/debuggerWorker.aca173c4(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
  • debugger-ui/debuggerWorker.aca173c4/index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx) at ModuleResolver.resolveDependency (/Users/userdirectory/Projects/MyApp/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:107:15) at DependencyGraph.resolveDependency (/Users/userdirectory/Projects/MyApp/node_modules/metro/src/node-haste/DependencyGraph.js:288:43) at /Users/userdirectory/Projects/MyApp/node_modules/metro/src/lib/transformHelpers.js:129:24 at Server._resolveRelativePath (/Users/userdirectory/Projects/MyApp/node_modules/metro/src/Server.js:1072:12) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Server._explodedSourceMapForURL (/Users/userdirectory/Projects/MyApp/node_modules/metro/src/Server.js:1028:35) at async Promise.all (index 1) at async Server._symbolicate (/Users/userdirectory/Projects/MyApp/node_modules/metro/src/Server.js:979:26) at async Server._processRequest (/Users/userdirectory/Projects/MyApp/node_modules/metro/src/Server.js:403:7)

LOG JavaScript logs will appear in your browser console

Screenshot_1651758517

pankaj-bhardwaj avatar May 05 '22 13:05 pankaj-bhardwaj

None of these files exist:

  • debugger-ui/debuggerWorker.aca173c4(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)

Any solutions?

thtRajasthaniGuy avatar Jun 21 '22 06:06 thtRajasthaniGuy

Did anyone solve this problem, having the same after upgrading to RN 69.4

alex-mironov avatar Aug 24 '22 09:08 alex-mironov

Facing the same issue with react-native version 0.64

dasjideepak avatar Oct 08 '22 07:10 dasjideepak

Facing the same issue with react-native 0.67.4

cmpdvd avatar Oct 14 '22 15:10 cmpdvd

Facing the same issue with react-native version 0.69.2

hszeto avatar Oct 18 '22 20:10 hszeto

Facing the same issue with rn version 0.70.5

lukasz-szulborski avatar Nov 18 '22 15:11 lukasz-szulborski

I'm also having this issue.

nica0012 avatar Nov 22 '22 15:11 nica0012

Facing the same issue with rn version 0.70.5

lvst09 avatar Feb 06 '23 02:02 lvst09

I am having the same issue oddly on one machine, but the issue is not present on another machine. RN 68.6

Krispyru avatar Feb 28 '23 08:02 Krispyru

There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.

github-actions[bot] avatar May 30 '23 03:05 github-actions[bot]