10 Replies Latest reply on Apr 15, 2016 6:23 PM by Gary__F

    PG newer than 3.5.0 crashes on all devices!

    Gary__F Level 1

      Hi. When I update the PG version in config.xml to anything newer than 3.5.0 my app crashes on Android and iOS devices. My mobile says "Unfortunately <app name> has stopped." It doesn't even get as far as the splash screen.

       

      I've tried setting the config to every version right up to cli-6.0.0 but without any luck. Now that Google/Apple will shortly reject 3.5.0 apps I  need to work out what's gone wrong.

       

      Any suggestions please? Thanks in advance.

       

      Gary.

       

      BTW, I'm just using standard plugins and the PGB service.

      <gap:plugin name="org.apache.cordova.console" />

      <gap:plugin name="org.apache.cordova.device" />

      <gap:plugin name="org.apache.cordova.dialogs" />

      <gap:plugin name="org.apache.cordova.geolocation" />

      <gap:plugin name="org.apache.cordova.inappbrowser" />

      <gap:plugin name="org.apache.cordova.network-information" />

      <gap:plugin name="org.apache.cordova.vibration" />

      <gap:plugin name="org.apache.cordova.splashscreen" />

      <gap:plugin name="org.apache.cordova.device-orientation" />

        • 1. Re: PG newer than 3.5.0 crashes on all devices!
          ryanskihead Adobe Employee

          You should move your plugins to the new npm format, i.e.

           

          <plugin name="cordova-plugin-console" />

          <plugin name="cordova-plugin-device" />

          ...

           

          Helpful links:

          npm Plugins Are Now on PhoneGap Build!

          PhoneGap Build Documentation

          • 2. Re: PG newer than 3.5.0 crashes on all devices!
            Gary__F Level 1

            Thanks for the reply but the app still instantly crashes with the same error. I now have plugins listed as:

             

            <plugin name="cordova-plugin-console" />

            <plugin name="cordova-plugin-device" />

            <plugin name="cordova-plugin-dialogs" />

            <plugin name="cordova-plugin-geolocation" />

            <plugin name="cordova-plugin-inappbrowser" />

            <plugin name="cordova-plugin-network-information" />

            <plugin name="cordova-plugin-vibration" />

            <plugin name="cordova-plugin-splashscreen" />

            <plugin name="cordova-plugin-device-orientation" />

             

            Because I'm using PGB I don't need to use the syntax <gap:plugin ....> do I?

            Any other ideas please?

            • 3. Re: PG newer than 3.5.0 crashes on all devices!
              ryanskihead Adobe Employee

              crashes with the same error

               

              What's the error?

               

              Because I'm using PGB I don't need to use the syntax <gap:plugin ....> do I?


              No you don't need gap: -- the second link above explains a bit about the deprecated gap: prefix


              What's your App ID?

              • 4. Re: PG newer than 3.5.0 crashes on all devices!
                Gary__F Level 1

                There is no error code, it just says "Unfortunately <app name> has stopped" when I open the app. It's not very helpful I'm afraid.

                The app ID on PGB is 2017497. Please use the Android APK. The 3.5.0 version of the app is already published in the stores so I know my code is okay.

                Thanks, I really appreciate your help.

                • 5. Re: PG newer than 3.5.0 crashes on all devices!
                  kerrishotts Adobe Community Professional

                  An "adb logcat" or equivalent would probably help with diagnosing the problem. If you can't connect your device to a development machine that has the Android tools installed, there are some apps in the Google Play store that apparently let you see the device console.

                   

                  Also, perhaps share your entire config.xml. It might help us to pinpoint anything else that might be at issue.

                  • 6. Re: PG newer than 3.5.0 crashes on all devices!
                    Gary__F Level 1

                    Hi Kerri. I've pasted in an anonymized version of my config file. (I only changed app/company names, email, etc).

                    I searched Google Play for logcat viewers and it seems these apps need root access because they're only showing log events they've triggered themselves. I don't have a rooted device to try.

                     

                    <?xml version="1.0" encoding="UTF-8"?>

                      <widget xmlns = "http://www.w3.org/ns/widgets"

                      xmlns:gap = "http://phonegap.com/ns/1.0"

                      id        = "uk.companyname.appname"

                      versionCode="9"

                      version = "1.0.1">

                     

                      <name>My App Name</name>

                      <description>My desc of the app...</description>

                      <author href="http://www.companyname.co.uk" email="info@companyname.co.uk">

                      Company Name Ltd

                      </author>

                      <preference name="phonegap-version" value="cli-6.0.0" />

                      <preference name="orientation" value="default" />

                      <preference name="fullscreen" value="false" />

                      <preference name="target-device" value="universal" />

                      <preference name="webviewbounce" value="false" />

                      <preference name="prerendered-icon" value="true" />

                      <preference name="stay-in-webview" value="true" />

                      <preference name="ios-statusbarstyle" value="black-opaque" />

                      <preference name="detect-data-types" value="true" />

                      <preference name="exit-on-suspend" value="true" />

                      <preference name="show-splash-screen-spinner" value="true" />

                      <preference name="auto-hide-splash-screen" value="true" />

                      <preference name="EnableViewportScale" value="true" />

                      <preference name="MediaPlaybackRequiresUserAction" value="true" />

                      <preference name="AllowInlineMediaPlayback" value="true" />

                      <preference name="BackupWebStorage" value="cloud" />

                      <preference name="TopActivityIndicator" value="gray" />

                      <preference name="KeyboardDisplayRequiresUserAction" value="true" />

                      <preference name="HideKeyboardFormAccessoryBar" value="true" />

                      <preference name="android-windowSoftInputMode" value="stateAlwaysHidden|adjustResize" />

                      <preference name="KeyboardShrinksView" value="true" />

                      <preference name="SuppressesIncrementalRendering" value="true" />

                      <preference name="android-minSdkVersion" value="14" />

                      <preference name="android-installLocation" value="auto" />

                      <preference name="SplashScreenDelay" value="0" />

                      <preference name="BackgroundColor" value=""/>

                      <preference name="KeepRunning" value="true"/>

                      <preference name="DisallowOverscroll" value="true"/>

                      <preference name="LoadingDialog" value="Welcome!"/>

                      <preference name="LoadUrlTimeoutValue" value="20000" />

                      <preference name="disable-cursor" value="true" />

                     

                      <gap:platform name="ios" />

                      <gap:platform name="android" />

                     

                      <!-- Plugins -->

                      <plugin name="cordova-plugin-console" />

                      <plugin name="cordova-plugin-device" />

                      <plugin name="cordova-plugin-dialogs" />

                      <plugin name="cordova-plugin-geolocation" />

                      <plugin name="cordova-plugin-inappbrowser" />

                      <plugin name="cordova-plugin-network-information" />

                      <plugin name="cordova-plugin-vibration" />

                      <plugin name="cordova-plugin-splashscreen" />

                      <plugin name="cordova-plugin-device-orientation" />

                     

                      <icon src="icons/icon-57.png" gap:platform="ios" width="57" height="57" />

                      <icon src="icons/icon-72.png" gap:platform="ios" width="72" height="72" />

                      <icon src="icons/icon-76.png" gap:platform="ios" width="76" height="76" />

                      <icon src="icons/icon-120.png" gap:platform="ios" width="120" height="120" />

                      <icon src="icons/icon-144.png" gap:platform="ios" width="144" height="144" />

                      <icon src="icons/icon-152.png" gap:platform="ios" width="152" height="152" />

                      <icon src="icons/icon-36.png" gap:platform="android" gap:density="ldpi" />

                      <icon src="icons/icon-48.png" gap:platform="android" gap:density="mdpi" />

                      <icon src="icons/icon-72.png" gap:platform="android" gap:density="hdpi" />

                      <icon src="icons/icon-144.png" gap:platform="android" gap:density="xxhdpi" />

                      <icon src="icons/icon-62.png" gap:platform="winphone" />

                      <icon src="icons/icon-173.png" gap:platform="winphone" gap:role="background" />

                      <icon src="icons/icon-64.png" />

                     

                      <gap:splash src="splashscreens/splashscreen640x960.png" gap:platform="ios" width="640" height="960" />

                      <gap:splash src="splashscreens/splashscreen640x1136.png" gap:platform="ios" width="640" height="1136" />

                      <gap:splash src="splashscreens/splashscreen768x1024.png" gap:platform="ios" width="768" height="1024 " />

                      <gap:splash src="splashscreens/splashscreen480x800.png" gap:platform="android" gap:density="hdpi" />

                      <gap:splash src="splashscreens/splashscreen720x960.png" gap:platform="android" gap:density="xhdpi" />

                      <gap:splash src="splashscreens/splashscreen480x800.png" gap:platform="winphone" />

                      <gap:splash src="splash.png" />

                     

                      <access origin="*" />

                      </widget>

                     

                    Thanks!

                    • 7. Re: PG newer than 3.5.0 crashes on all devices!
                      ryanskihead Adobe Employee

                      Appears to be a bug on cordova-android caused by your empty BackgroundColor preference.

                       

                      <preference name="BackgroundColor" value=""/>

                       

                      Add a value there. Created a bug report. 

                       

                      Docs

                      • 8. Re: PG newer than 3.5.0 crashes on all devices!
                        Gary__F Level 1

                        THANK YOU! This solved the problem. Darn the empty string! ;-)

                         

                        Have I got anything else wrong because the app loads up but it doesn't have network access. Ajax calls to all servers are timed out.

                        I guessed the names of the new plugin format. Is this one the problem?

                        <plugin name="cordova-plugin-network-information" />

                         

                        Thanks. I owe you a virtual beer (or juice!).

                        • 9. Re: PG newer than 3.5.0 crashes on all devices!
                          ryanskihead Adobe Employee

                          You likely need cordova-plugin-whitelist.

                           

                          Make sure you have a look through the readme so you get your access set up correctly.

                          • 10. Re: PG newer than 3.5.0 crashes on all devices!
                            Gary__F Level 1

                            Thank you very much for your advice and support. Access problem solved.