React-native: React Packager "Unexpected raw mappings" in 0.43.0-rc.2

Created on 13 Mar 2017  路  25Comments  路  Source: facebook/react-native

Description

After starting Perf Monitor with Dev settings off, React Packager eventually choked without me doing anything with:

 ERROR  Unexpected raw mappings for G:\mobile\cadastro\lib\root.js
{"name":"Invariant Violation","framesToPop":1}
Invariant Violation: Unexpected raw mappings for G:\mobile\cadastro\lib\root.js
    at invariant (G:\mobile\cadastro\node_modules\react-native\node_modules\fbjs\lib\invariant.js:44:15)
    at getModules.forEach.module (G:/mobile/cadastro/node_modules/react-native/packager/src/Bundler/Bundle.js:222:7)
    at Array.forEach (native)
    at Bundle._getCombinedSourceMaps (G:/mobile/cadastro/node_modules/react-native/packager/src/Bundler/Bundle.js:217:23)
    at Bundle.getSourceMap (G:/mobile/cadastro/node_modules/react-native/packager/src/Bundler/Bundle.js:245:14)
    at Bundle.getSourceMapString (G:/mobile/cadastro/node_modules/react-native/packager/src/Bundler/Bundle.js:251:34)
    at building.then.p (G:/mobile/cadastro/node_modules/react-native/packager/src/Server/index.js:777:31)
    at process._tickCallback (internal/process/next_tick.js:109:7)

Reproduction

  • Enable perf monitor
  • Reload a couple of times

Additional Information

  • React Native version: 0.43.0-rc.2
  • Platform: Android
  • Operating System: Windows 10 x64
Stale

Most helpful comment

I think I found a way around this issue, at least for my setup.
From the development menu on my android I selected _Dev Settings_ and re-enabled _JS Dev Mode_ that resolved this issue for me.

All 25 comments

+1
When I do reload and disable JS Dev Mode at using Remote JS Debug.

Unexpected raw mappings for /Volumes/mx200/ReactNativeProject/accupassnative/js/Globals.js
{"name":"Invariant Violation","framesToPop":1}
Invariant Violation: Unexpected raw mappings for /Volumes/mx200/ReactNativeProject/accupassnative/js/Globals.js
    at invariant (/Volumes/mx200/ReactNativeProject/accupassnative/node_modules/fbjs/lib/invariant.js:44:15)
    at /Volumes/mx200/ReactNativeProject/accupassnative/node_modules/react-native/packager/src/Bundler/Bundle.js:222:7
    at Array.forEach (native)
    at Bundle._getCombinedSourceMaps (/Volumes/mx200/ReactNativeProject/accupassnative/node_modules/react-native/packager/src/Bundler/Bundle.js:217:23)
    at Bundle.getSourceMap (/Volumes/mx200/ReactNativeProject/accupassnative/node_modules/react-native/packager/src/Bundler/Bundle.js:245:14)
    at Bundle.getSourceMapString (/Volumes/mx200/ReactNativeProject/accupassnative/node_modules/react-native/packager/src/Bundler/Bundle.js:251:34)
    at /Volumes/mx200/ReactNativeProject/accupassnative/node_modules/react-native/packager/src/Server/index.js:754:31
    at process._tickCallback (internal/process/next_tick.js:103:7)

+1
Same issue. When I enable Remote Debugger and reload - Particularly when there is a reload after some change is made in a file.

Getting this constantly now.

+1
Having the same exact issue every reload. Using 0.42.0

edit: I removed each of these plugins one at a time from my installation and the error continues so they don't seem to be the issue

Me too. Maybe a plugin causing it? Do we have anything in common?
"react-native-admob": "^1.2.1",
"react-native-fcm": "^6.1.0",
"react-native-linear-gradient": "^2.0.0",
"react-native-menu": "^0.20.2",
"react-native-splash-screen": "^2.0.0",
"react-native-swipe-gestures": "^1.0.2",
"react-native-timer": "^1.3.1",
"redux-persist": "^4.4.2",

We use react-native-linear-gradient and react-native-swipe-gestures

I think I found a way around this issue, at least for my setup.
From the development menu on my android I selected _Dev Settings_ and re-enabled _JS Dev Mode_ that resolved this issue for me.

+1

+1.
When I do reload and change JS Dev Mode at using Remote JS Debug.

Additional Information

react-native-cli: 2.0.1
react-native: 0.43.3
Platform: Android avd
Operating System: debian 8

+1
Disable dev mode + Start remote js debuging + Reload = crash
Enabling dev mode does solve it

+1
I have the same issue on iOS. any solution for iOS?

"react-native": "0.43.3",
"react": "16.0.0-alpha.6",

+1
I face the same issue randomly when developing on real device. (Using adb reverse tcp 8081)

Update: disabling remote JS debugging kinda fixes it.

+1
Same issue. with enabling the remote debugging app crashing on every reload with the same above error

+1!!
"react": "16.0.0-alpha.6",
"react-native": "0.44.2",

Here is my solution but I don't know why it works.

  1. remove native codes. ios and android folders. !! backup first !!
    rm -rf os && rm -rf android
  2. create a new dummy project.
    react-native init AwesomeProject
  3. copy native codes to current project folders
cp -R AwesomeProject/ios currentProject/
cp -R AwesomeProject/android currentProject/ 
  1. build
  2. modify native codes as you've done on current project for example:
  3. icons, version information, and/or push notification etc...

I am getting this as well.
So on DEV mode ON, chrome debugging works the first time. Upon reload, the app is just a white screen. So I have to turn off Remote JS Debugging in order to get the app back again. Rinse and repeat cycle. :/

"react-native": "0.44.0"
I am using "react-native-navigation": "^1.1.81" though. Not sure if this has something to do with it.

+1!!!! Extremely annoying.

This still happens, has any facebook dev replied to this?

Literally last couple react-native versions have been so crap :(

This is also happening to me. Really annoying.

me too.
android simulator is right. and hardware is bug show me.
reloadimg

Same issue by me with
react-native-cli: 2.0.1 react-native: 0.47.2

any workaround yet ?

I've been having this issue, but I can pin-point it to a line.

findContent(block: Block): string {
    const contentBlock = block.descendants[0];

    if (typeof contentBlock.content === 'string') {
        return contentBlock.content; // << Here
    }

    return '';
}

When I change it to return ''; it reloads fine.

JS Dev Mode: off
JS Minify: off
Remote JS Debugging: on
react: 16.0.0-alpha.12
react-native: 0.46.3

Impossible to debug because of this disruptive error.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings