Alpha Video Training
Results 1 to 19 of 19

Thread: Phonegap Build failing?

  1. #1
    Member
    Real Name
    Jan Jedrasik
    Join Date
    May 2017
    Posts
    69

    Default Phonegap Build failing?

    Hey everyone,

    For a while now I've had 0 issue building projects with phonegap, but it appears as of late, all my builds are failing, and I can't quite figure out why. I'm looking through the logs of the build and seeing this:

    Code:
    Subproject Path: CordovaLib
    Running command: /project/gradlew cdvBuildDebug -b /project/build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true
    The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
    	at build_dtfv34ozxsan19colc57gl3lg.run(/project/build.gradle:138)
    
    FAILURE: Build failed with an exception.
    
    * Where:
    Build file '/project/build.gradle' line: 253
    
    * What went wrong:
    A problem occurred evaluating root project 'project'.
    > Could not get unknown property 'GMS_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    BUILD FAILED
    
    Total time: 1.282 secs
    Command finished with error code 1: /project/gradlew cdvBuildDebug,-b,/project/build.gradle,-Dorg.gradle.daemon=true,-Dorg.gradle.jvmargs=-Xmx2048m,-Pandroid.useDeprecatedNdk=true
    Error: /project/gradlew: Command failed with exit code 1 Error output:
    FAILURE: Build failed with an exception.
    
    * Where:
    Build file '/project/build.gradle' line: 253
    
    * What went wrong:
    A problem occurred evaluating root project 'project'.
    > Could not get unknown property 'GMS_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
        at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
        at emitTwo (events.js:106:13)
        at ChildProcess.emit (events.js:191:7)
        at maybeClose (internal/child_process.js:877:16)
        at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
    While I can see what it's trying to say, I don't quite see how any of this is fixible inside alpha.
    Any help would be really appreciated

    Thanks!

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,541

    Default Re: Phonegap Build failing?

    There's a lot of information missing here... Alpha vesion/build, PGP Cli Version, PhoneGap Builder Version, Android Minimum SDK Version.

    PhoneGap Build goes through a flux of changes every few months which manages to really mess things up for a while. Things settle down... all is going well... and then they change things again. Kinda like Alpha actually.

    If you're using PhoneGap Version cli-7.0.1... try changing to cli-7.1.0.

  3. #3
    Member
    Real Name
    Jan Jedrasik
    Join Date
    May 2017
    Posts
    69

    Default Re: Phonegap Build failing?

    Hey David,

    Alpha version is Version 12.4.5.2, build 4770, addins build 5018
    CLI version is 6.5, i've tried 7.0.1 and 7.1.0 with no luck, same issue
    Minimum android version SDK is 19

    Not sure if this'll help. This is strange, I've never seen anything close to this before when using phonegap in alpha.

  4. #4
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,541

    Default Re: Phonegap Build failing?

    Which Plugins are you using?

  5. #5
    Member
    Real Name
    Jan Jedrasik
    Join Date
    May 2017
    Posts
    69

    Default Re: Phonegap Build failing?

    I found the issue actually, it seems to be that google analytics was the issue. Removing that plugin has fixed the issue.

  6. #6
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,046

    Default Re: Phonegap Build failing?

    I am suddenly having an issue with PGB tonight since updating to the latest release 5487_5217

    The error in Adobe says I need to disable PushWoosh but when I do I get a wierd error from AS
    pwoosh-error.JPG

    anyone else seeing this? Really is screwing me up right now as I have updated a component within my app.
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  7. #7
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,046

    Default Re: Phonegap Build failing?

    I created a NEW build, with new components. First build went fine. I went to create a new baseline build and got the same error message from AS. Is anyone else getting this error? I removed all plugins as a test but get the same thing. If I turned instant update OFF (it was on for the first build) I do not get the error.
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  8. #8
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,541

    Default Re: Phonegap Build failing?

    How did you disable PushWoosh? This sounds like a issue with your config.xml file... which is an extremely sensitive file. It also sounds like you're using the Instant Update feature.

    Does "created a NEW build" mean you created a new PhoneGap Build Project? That would have created a new config.xml file in it's current format and should be ok.
    Do you edit the config.xml file in any way other than through the Alpha PhoneGap builder?

  9. #9
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,541

    Default Re: Phonegap Build failing?

    I've confirmed the error you're seeing. It has nothing to do with Instant Update. And... you don't have to go through the process of submitting to PhoneGap Build.

    If I add the PushWoosh Plugin and Save... and then get back into the builder and uncheck the PushWoosh Plugin... and Save... I get the error you're reporting.

    I see this error in the latest official release 5487 and in the latest pre-release 5515.

    You should report this as a bug to Alpha.

    The issue is that you cannot remove the PushWoosh plugin using the builder. To work around this, edit your config.xml file outside of Alpha. Remove the PushWoosh plugin line and save the file. You should now be back to building normally.
    Last edited by Davidk; 12-12-2018 at 12:59 PM.

  10. #10
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,046

    Default Re: Phonegap Build failing?

    Thanks David!
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  11. #11
    Member Bob Moore's Avatar
    Real Name
    Robert Moore
    Join Date
    Jul 2003
    Location
    Boston, MA
    Posts
    439

    Default Re: Phonegap Build failing?

    That’s a bug in some old code that is only fired when the PushWoosh plugin is removed.
    Surprised it was just reported.
    Goes to show you how often someone adds the PushWoosh plugin and then removes it!

    Pushing update out now for inclusion in tomorrows’ pre-release build.

    Simple work around, remove the plugin install code from the project config.xml file.
    <plugin name="pushwoosh-pgb-plugin" source="npm" version="7.0.7" />

    If you indicated that you wanted support for beacons and geotags you also should remove this code as well.

    <gap:config-file platform="ios" parent="UIBackgroundModes" overwrite="true">
    <array>
    <string>location</string>
    </array>
    </gap:config-file>


    <gap:config-file platform="ios" parent="NSLocationAlwaysUsageDescription">
    <string>This app uses location services for use with push notifications.</string>
    </gap:config-file>
    Last edited by Bob Moore; 12-12-2018 at 12:36 PM.

  12. #12
    Member
    Real Name
    Rusty B
    Join Date
    Apr 2018
    Posts
    18

    Default Re: Phonegap Build failing?

    I've been having my PhoneGap builds failing every time I try to use Phonegap 8.0 (7.1 works fine). The message on PhoneGap is usually related to plug-ins, such as Whitelist or Toast. I tried unchecking these plug-ins, but they always seem to not allow me to uncheck them. I took your advice today and removed them from the config.xml file, and now I am getting errors on other plug-ins. I can continue removing plug-ins, or possibly modify the plug-in version in the config.xml file. I’m just not sure if this is normal behavior or if anyone else has had problems with PhoneGap 8.0. I have included the error message from PhoneGap below

    Error - Plugin error (you probably need to remove plugin files from your app): Fetching plugin "cordova-plugin-statusbar@2.4.2" via npm Installing "cordova-plugin-statusbar" at "2.4.2" for android Failed to install 'cordova-plugin-statusbar': Error: ENOENT: no such file or directory, open '/tmp/gimlet/33008880/3406862/www_android/AndroidManifest.xml' at Error (native) at Object.fs.openSync (fs.js:640:18) at Object.fs.readFileSync (fs.js:508:33) at Object.parseElementtreeSync (/tmp/gimlet/33008880/3406862/www_android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27) at new AndroidManifest (/tmp/gimlet/33008880/3406862/www_android/cordova/lib/AndroidManifest.js:29:20) at AndroidProject.getPackageName (/tmp/gimlet/33008880/3406862/www_android/cordova/lib/AndroidProject.js:99:12) at Api.addPlugin (/tmp/gimlet/33008880/3406862/www_android/cordova/Api.js:223:57) at handleInstall (/usr/local/lib/npm/lib/node_modules/pgb-plugman-151/node_modules/pgb-cordova-lib/src/plugman/install.js:594:10) at /usr/local/lib/npm/lib/node_modules/pgb-plugman-151/node_modules/pgb-cordova-lib/src/plugman/install.js:364:24 at _fulfilled (/usr/local/lib/npm/lib/node_modules/pgb-plugman-151/node_modules/q/q.js:787:54) ENOENT: no such file or directory, open '/tmp/gimlet/33008880/3406862/www_android/AndroidManifest.xml'

    Alpha Anywhere Version (Registered): 12
    Compiler: Microsoft C Compiler version 1914
    Build: 5487
    Addins: 5217

    Operating System: Microsoft Windows 10 Pro
    Last edited by RustyB; 12-13-2018 at 03:47 PM. Reason: For some reason my post was cut off

  13. #13
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,541

    Default Re: Phonegap Build failing?

    PhoneGap Build is a moving target of updates and incompatibilities between plugins and PhoneGap releases. Everything runs just fine for months, then a new PGB release comes out and all hell breaks loose with plugin versions.

    Using PhoneGap Version cli-8.0.0 I don't have any issues with Whitelist or Toast plugins... using these versions...

    Code:
    	<plugin name="cordova-plugin-whitelist" source="npm" version="1.3.3" />
    	<plugin name="cordova-plugin-x-toast" source="npm" version="2.6.0" />
    If you're using a current version of Alpha, but an older project... and therefore an older config.xml file, then that could be an issue with plugin versions. You could try renaming your config.xml file, and letting Alpha create a new config.xml for you. You'll need to add everything again, but it's a small price to pay to get a current config.xml file.

    Again, it may not be Whitelist or Toast causing the issue, but some other plugin. You've have to list the other plugins you're using and their versions.

  14. #14
    Member
    Real Name
    Rusty B
    Join Date
    Apr 2018
    Posts
    18

    Default Re: Phonegap Build failing?

    Yes, these are the versions of white list and toast that I am using. I tried it out in a brand new PhoneGap project and have gotten the same result.

  15. #15
    Member
    Real Name
    Rusty B
    Join Date
    Apr 2018
    Posts
    18

    Default Re: Phonegap Build failing?

    These are my current plug ins

    <plugin name="cordova-plugin-camera" source="npm" version="2.4.1" />
    <!-- cordova-plugin-camera support -->
    <edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
    <string>This app requires camera access to take pictures</string>
    </edit-config>
    <edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
    <string>This app requires photo library access to read photo library pictures</string>
    </edit-config>
    <edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
    <string>This app requires location access to geo-tag photos</string>
    </edit-config>
    <edit-config target="NSPhotoLibraryAddUsageDescription" file="*-Info.plist" mode="merge">
    <string>This app requires photo library write access to save pictures in the photo library</string>
    </edit-config>
    <!-- end cordova-plugin-camera support -->

    <plugin name="cordova-plugin-console" source="npm" version="1.1.0" />
    <plugin name="cordova-plugin-media-capture" source="npm" version="1.4.3" />
    <!-- cordova-plugin-media-capture support -->
    <edit-config target="NSMicrophoneUsageDescription" file="*-Info.plist" mode="merge">
    <string>This app requires access to the microphone for audio recording</string>
    </edit-config>
    <edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
    <string>This app requires camera access to take pictures</string>
    </edit-config>
    <edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
    <string>This app requires photo library access to read photo library pictures</string>
    </edit-config>
    <!-- end cordova-plugin-media-capture support -->

    <plugin name="cordova-plugin-device" source="npm" version="1.1.7" />
    <plugin name="cordova-plugin-file" source="npm" version="4.3.3" />
    <plugin name="cordova-plugin-file-transfer" source="npm" version="1.5.1" />
    <plugin name="cordova-plugin-geolocation" source="npm" version="2.4.3" />
    <!-- cordova-plugin-geolocation support -->
    <edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
    <string>This app requires access to your location for location based information</string>
    </edit-config>
    <!-- end cordova-plugin-geolocation support -->

    <plugin name="cordova-plugin-media" source="npm" version="3.0.1" />
    <!-- cordova-plugin-media support -->
    <edit-config target="NSMicrophoneUsageDescription" file="*-Info.plist" mode="merge">
    <string>This app requires access to the microphone for audio recording</string>
    </edit-config>
    <!-- end cordova-plugin-media support -->

    <plugin name="cordova-plugin-network-information" source="npm" version="1.3.4" />
    <plugin name="cordova-plugin-dialogs" source="npm" version="1.3.4" />
    <plugin name="cordova-plugin-splashscreen" source="npm" version="5.0.2" />
    <plugin name="cordova-plugin-keyboard" source="npm" />
    <plugin name="cordova-open" source="npm" />
    <plugin name="cordova-plugin-zip" source="npm" version="3.1.0" />
    <plugin spec="https://github.com/remoorejr/DocumentHandler.git" source="git" />
    <plugin name="cordova-plugin-file-opener2-base64" source="npm" />
    <plugin name="cordova-plugin-nativeaudio" source="npm" />
    <plugin name="cordova-plugin-spinnerdialog" source="npm" />
    <plugin name="cordova-sqlite-ext" source="npm" version="0.9.1" />

    <plugin name="cordova-plugin-statusbar" source="npm" version="2.4.2" />
    <plugin name="cordova-plugin-x-toast" source="npm" version="2.6.0" />
    <plugin name="cordova-plugin-whitelist" source="npm" version="1.3.3" />

  16. #16
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,541

    Default Re: Phonegap Build failing?

    It's this plugin that is killing the build...

    Code:
    <plugin name="cordova-sqlite-ext" source="npm" version="0.9.1" />
    Try this instead...

    Code:
    <plugin name="cordova-sqlite-evcore-extbuild-free" source="npm" version="0.9.9" />
    You'll need to test your sqlite code to ensure stuff still works.

    The issue is something do to with PhoneGap Build not supporting the "before_plugin_install" hook... which the current versions of cordova-sqlite-xxxx utilize. It also looks like cordova-sqlite-ext has been merged into cordova-sqlite-storage... but that really makes no difference because cordova-sqlite-storage uses the install hook as well.

  17. #17
    Member
    Real Name
    Rusty B
    Join Date
    Apr 2018
    Posts
    18

    Default Re: Phonegap Build failing?

    Thank you DavidK. I will try that out and see if it helps.

  18. #18
    Member
    Real Name
    Rusty B
    Join Date
    Apr 2018
    Posts
    18

    Default Re: Phonegap Build failing?

    Unfortunately, that didn't work for me David. I tried the plugin you mention. But for some reason I am unable to remove cordova-sqlite-ext. I have un-check the plugin. I check my config file before uploading to PhoneGap Build and it is not there. I even tried deleting my whole project from PhoneGap Build. But I continue to get the below error, and when I check my plugins on the PhoneGap website, cordova-sqlite-ext is still listed. Not sure how to get rid of it.

    Code:
    Error - Plugin error (you probably need to remove plugin files from your app): Fetching plugin "cordova-plugin-statusbar@2.4.2" via npm Installing "cordova-plugin-statusbar" at "2.4.2" for android Failed to install 'cordova-plugin-statusbar': Error: ENOENT: no such file or directory, open '/tmp/gimlet/25458240/3406862/www_android/AndroidManifest.xml' at Error (native) at Object.fs.openSync (fs.js:640:18) at Object.fs.readFileSync (fs.js:508:33) at Object.parseElementtreeSync (/tmp/gimlet/25458240/3406862/www_android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27) at new AndroidManifest (/tmp/gimlet/25458240/3406862/www_android/cordova/lib/AndroidManifest.js:29:20) at AndroidProject.getPackageName (/tmp/gimlet/25458240/3406862/www_android/cordova/lib/AndroidProject.js:99:12) at Api.addPlugin (/tmp/gimlet/25458240/3406862/www_android/cordova/Api.js:223:57) at handleInstall (/usr/local/lib/npm/lib/node_modules/pgb-plugman-151/node_modules/pgb-cordova-lib/src/plugman/install.js:594:10) at /usr/local/lib/npm/lib/node_modules/pgb-plugman-151/node_modules/pgb-cordova-lib/src/plugman/install.js:364:24 at _fulfilled (/usr/local/lib/npm/lib/node_modules/pgb-plugman-151/node_modules/q/q.js:787:54) ENOENT: no such file or directory, open '/tmp/gimlet/25458240/3406862/www_android/AndroidManifest.xml' - You can fix this here

  19. #19
    VAR
    Real Name
    Andy Meer
    Join Date
    Mar 2005
    Location
    Atherstone UK
    Posts
    452

    Default Re: Phonegap Build failing?

    Hi All

    I have also had problems but it stems from Phonegap not Alpha

    I have to review the build logs in Phonegap to find what was causing my problem most of mine came from this entry in the config.xml
    <plugin name="cordova-plugin-bazaar" source="npm" version="1.0.5" />

    Below is the reason phonegap give for the failed instals
    The most likely cause for this error is error is that you have included plugin javascript files in your app package, such as barcodescanner.js, GAPlugin.js, cdv-plugin-fb-connect.js, or any other plugin files such as the childbrowser assets directory.

    Previously we used pluginstall to install plugins, which would simply overwrite files in your app. However we recently migrated to plugman, which will not overwrite these files and instead fails. So make sure you remove them!
    Andy

Similar Threads

  1. PhoneGap Build no longer works in version 12.3 Build 2682
    By richardurban in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 07-07-2017, 12:03 AM
  2. Replies: 6
    Last Post: 09-02-2016, 04:40 PM
  3. phonegap build
    By jhaytko in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 12-24-2014, 11:46 AM
  4. Is Phonegap build down currently?
    By JPMPA in forum Mobile & Browser Applications
    Replies: 6
    Last Post: 05-08-2014, 06:13 PM
  5. Failing xbasic code from build 3629 to current and version 11
    By tom@statesidedata.com in forum Alpha Five Version 10 - Desktop Applications
    Replies: 11
    Last Post: 03-18-2013, 03:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •