haul icon indicating copy to clipboard operation
haul copied to clipboard

[CentOS 7] Haul did not compile bundle after run-android and the app on emulator saying "Unable to load script..."

Open szalansun opened this issue 4 years ago • 1 comments

Environment

CentOS7 Android Studio AVD "@haul-bundler/babel-preset-react-native": "^0.15.0", "@haul-bundler/cli": "^0.15.0", "@haul-bundler/preset-0.60": "^0.15.0", "react": "16.9.0", "react-native": "0.61.4",

Description

Have the some code and works well in Windows 10, but in CentOS, the haul progress is pending forever and did not start compiling bundle (hung on IDLE status) after the "react-native run-android" is successfully executed and the app show up on emulator, but with a red screen saying "Unable to load script. Please make sure you are either running a Metro server or that your bundle 'index.android.bundle' is packaged correctly for release."

I have confirm the port 8081 is not occupied and try use other port number still did not work.

image

image

szalansun avatar Dec 13 '19 07:12 szalansun

Hey @szalansun, thanks for opening the issue. I'll look into it in spare time. To me it looks like the app cannot download the bundle from Haul. Usually this is caused by networking problem. You can try using 0.0.0.0 as a server.host option in haul.config.js as noted in here: https://github.com/callstack/haul/blob/master/docs/Configuration.md#project-configuration-reference

zamotany avatar Dec 16 '19 13:12 zamotany