Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reload does not work with Linux + Android #19

Open
docent opened this issue Nov 26, 2015 · 3 comments
Open

Reload does not work with Linux + Android #19

docent opened this issue Nov 26, 2015 · 3 comments

Comments

@docent
Copy link

docent commented Nov 26, 2015

Hi Benoit, first of all, many thanks for the nice demo!

I was playing with it using Android + Linux. The app builds and installs correctly (using react-native install-android) and even runs correctly on the first time. (The weird thing though is, on the first run it does not try to pull the JS using react packager - I see no trace of any requests there.)

However, when as I try to reload JS from the phone, the JS gets transferred correctly (confirmed by the packager logs) but I'm ending up with a blank screen, and the following errors in the log:

D/ReactNativeJS(13909): 'Running application "nativeApp" with appParams: {"initialProps":{},"rootTag":1}. __DEV__ === false, development-level warning are OFF, performance optimizations are ON'
D/ReactNativeJS(13909): 'Running application "nativeApp" with appParams: {"initialProps":{},"rootTag":1}. __DEV__ === false, development-level warning are OFF, performance optimizations are ON'
E/ReactNativeJS(13909): 'Error: \n stack: measureMethods@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:53888:11\nhttp://localhost:8081/src/index.android.bundle?platform=android&dev=true:53166:25\nrequireImpl@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:64:17\nrequire@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:26:19\nhttp://localhost:8081/src/index.android.bundle?platform=android&dev=true:52928:34\nrequireImpl@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:64:17\nrequire@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:26:19\nhttp://localhost:8081/src/index.android.bundle?platform=android&dev=true:52806:34\nrequireImpl@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:64:17\nrequire@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:26:19\nhttp://localhost:8081/src/index.android.bundle?platform=android&dev=true:52762:21\nrequireImpl@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:64:17\nrequire@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:26:19\nhttp://localhost:8081/src/index.android.bundle?platform=android&dev=true:926:52\nrequireImpl@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:64:17\nrequire@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:26:19\nhttp://localhost:8081/src/index.android.bundle?platform=android&dev=true:896:218\nrequireImpl@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:64:17\nrequireImpl@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:34:32\nrequire@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:26:19\nglobal code@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:73756:9\n line: 53888\n message: Can\'t find variable: process', { [ReferenceError: Can't find variable: process]
E/ReactNativeJS(13909):   line: 53888,
E/ReactNativeJS(13909):   column: 11,
E/ReactNativeJS(13909):   sourceURL: 'http://localhost:8081/src/index.android.bundle?platform=android&dev=true' }
E/ReactNativeJS(13909): 'Error: \n stack: http://localhost:8081/src/index.android.bundle?platform=android&dev=true:54631:11\nrequireImpl@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:64:17\nrequire@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:26:19\nhttp://localhost:8081/src/index.android.bundle?platform=android&dev=true:2808:20\nrequireImpl@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:64:17\nrequire@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:26:19\nhttp://localhost:8081/src/index.android.bundle?platform=android&dev=true:2336:30\nrequireImpl@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:64:17\nrequire@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:26:19\nhttp://localhost:8081/src/index.android.bundle?platform=android&dev=true:2310:25\nrequireImpl@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:64:17\nrequireImpl@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:34:32\nrequire@http://localhost:8081/src/index.android.bundle?platform=android&dev=true:26:19\nglobal code\n line: 54631\n message: Can\'t find variable: process', { [ReferenceError: Can't find variable: process]
E/ReactNativeJS(13909):   line: 54631,
E/ReactNativeJS(13909):   column: 11,
E/ReactNativeJS(13909):   sourceURL: 'http://localhost:8081/src/index.android.bundle?platform=android&dev=true' }
E/ReactNative(13909): Got JS Exception: TypeError: undefined is not an object (evaluating 'require('BatchedBridge').flushedQueue')

(Note that the first error is actually Can\'t find variable: process', { [ReferenceError: Can't find variable: process] - you need to scroll to the right in the error log).

Any idea why is this failing? I actually tried Windows too, but that fails for different reasons, so let's leave this for now.

@benoitvallon
Copy link
Owner

Hi @docent, thanks.

About your issue, I am not really familiar with Android and Linux as I work on a Mac.

Have you looked at the react-native repo issues. Android support is still quite new and they may still have bugs unresolved. Have you tried to install the demo project with react-native init to see if it works as expected as well.

@docent
Copy link
Author

docent commented Nov 26, 2015

Yes. The default demo project is working as expected, and so are other demos that I tested. Everything works including reload etc.
Do you know why your app does not try to pull the JS immediately after start? That is somewhat strange, all the other demos would do that.

@verystrongjoe
Copy link

I have same issue with android in windows 7. If I reload, the app exists showing uncertain error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants