6 Replies Latest reply on Feb 13, 2017 2:43 PM by nialle87056827

    Phonegap Build is not loading plugins for windows phone cli-5.4.1

    petrij4934675

      Hello,

       

      I'm trying to build my app for winphone cli-5.4.1:

      <platform name="winphone">
          <preference name="phonegap-version" value="cli-5.4.1" />
          <preference name="windows-appx-target" value="8.1-phone" />
          <preference name="windows-arch" value="anycpu" />
          <preference name="windows-identity-name" value="MyIdentity" />
      </platform>
      

       

      Seems like the Phonegap Build is not loading plugins for windows phone correctly right now. My app used to work perfectly like two weeks ago, but now when I debug my app, I can see that the navigator object is almost empty and my app crashes in navigator.globalization.getLocaleName, because the globalization object is undefined.

      navigator: {"app":{}}
      

       

      Also, when I extract the generated xap the only plugin I can see is cordova-plugin-dialogs. These are the plugins I have in my config.xml:

      <plugin name="cordova-plugin-device" spec="~1.1.3" />
      <plugin name="cordova-plugin-dialogs" spec="~1.3.0" />
      <plugin name="cordova-plugin-globalization" spec="~1.0.4" />
      <plugin name="cordova-plugin-inappbrowser" spec="~1.5.0" />
      <plugin name="cordova-plugin-network-information" spec="~1.3.0" />
      <plugin name="cordova-plugin-vibration" spec="~2.1.2" />
      <plugin name="cordova-plugin-splashscreen" spec="~4.0.0" />
      <plugin name="cordova-plugin-statusbar" spec="~2.2.0" />
      <plugin name="cordova-plugin-whitelist" spec="~1.3.0" />
      <plugin name="cordova-plugin-app-version" spec="~0.1.9" />
      <plugin name="cordova-plugin-uniquedeviceid" spec="~1.3.2" />
      <plugin name="ubt-cordova-keychain" spec="~1.0.0" />
      

       

       

      I also checked out the build log, and sometimes (not every time) there are errors like "Error loading cordova-wp8" but it still says "Build succeeded." and I can download the xap. Like this:

      Fetching plugin "cordova-plugin-device@~1.1.3" via npm
      Installing "cordova-plugin-device" at "1.1.4" for wp8
      Error loading cordova-wp8
      Fetching plugin "cordova-plugin-dialogs@~1.3.0" via npm
      Installing "cordova-plugin-dialogs" at "1.3.1" for wp8
      Error loading cordova-wp8
      Fetching plugin "cordova-plugin-globalization@~1.0.4" via npm
      Installing "cordova-plugin-globalization" at "1.0.5" for wp8
      Error loading cordova-wp8
      Fetching plugin "cordova-plugin-inappbrowser@~1.5.0" via npm
      Installing "cordova-plugin-inappbrowser" at "1.5.0" for wp8
      Error loading cordova-wp8
      Fetching plugin "cordova-plugin-network-information@~1.3.0" via npm
      Installing "cordova-plugin-network-information" at "1.3.1" for wp8
      Error loading cordova-wp8
      Fetching plugin "cordova-plugin-vibration@~2.1.2" via npm
      Installing "cordova-plugin-vibration" at "2.1.3" for wp8
      Error loading cordova-wp8
      // etc.
      // ...
      Build succeeded.
      

       

      The result is the same whether or not there are erros; my wp app crashes. Android and iOS apps work just fine.

       

      Has something changed recently or what's going on? I have tried to use older version of the plugins but didn't help at all.