12 Replies Latest reply on Sep 30, 2016 2:27 AM by amandam9043135

    Build stop after plugin installation

    amandam9043135

      I've some trouble with my android build. My build is failing but I can't see any reason why it's failing.

      the log always stop after plugins installation. I tried several test.

      I changed the plugins syntax on my config files, i try to remove plugin from config, but the build is still failing.

       

       

      (sorry for my english )

       

      this is my config file :

       

       

      <?xml version='1.0' encoding='utf-8'?>
      <widget id="com.exaprint.fr.exaprint" ios-CFBundleIdentifier="com.exaprint.fr.exaprint" android-packageName="com.exaprint.fr.exaprint" version="3.2.5" android-versionCode="30020508" defaultlocale="fr"  xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

        <name>MyApp</name>

        <description>

        A sample Apache Cordova application that responds to the deviceready event.

        </description>

        <author email="dev@cordova.apache.org" href="http://cordova.io">

        Apache Cordova Team

        </author>

        <engine name="android" spec="4.0.0" />

        <engine name="ios" spec="3.9.1" />

        <engine name="windows" spec="3.8.1" />

        <engine name="wp8" spec="3.8.0" />

        <preference name='phonegap-version' value='cli-6.3.0' />

        <preference name="Fullscreen" value="True" />

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

        <preference name="ShowTitle" value="False" />

        <preference name="InAppBrowserStorageEnabled" value="False" />

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

        <preference name="Orientation" value="portrait" />

        <preference name="SplashScreen" value="screen" />

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

        <preference name="splash-screen-duration" value="4000" />

       

        <content src="index.html" />

        <plugin name="cordova-plugin-whitelist" version="1.0.0" />

        <plugin name="cordova-plugin-splashscreen" version="2.1.0" source="npm"  />

        <plugin name="cordova-plugin-inappbrowser" spec="https://github.com/apache/cordova-plugin-inappbrowser.git" />

        <plugin name="cordova-plugin-websql" version="1.0.0" spec="https://github.com/MSOpenTech/cordova-plugin-websql.git"/>

        <plugin name="com.pushwoosh.plugins.pushwoosh" spec="https://github.com/Pushwoosh/pushwoosh-phonegap-3.0-plugin.git" version="3.6.9" />

        <plugin name="cordova-plugin-network-information" spec="https://github.com/apache/cordova-plugin-network-information.git"/>

        <plugin name="cordova-plugin-keyboard" spec="https://github.com/driftyco/ionic-plugins-keyboard.git"/>

        <plugin name="cordova-plugin-fullscreen" spec="https://github.com/mesmotronic/cordova-plugin-fullscreen.git"/>

        <plugin name="cordova-plugin-apprate" version="1.2" spec="https://github.com/pushandplay/cordova-plugin-apprate.git" />

        <access origin="*" browserOnly="true" />

        <access origin="*.pushwoosh.com" />

        <access origin="tel:*" launch-external="yes"/>

        <access origin="mailto:*" launch-external="yes"/>

        <allow-navigation href="*" />

        <allow-intent href="*" />

        <allow-intent href="http://*/*" />

        <allow-intent href="https://*/*" />

        <allow-intent href="tel:*" />

        <allow-intent href="sms:*" />

        <allow-intent href="mailto:*" />

        <allow-intent href="geo:*" />

        <platform name="android">

        <preference name="permissions" value="none"/>

        <preference name="android-build-tool" value="gradle" />

        <allow-intent href="market:*" />

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

        <preference content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, target-densitydpi=device-dpi" name="viewport" />

        <icon density="ldpi" src="res/android/icon/drawable-ldpi-icon.png" />

        <icon density="mdpi" src="res/android/icon/drawable-mdpi-icon.png" />

        <icon density="hdpi" src="res/android/icon/drawable-hdpi-icon.png" />

        <icon density="xhdpi" src="res/android/icon/drawable-xhdpi-icon.png" />

        <icon density="xxhdpi" src="res/android/icon/drawable-xxhdpi-icon.png" />

        <icon density="xxxhdpi" src="res/android/icon/drawable-xxxhdpi-icon.png" />

        <splash density="ldpi" src="res/android/splash/fr/drawable-port-ldpi-screen.png" />

        <splash density="mdpi" src="res/android/splash/fr/drawable-port-mdpi-screen.png" />

        <splash density="hdpi" src="res/android/splash/fr/drawable-port-hdpi-screen.png" />

        <splash density="xhdpi" src="res/android/splash/fr/drawable-port-xhdpi-screen.png" />

        <splash density="xxhdpi" src="res/android/splash/fr/drawable-port-xxhdpi-screen.png" />

        <splash density="xxxhdpi" src="res/android/splash/fr/drawable-port-xxxhdpi-screen.png" />

        </platform>

        <platform name="ios">

        <preference name="Orientation" value="portrait" />

        <allow-intent href="itms:*" />

        <allow-intent href="itms-apps:*" />

        <icon height="57" src="res/ios/icon/icon.png" width="57" />

        <icon height="114" src="res/ios/icon/icon@2x.png" width="114" />

        <icon height="40" src="res/ios/icon/icon-40.png" width="40" />

        <icon height="80" src="res/ios/icon/icon-40@2x.png" width="80" />

        <icon height="50" src="res/ios/icon/icon-50.png" width="50" />

        <icon height="100" src="res/ios/icon/icon-50@2x.png" width="100" />

        <icon height="60" src="res/ios/icon/icon-60.png" width="60" />

        <icon height="120" src="res/ios/icon/icon-60@2x.png" width="120" />

        <icon height="180" src="res/ios/icon/icon-60@3x.png" width="180" />

        <icon height="72" src="res/ios/icon/icon-72.png" width="72" />

        <icon height="144" src="res/ios/icon/icon-72@2x.png" width="144" />

        <icon height="76" src="res/ios/icon/icon-76.png" width="76" />

        <icon height="152" src="res/ios/icon/icon-76@2x.png" width="152" />

        <icon height="29" src="res/ios/icon/icon-small.png" width="29" />

        <icon height="58" src="res/ios/icon/icon-small@2x.png" width="58" />

        <icon height="87" src="res/ios/icon/icon-small@3x.png" width="87" />

        <splash height="1136" src="res/ios/splash/Default-568h@2x~iphone.png" width="640" />

        <splash height="1334" src="res/ios/splash/Default-667h.png" width="750" />

        <splash height="2208" src="res/ios/splash/Default-736h.png" width="1242" />

        <splash height="2048" src="res/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />

        <splash height="1024" src="res/ios/splash/Default-Portrait~ipad.png" width="768" />

        <splash height="960" src="res/ios/splash/Default@2x~iphone.png" width="640" />

        <splash height="480" src="res/ios/splash/Default~iphone.png" width="320" />

        </platform>

      </widget>

       

        • 1. Re: Build stop after plugin installation
          VectorP Level 4

          Several issues.

           

          1. You should not have android-versionCode="30020508" as an attribute of widget. It's a preference name.

          2. You should have no 'engine' elements

          3. You should pick either one from

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

            <preference name="splash-screen-duration" value="4000" />

          4. You are pinning ancient versions of several plugins. I suggest removing the spec attribute altogether, although others prefer pinning some (latest) version.

          5. This has nothing to do with config. It should be in your meta viewport html element.

          <preference content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, target-densitydpi=device-dpi" name="viewport" />

          • 2. Re: Build stop after plugin installation
            amandam9043135 Level 1

            Hi VectorP,

            Thanks for your reply. I tried to modify my config file with your suggestions. But I have the same issues with my build.

            I tried with an empty config file and I've no error in my log. Just : PLUGIN OUTPUT.

             

            I realy don't understand why the build failed.

            • 3. Re: Build stop after plugin installation
              VectorP Level 4

              Please, show your modified config.

              Also, please show the full build log, preferable by uploading it to some webspace and posting the url here.

              • 4. Re: Build stop after plugin installation
                amandam9043135 Level 1

                this is the new config file : [XML] config.xml

                 

                the log : log.txt

                • 5. Re: Build stop after plugin installation
                  VectorP Level 4

                  OK. After the plugin fetch-and-install, the Builder should start Gradle to perform several tasks. This is apparently not happening.

                  I would guess that there are only two possible causes:

                  - the last installed plugin prevents the process from continuing

                  - the Gradle process got stuck.

                   

                  In order to test the former, you could - for test purposes - remove the git sourced plugins from config and rebuild. See if the process completes now

                  In order to change the latter, I would set a higher minSdkVersion and targetSdkVersion for Android. With min=15 and target>=16, I would expect Gradle to have no problems.

                   

                  BTW: since you are using Gradle, you must include a preference for android-versionCode, otherwise PGB will quickly increase the versioncodeby large intervals.

                  BTW2: you should stick to the use of caps as described in the PGB docs. For instance, the name of the preference is 'orientation', not 'Orientation'.

                  • 6. Re: Build stop after plugin installation
                    amandam9043135 Level 1

                    I'made a local build using cordova and my build succed regardless of the config file. But when i used the online build the build failed (as you see in the log file).

                    i tried without plugin, without git sourced plugins, witout anything in config file (and when I say anything, i use a blank file as config file) and I have no error message with online build.

                     

                    15 days ago my build succed online without any of the modifcation you suggest, so why now it's failed ? 

                    • 7. Re: Build stop after plugin installation
                      VectorP Level 4

                      I'made a local build using cordova and my build succed regardless of the config file.

                      What?!

                      In that case, whatever you are feeding to PGB is simply not what it expects. Most likely, your directory structure is wrong (e.g. index and config in different directories) or you are uploading a Cordova project.

                       

                      Could you please make your zip file available online and post its url here?

                      • 8. Re: Build stop after plugin installation
                        amandam9043135 Level 1

                        Sorry but I can't send the sources.

                        When I say that my build succed regardless of the config file : I mean that without the modification that you suggest my build succed. I know that many thing could or should be improve.

                        But I do not think that's the reason for the failure of the remote build comes from the syntax of a preference tag.

                         

                        It's strange for me that the process stop just after plugins installation (And as I previously says, i tried without any plugins and the build stop exactly at the same point).

                         

                        If graddle is stuck, why are they no message ? And why my local build succed ?

                        • 9. Re: Build stop after plugin installation
                          VectorP Level 4

                          If graddle is stuck, why are they no message ?

                          Because it's stuck and can't send a message anymore, for instance.

                           

                           

                          And why my local build succed ?

                          Because local builds require a specific directory structure and file naming. PGB has different requirements. People visit this forum on a daily basis, because they have difficulties understanding the differences.

                          That's why I offered looking into your zip file. It might be structured wrongly, or you may have included files that PGB doesn't like.

                           

                          Sorry but I can't send the sources.

                          Then I can't have a look.

                          Post your app ID, then wait for PGB Support to have a look. Might take a while.

                          BTW: are you aware that anyone can see your sources, once the app is published?

                          • 10. Re: Build stop after plugin installation
                            amandam9043135 Level 1

                            this is my appId : 919881

                             

                             

                            Because local builds require a specific directory structure and file naming. PGB has different requirements.

                            I know that, But I didn't change the file naming or anything and 15 day ago my build succed localy and with PGB. I just change somme JS file like typo issues.

                             

                            Because it's stuck and can't send a message anymore, for instance.

                            I understand that, but why are they no error message when the config file is just a blank file without any tag ? PGB must be send an error in that case, and not juste send a blank log file with only :

                             

                            PLUGIN OUTPUT

                             

                            BTW: are you aware that anyone can see your sources, once the app is published?

                            I know that but it's different for a lawyer to send sources at someone and be accesible once app is published.

                            • 11. Re: Build stop after plugin installation
                              kerrishotts Adobe Community Professional

                              If you are building locally, then you will need to make changes to your project structure in order for the build to succeed correctly on PGB. In short, your config.xml and index.html need to be in the SAME directory (local builds have config.xml in index.html's parent). Of course, this changes any paths you might be using. Unfortunately there's no great way to switch between local and PGB at the moment.

                               

                              (And speaking of which -- if you're building locally, why use PGB?)

                               

                              As to why the log file isn't complete, if a process hangs, there's no way to complete the log file. Which means the file will be incomplete. My guess is that the build process is hung and no longer writing output. But that's just a guess.

                               

                              Regarding the source code of your app: huh? The distinction between a lawyer sending source vs publishing an app with same said source seems strange to me.

                               

                              Finally: worst-case, you might simply try deleting the app on PGB and creating a new one. It shouldn't make a difference, but sometimes it does.

                              • 12. Re: Build stop after plugin installation
                                amandam9043135 Level 1

                                Thanks a lot for your response. It's working now. My script transposing cordova directory structure in phonegap structure had a bug. The config file was not correctly import in the www directory.