react-native: RemoteJs Debug Enabling crashs after Upgrade to v0.50.1 .
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment: OS: Linux 4.13 Node: 9.0.0 Yarn: 0.27 npm: 5.5.1 Watchman: Not Found Xcode: N/A Android Studio: 3.0 AI-171.4408382
Packages: (wanted => installed) react: ^16.0.0 => 16.0.0 react-native: ^0.50.1 => 0.50.1
Steps to Reproduce
- Upgrade via running
react-native-git-upgrade
. - run
react-native run-android
- enable remotejs debug mode in device
- crash when loading and prompt in my console
SyntaxError: Unexpected token <
message.
also i have use clear cache commands and reinstall npm modules.
Expected Behavior
Just normally load js in debug mode . I Think something goes wrong in js bundler for enabling debugging mode . Except the enabling remote js debugging mode everything works OK even the hot reloading and i can see the changes normally .
Actual Behavior
Shows white screen and a timeout message after the seconds that show the js file not loaded because there is a critical error happened .
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 21
- Comments: 34 (1 by maintainers)
If you ever arrive here from a timeout from Genymotion emulator, check if the address in your tab is correct: here the emulator was generating a tab on 10.0.3.2, which is the internal IP for the Android VM; you should actually access the debugger UI at localhost:8081.
Dear all,
I fixed it by below steps
worker.postMessage({ …object, url: await getBlobUrl(object.url), });
worker.postMessage( Object.assign({}, object, { url: await getBlobUrl(object.url), } ));
@saeedtabrizi Is the problem solved?
What I’m doing is an ugly workaround. I start my debugger in ios simulator. Then I close it and start my android. And works!
Having the same problem
Facing same issue
“react-native run-ios”, this is happening to me as well
+1 First run ok. Then reload code. Crash
I had the latest version (0.53) and I downgraded to 0.51 (because with the 0.52 I got a different error) and the debug is working now.
Edit: For whom the 0.51 isn’t working as well, try the 0.50 or 0.49.
After the downgrade I ran:
$ react-native upgrade
$ react-native link
Building a React Native app is more about fixing issues than developing…
My app stop after double RR =/
Message: Unfortunatley app_name has stopped.
Node: v8.9.0 Android Studio: 3.0 JDK: 1.8.0_152 Python: 2.7.14 SO: Windows 10 1703 gradle: 2.2.3 react-native-cli: 2.0.1 react-native: 0.50.1 AVD: Nexus 5 API 23 Android 6.0 x86_64 4GB
EDIT: It looks like it’s the AVD version. Debug works fine on AVD API 27.
Seeing the same exact error/stack trace on 0.50.1 when running
run-ios
w/ remote debugging.Strangely, that works. I think it’s something to do with the boot-up in the AVD emulator versus the iOS simulator. Notice that the emulator launches with an actual debugger IP on the browser but the simulator does a “localhost:8081”. I’m still unclear what exactly is happening around here but this is as far as I could investigate to get my boat sailing
reload the chrome tab/restart chrome is ok now
Using Chromium instead of Chrome did the trick, thanks for the answer @saeedtabrizi !
Is this still happening to some guys? I upgraded my react-native version yesterday to 0.50.0 but the debugger was not working. Today, I did what @saeedtabrizi said (
react-native-git-upgrade 0.50.3
) but still, it’s not working and I’m having a timeout message on my device and this message in my console :Any help on this please? I can still use logcat but debugger is more helpful
this is happening to me as well
Oddly, I can’t reproduce this consistently. I’ve seen it on iOS once and a co-worker was unable to get past the error message
SyntaxError: Unexpected token <
in the Chrome debugger on Android. I tried reproducing on Android emulator but couldn’t.Reverting to a previous version of React Native for now…
@rafaelgrilli92 “Building a React Native app is more about fixing issues than developing…” SAD, BUT TRUE
Android debugger isn’t working for me. I´m with 0.53 and debugging only in ios
@Blapi we move to 0.49.5 instead, ty anyway
I’m also seeing the
SyntaxError: Unexpected token <
in a fresh RN project on my iOS simulator when I try to remote debug.