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

White Screen on iOS iPhone 6 #16

Open
Yermo opened this issue Jun 5, 2018 · 5 comments
Open

White Screen on iOS iPhone 6 #16

Yermo opened this issue Jun 5, 2018 · 5 comments

Comments

@Yermo
Copy link

Yermo commented Jun 5, 2018

I am trying to track down a crash bug in the background geolocation plugin that's occurring in my app (ionic). My thought was to compare it to the behavior of the example before filing a bug report.

I have signed up for a google maps key and have followed the instructions in the README.

I ran into the "No development team" issue but Xcode would not allow me to use the default widget id so I changed it to

<widget id="com.yml.bgexampleapp"

in config.xml and then selected my personal development team in Xcode.

The application built, installed, and ran without errors but shows nothing but a white screen.

The log from Xcode is:

2018-06-05 13:22:03.730483-0400 BG Example[6226:1734737] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/03A690A1-12EB-4F1D-B1BF-2157C58436FD/Library/Cookies/Cookies.binarycookies
2018-06-05 13:22:04.054628-0400 BG Example[6226:1734737] Apache Cordova native platform version 4.5.3 is starting.
2018-06-05 13:22:04.056406-0400 BG Example[6226:1734737] Multi-tasking -> Device: YES, App: YES
2018-06-05 13:22:04.073272-0400 BG Example[6226:1734737] 

Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file
2018-06-05 13:22:04.536318-0400 BG Example[6226:1734737] Using UIWebView
2018-06-05 13:22:04.545475-0400 BG Example[6226:1734737] [CDVTimer][console] 0.177979ms
2018-06-05 13:22:04.545894-0400 BG Example[6226:1734737] [CDVTimer][handleopenurl] 0.286937ms
2018-06-05 13:22:04.552436-0400 BG Example[6226:1734737] [CDVTimer][intentandnavigationfilter] 6.468892ms
2018-06-05 13:22:04.552713-0400 BG Example[6226:1734737] [CDVTimer][gesturehandler] 0.180960ms
2018-06-05 13:22:04.606457-0400 BG Example[6226:1734737] +backgroundSessionConfiguration: is deprecated. Please use +backgroundSessionConfigurationWithIdentifier: instead
2018-06-05 13:22:04:603 BG Example[6226:1734737] Backing up original handler.
2018-06-05 13:22:04:604 BG Example[6226:1734737] Setting new handler.
2018-06-05 13:22:04.677347-0400 BG Example[6226:1734737] [CDVTimer][backgroundgeolocation] 124.503970ms
2018-06-05 13:22:04.677452-0400 BG Example[6226:1734737] [CDVTimer][TotalPluginStartup] 132.636070ms
2018-06-05 13:22:06.331310-0400 BG Example[6226:1734737] Resetting plugins due to page load.
2018-06-05 13:22:07.092845-0400 BG Example[6226:1734737] Finished load of: file:///var/containers/Bundle/Application/D1361D84-FEF5-4D4E-9274-7DE0FA90058B/BG%20Example.app/www/index.html
2018-06-05 13:23:00.115821-0400 BG Example[6226:1734737] Status bar could not find cached time string image. Rendering in-process.
2018-06-05 13:24:00.024981-0400 BG Example[6226:1734737] Status bar could not find cached time string image. Rendering in-process.
2018-06-05 13:26:00.021501-0400 BG Example[6226:1734737] Status bar could not find cached time string image. Rendering in-process.

My config is:

Node version: v9.4.0

Cordova version: 8.0.0

Config.xml file: 

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.yml.bgexampleapp" version="2.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>BG Example</name>
    <description>
        A minimal example of Cordova BackgroundGeolocation plugin.
    </description>
    <author>
        mauron85
    </author>
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <allow-navigation href="http://192.168.0.103:8100" />
    <platform name="android">
        <content src="index.html" />
        <allow-intent href="market:*" />
        <hook src="scripts/res_android.js" type="after_prepare" />
        <icon density="ldpi" src="res/android/icon-36-ldpi.png" />
        <icon density="mdpi" src="res/android/icon-48-mdpi.png" />
        <icon density="hdpi" src="res/android/icon-72-hdpi.png" />
        <icon density="xhdpi" src="res/android/icon-96-xhdpi.png" />
        <icon density="xxhdpi" src="res/android/icon-144-xxhdpi.png" />
        <icon density="xxxhdpi" src="res/android/icon-192-xxxhdpi.png" />
    </platform>
    <platform name="ios">
        <content src="index.html" />
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="180" src="res/ios/icon-60-3x.png" width="180" />
        <icon height="60" src="res/ios/icon-60.png" width="60" />
        <icon height="120" src="res/ios/icon-60-2x.png" width="120" />
        <icon height="76" src="res/ios/icon-76.png" width="76" />
        <icon height="152" src="res/ios/icon-76-2x.png" width="152" />
        <icon height="40" src="res/ios/icon-40.png" width="40" />
        <icon height="80" src="res/ios/icon-40-2x.png" width="80" />
        <icon height="57" src="res/ios/icon.png" width="57" />
        <icon height="114" src="res/ios/icon-2x.png" width="114" />
        <icon height="72" src="res/ios/icon-72.png" width="72" />
        <icon height="144" src="res/ios/icon-72-2x.png" width="144" />
        <icon height="29" src="res/ios/icon-small.png" width="29" />
        <icon height="58" src="res/ios/icon-small-2x.png" width="58" />
        <icon height="50" src="res/ios/icon-50.png" width="50" />
        <icon height="100" src="res/ios/icon-50-2x.png" width="100" />
    </platform>
    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
    <plugin name="cordova-plugin-device" spec="^1.1.7" />
    <plugin name="cordova-plugin-mauron85-background-geolocation" spec="^3.0.0-alpha.37">
        <variable name="GOOGLE_PLAY_SERVICES_VERSION" value="11+" />
        <variable name="ANDROID_SUPPORT_LIBRARY_VERSION" value="26+" />
        <variable name="ICON" value="@mipmap/icon" />
        <variable name="SMALL_ICON" value="@mipmap/icon" />
        <variable name="ACCOUNT_NAME" value="@string/app_name" />
        <variable name="ACCOUNT_LABEL" value="@string/app_name" />
        <variable name="ACCOUNT_TYPE" value="$PACKAGE_NAME.account" />
        <variable name="CONTENT_AUTHORITY" value="$PACKAGE_NAME" />
    </plugin>
    <engine name="ios" spec="^4.5.4" />
    <engine name="android" spec="^7.1.0" />
</widget>


Plugins: 

cordova-plugin-device,cordova-plugin-mauron85-background-geolocation,cordova-plugin-whitelist

iOS platform:

Xcode 9.3.1
Build version 9E501

Any pointers as to what to try would be greatly appreciated. Thanks.

@mauron85
Copy link
Owner

mauron85 commented Jun 5, 2018

Try to debug in Safari. Usually all errors, warning are trapped in JS Console. That might help you to identify what is causing your issue. You can also post those logs here, so I can take a look and help maybe.

@Yermo
Copy link
Author

Yermo commented Jun 6, 2018

The only thing that shows up in the Javascript console on startup is:

[Error] TypeError: (0,o.default)(this.toolbarDefaultBg).darken(.2).hex is not a function. (In '(0,o.default)(this.toolbarDefaultBg).darken(.2).hex()', '(0,o.default)(this.toolbarDefaultBg).darken(.2).hex' is undefined)
	statusBarColor (app.js:1:4495)
	(anonymous function) (app.js:1:36520)
	fr (app.js:1:27090)
	(anonymous function) (app.js:1:36323)
	ll (app.js:1:52130)
	e (app.js:11:202065)
	(anonymous function) (app.js:11:202196)
	(anonymous function) (app.js:1:36518)
	fr (app.js:1:27090)
	(anonymous function) (app.js:1:36323)
	ll (app.js:1:52130)
	e (app.js:11:202065)
	default (app.js:11:202206)
	r (app.js:43:266060)
	(anonymous function) (app.js:11:87144)
	t (app.js:1:106)
	(anonymous function) (app.js:1:95329)
	t (app.js:1:106)
	(anonymous function) (app.js:11:313080)
	t (app.js:1:106)
	(anonymous function) (app.js:11:253284)
	t (app.js:1:106)
	(anonymous function) (app.js:1:453)
	Global Code (app.js:1:463)

@mauron85
Copy link
Owner

mauron85 commented Jun 6, 2018

I believe I've seen this error. Try delete node_modules and install dependencies from scratch.

EDIT: And also rebuild app.js (npm run build)

@juristr
Copy link

juristr commented Jun 25, 2018

@mauron85 getting the same but on Android (also deleting node_modules & re-installing etc..). I was mostly interested in trying out this demo example app in order to understand whether I could use the base lib to get around the 10m GPS accuracy issue ppl have been discussing over at Stackoverflow

@massisc
Copy link

massisc commented Jun 28, 2018

@mauron85 @juristr Debugging lead me to this issue GeekyAnts/NativeBase#1354

Which is basically bad dependencies installed. The npm version could be the problem. I'm using 5.6.0

Then I noticed you have a yarn.lock instead of a package-lock.json.

Using yarn install fixed the issue, I'd recommend updating the docs to use yarn install or add the package-lock.json

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

4 participants