White screen on Android
Hi there, I just checked out the code, followed the instructions and compiled an Android debug apk. When it was installed on the device (Android 8.0.0), I ended up with white screen. Console log says:
TypeError: (0 , o.default)(...).darken(...).hex is not a function app.js:1 at Object.get statusBarColor [as statusBarColor] (file:///android_asset/www/app.js:1:4701) at file:///android_asset/www/app.js:1:36865 at fr (file:///android_asset/www/app.js:1:27433) at file:///android_asset/www/app.js:1:36667 at Function.ll (file:///android_asset/www/app.js:1:52475) at e (file:///android_asset/www/app.js:11:234047) at file:///android_asset/www/app.js:11:234184 at file:///android_asset/www/app.js:1:36862 at fr (file:///android_asset/www/app.js:1:27433) at file:///android_asset/www/app.js:1:36667
Any help would be appreciated.
Delete node modules folder and do fresh modules install
On Tue, 3 Jul 2018 at 13:10, Angel [email protected] wrote:
Hi there, I just checked out the code, followed the instructions and compiled an Android debug apk. When it was installed on the device (Android 8.0.0), I ended up with white screen. Console log says:
TypeError: (0 , o.default)(...).darken(...).hex is not a function app.js:1 at Object.get statusBarColor [as statusBarColor] (file:///android_asset/www/app.js:1:4701) at file:///android_asset/www/app.js:1:36865 at fr (file:///android_asset/www/app.js:1:27433) at file:///android_asset/www/app.js:1:36667 at Function.ll (file:///android_asset/www/app.js:1:52475) at e (file:///android_asset/www/app.js:11:234047) at file:///android_asset/www/app.js:11:234184 at file:///android_asset/www/app.js:1:36862 at fr (file:///android_asset/www/app.js:1:27433) at file:///android_asset/www/app.js:1:36667
Any help would be appreciated.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mauron85/cordova-plugin-background-geolocation-example/issues/17, or mute the thread https://github.com/notifications/unsubscribe-auth/AAV8GsULKOywAaxHUqdLYbqF_D1Z0Rlfks5uC1EXgaJpZM4VAvod .
Nope, it didn't work. What I did:
- Deleted
node_modulesfolder - Executed
npm install - Started app in debug mode --> received the exact same error as above.
P.S. Note sure how relevant it is - I am using Windows 10 Home as development environment. I had no issues to compile and execute your previous example, so I would speculate the issue is not related to dev. environment.
you need to rebuild app too:
npm run build
@mauron85 - no luck again. BTW - sorry if I am asking for the obvious, but how repeating the steps which failed to deliver exception free app once will fix it on the next iteration?
There is another suggestion in https://github.com/mauron85/cordova-plugin-background-geolocation-example/issues/16. I believe this is some kind of dependency issue, where two packages are using different versions of some dependency. Don't think I can do much here.
Basically guy used yarn instead of npm.
Thanks,
So basically, as mentioned in #16, the actual reason is having package-lock.json which in fact caused this dependencies mismatch.
The workaround on this issue is:
- Delete
node_modulesfolder - Install packages using
yarn - Build the app using
npm run build
@mauron85 - I do agree with @pmatheush the best would be to update the readme file, this will save you from further identical inquiries.
You probably ment there is no package-lock.json but yarn.lock. Anyway, there should be no need to have any of those lock files.. Apparently there is some dependency issue problem as reported in https://github.com/GeekyAnts/NativeBase/issues/1354
Actually, package-lock.json is generated automatically, whenever npm 5.x.x+ command is used e.g. npm install. This is according to npm documentation.
When yarn is used instead of npm install, package-lock.json creation is skipped, hence subsequent npm run build produces a runnable app.