metro icon indicating copy to clipboard operation
metro copied to clipboard

Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4.js

Open omar-bear opened this issue 2 years ago β€’ 57 comments

Report a bug App crash when i turn debug on mode

versions

    "react-native": "0.66.0",
    "metro-react-native-babel-preset": "0.66.2",

What is the current behavior? The app work fine but it crash when i turn it to debug mode

How can i reproduce the error? After a yarn dev and yarn android when i turn it to debug mode it crash and i can see only the error below

You can test it by your self from here install start-ui native

npx create-start-ui --native myApp

That will scaffold a new folder with the latest version of πŸš€ Start UI [native] πŸŽ‰

Then just go to the created folder cd myApp and follow the Installation Guide.

What is the error I'm getting? After a yarn dev and yarn android when i turn it to debug mode it crash and i can see only this error

Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4.js from /home/omar/Documents/Projects/JawDay-mobile/.: 

None of these files exist:
  * debugger-ui/debuggerWorker.aca173c4.js(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
  * debugger-ui/debuggerWorker.aca173c4.js/index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
    at ModuleResolver.resolveDependency (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:107:15)
    at DependencyGraph.resolveDependency (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/node-haste/DependencyGraph.js:288:43)
    at /home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/lib/transformHelpers.js:129:24
    at Server._resolveRelativePath (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/Server.js:1072:12)
    at async Server.requestProcessor [as _processSourceMapRequest] (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/Server.js:428:37)
    at async Server._processRequest (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/Server.js:389:7)
Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4.js from /home/omar/Documents/Projects/JawDay-mobile/.: 

None of these files exist:
  * debugger-ui/debuggerWorker.aca173c4.js(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
  * debugger-ui/debuggerWorker.aca173c4.js/index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
    at ModuleResolver.resolveDependency (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:107:15)
    at DependencyGraph.resolveDependency (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/node-haste/DependencyGraph.js:288:43)
    at /home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/lib/transformHelpers.js:129:24
    at Server._resolveRelativePath (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/Server.js:1072:12)
    at async Server.requestProcessor [as _processSourceMapRequest] (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/Server.js:428:37)
    at async Server._processRequest (/home/omar/Documents/Projects/JawDay-mobile/node_modules/metro/src/Server.js:389:7)

this error guide me to metro modules so this is i put the issue here

what is metro config in the project in file metro.config.js

/**
 * Metro configuration for React Native
 * https://github.com/facebook/react-native
 *
 */

module.exports = {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: false, // false because of hermes issue https://github.com/storybookjs/react-native/issues/152
      },
    }),
  },
};

Can someone find solution for this probleme i tested all solutions here but it doesnt work

omar-bear avatar Nov 06 '21 20:11 omar-bear

@omar-bear Can you check which version of @react-native-community/cli-debugger-ui you have installed? It seems like https://github.com/react-native-community/cli/pull/1307 should have fixed this.

Also, have you tried clearing your Chrome cache?

motiz88 avatar Nov 10 '21 21:11 motiz88

+1

exzos28 avatar Nov 19 '21 13:11 exzos28

Deleting the Cache from Google Chrome fixed this issue for me.

Settings -> More Tools -> Clear browsing data

Make sure to select "All time"

Screen Shot 2021-11-25 at 10 49 25 AM

sayurimizuguchi avatar Nov 25 '21 15:11 sayurimizuguchi

Deleting the Cache from Google Chrome fixed this issue for me.

Settings -> More Tools -> Clear browsing data

Make sure to select "All time"

Screen Shot 2021-11-25 at 10 49 25 AM

I open debugger in incognito and it doesn't work for me.

exzos28 avatar Nov 25 '21 18:11 exzos28

Failing for us too. Clearing the cache or anything else doesn't do anything. Any sort of help would be highly appreciated πŸ™ image

ahmedu007 avatar Dec 22 '21 13:12 ahmedu007

I am building an app with react-native (without expo) and it works both on simulator and on actual iPhone. But when I go in debug mode (Shake and Debug with Chrome) on simulator, the screens turns black. In my opinion the app is still running, because I get the same error messages as before but I can't do anything. All of the dependencies are up to date and reset of entire project doesn't help either. Does anyone experience the same issues and is there any fix? Bildschirmfoto 2021-12-29 um 15 19 37

PhilippLeh21 avatar Dec 29 '21 14:12 PhilippLeh21

Same problem here, I've tried everything and it didn't work I formatted my machine and nothing, the worst thing is that I'm in the final stage of the project and late.

claudineibr avatar Dec 31 '21 14:12 claudineibr

Can someone who's experiencing this issue provide a minimal repro case for me to look at? Ideally as a GitHub repo plus step-by-step instructions (that include clearing Chrome's cache and restarting the debug session).

motiz88 avatar Dec 31 '21 17:12 motiz88

Can someone who's experiencing this issue provide a minimal repro case for me to look at? Ideally as a GitHub repo plus step-by-step instructions (that include clearing Chrome's cache and restarting the debug session).

You can install the project in the issue description and debug it directly, thanks ☺️

omar-bear avatar Dec 31 '21 17:12 omar-bear

Since version 2.x of react-native-reanimated does not yet support remote debugging (https://docs.swmansion.com/react-native-reanimated/docs/#known-problems-and-limitations), I downgraded to Version 1.13.1. and the debugger finally worked again. Unfortunately I do not know yet, if the lower version of react-native-reanimated has any impact on other libraries which rely on it (react-navigation for example). I hope this helps a little. :)

PhilippLeh21 avatar Jan 01 '22 16:01 PhilippLeh21

am facing same issue with "react-native":"0.65.2" gite app works fine ,but crashes in debug mode

poojaSivakumar97 avatar Jan 19 '22 17:01 poojaSivakumar97

Same issue here. At the very least, it needs to throw a better error than this. Our packages are:

    "@react-native-community/blur": "^3.6.0",
    "@react-native-masked-view/masked-view": "^0.2.6",
    "@react-navigation/bottom-tabs": "^6.0.9",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/stack": "^6.0.11",
    "fastestsmallesttextencoderdecoder": "^1.0.22",
    "joi": "^17.5.0",
    "moment": "^2.29.1",
    "react": "17.0.2",
    "react-error-boundary": "^3.1.4",
    "react-native": "0.66.3",
    "react-native-app-auth": "^6.4.0",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-iap": "^7.5.1",
    "react-native-keychain": "^8.0.0",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-markdown-display": "^7.0.0-alpha.2",
    "react-native-orientation-locker": "^1.4.0",
    "react-native-pager-view": "^5.4.9",
    "react-native-reanimated": "^2.3.0",
    "react-native-redash": "^16.2.3",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "^3.10.1",
    "react-native-shared-element": "^0.8.3",
    "react-native-svg": "^12.1.1",
    "react-native-url-polyfill": "^1.3.0",
    "react-native-vector-icons": "^8.1.0",
    "react-native-video": "^5.2.0",
    "react-native-webview": "^11.16.0",
    "react-navigation-shared-element": "^3.1.3",
    "react-query": "3.24.4"

joshrizzo avatar Jan 19 '22 21:01 joshrizzo

I had similar issue, and I found out that react-native-reanimated package caused the issue for me. Please note that Reanimated 2 doesn't support remote debugging, only Flipper can be used for debugging. https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/

vyshakh avatar Jan 31 '22 07:01 vyshakh

I am experiencing this same error although am not using metro-react-native-babel-preset, just metro. What I've found is booting up a brand new expo project (SDK 44, comes with metro 0.64) and upgrading to metro 0.65.2 causes the debugger issue, and downgrading back to 0.64 resolves it

danpettay avatar Feb 02 '22 04:02 danpettay

I had similar issue, and I found out that react-native-reanimated package caused the issue for me. Please note that Reanimated 2 doesn't support remote debugging, only Flipper can be used for debugging. https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/

how to debug webSocket in flipper?

Rubon72 avatar Feb 13 '22 10:02 Rubon72

The issue still persist in "react-native": "0.67.2" any help here?

mukash avatar Mar 07 '22 06:03 mukash

same issue for me

edritech93 avatar Mar 22 '22 05:03 edritech93

Do you use "react-native-performance"?

sionel avatar Mar 24 '22 09:03 sionel

Installing @react-native-community/cli-debugger-ui + clearing application data in inspect solved this to me.

lid3rs avatar Apr 11 '22 16:04 lid3rs

Fixed for me with upgrade react-native-reanimated to 2.7.0

omar-bear avatar Apr 18 '22 13:04 omar-bear

@react-native-community/cli-debugger-ui

This is not helping for me I'm afraid 😟 It started after I built the app to an iPhone. Could it be react-native-iap? that's the only thing I installed recently.

jkohlin avatar Apr 25 '22 19:04 jkohlin

I've spend two days trying to solve this problem, but couldn't find any solution, so what I'm doing now is debug the app with Flipper, I don't like as much debug with Chrome but is the only solution I have found

AndersonVanzo avatar Apr 26 '22 18:04 AndersonVanzo

Installing @react-native-community/cli-debugger-ui + clearing application data in inspect solved this to me.

This worked for me. I did both the install and clearing the Expo data + cache in the phone.

g-nogueira avatar May 11 '22 20:05 g-nogueira

Expo build app doesn't crash but still log the same error for me when debugger is on:

Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4

esadkrs avatar May 20 '22 12:05 esadkrs

same issue, Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4. Worked for me to uninstall Expo from Android, run expo start again, open on android, it install expo again on my device and then in worked.

jucoba avatar May 21 '22 13:05 jucoba

I face the error when I enable debug mode on the expo app

FatmaMahmoud698 avatar May 30 '22 12:05 FatmaMahmoud698

@lid3rs I tried your step but still the same problem

FatmaMahmoud698 avatar May 30 '22 13:05 FatmaMahmoud698

Version 68.2 and noting!!!

claudineibr avatar May 30 '22 14:05 claudineibr

I am on macOS, I installed React Native Debugger brew install react-native-debugger as it was adviced in corresponding section in the expo documentation https://docs.expo.dev/workflow/debugging/ , and the error was gone, so I was able to debug the app in vscode

TkhiienLok avatar Jun 07 '22 08:06 TkhiienLok

I've spend two days trying to solve this problem, but couldn't find any solution, so what I'm doing now is debug the app with Flipper, I don't like as much debug with Chrome but is the only solution I have found

WEIRD but true! I try to connect my app with flipper, it fails to connect but solve my issue. Still shows the same error in terminal but debugger is running on chrome devtool smoothly!

robin3317 avatar Jul 01 '22 02:07 robin3317