Software Archive
Read-only legacy content
17061 Discussions

build failed with 3rd party plugin (2337)

Jaap_v_
New Contributor I
672 Views

I'm working on a cross platform application (android/iOS/WP8) with barcode scanning functionality using XDK.

But since the
deprecated plugin (com.phonegap.plugins.barcodescanner) doesn't seem to work on WP8 I wanted to try the new plugin which is available via this GIT link:

phonegap plugin add https://github.com/phonegap/phonegap-plugin-barcodescanner.git

XDK retrieved the plugin correctly and added this line in the XML's

This was added in the Windows8 / crosswalk XML's by XDK:

<intelxdk:plugin intelxdk:name="BarcodeScanner" intelxdk:value="phonegap-plugin-barcodescanner" intelxdk:version="4.0.1" intelxdk:checksum="ecc7de87" intelxdk:type="file"/>

But both Android Crosswalk and Crosswalk Windows 8 Build (WP8.1) are unable to build

Build Log (Android Crosswalk)

An error occurred while building the application. Verify your build assets are correct and try again.

Build Log (W8)

Building a Cordova 4.1.2 application.
The application name is EarlyBarcode
The package name is xdk.intel.blank.template
Plugin "Camera" (0.3.4) was installed.
Error: Plugin "BarcodeScanner" failed to install.

What am I doing wrong?

0 Kudos
10 Replies
Swati_S_Intel1
Employee
672 Views

Try using Intel XDK barcode scanner. It works well. https://software.intel.com/en-us/node/493036

0 Kudos
Jaap_v_
New Contributor I
672 Views

The problem is that I also need this app running on Windows Phone 8
The XDK barcode scanner is only compatible with iOS and Android, so that's why I need this 3rd party plugin.

0 Kudos
Алексей_Г_
672 Views

same problem here, any suggestions?

0 Kudos
PaulF_IntelCorp
Employee
672 Views

Note the README associated with that plugin states it needs PhoneGap 5.0 (which is equivalent to Cordova CLI 5.0). We currently only support Cordova CLI 4.1.2; we are working on a Cordova CLI 5.x build system, but it is not yet available.

For reference:

The README also states that older versions can use the "stale" version 2.0.1 of the plugin, which means that when you specify the plugin you need to add #2.0.1 to the git repo address. For example:

Please give this a try and see if it works. The version references inside the plugin.xml file are a bit inconsistent, so we need to trust the statements in the README file provided in the plugin. It is possible that some later versions will work, you'll have to try them to be sure. In general it is not good practice to use the "latest" version of a plugin as stored in the git repo, because that "master" branch can be updated at any time by the plugin author. It is better to specify a particular gitref for the plugin, to insure you a precise version of the plugin.

Note that this process is eased somewhat by the EA release plugin management system, which will be part of our next major release of the XDK.

0 Kudos
Алексей_Г_
672 Views

Thx, Paul, some of your comments was helpful:

- I changed CLI to 4.1.2 and import plugin through deprecated corodva id (com.phonegap.plugins.barcodescanner) not repo (https://github.com/phonegap/phonegap-plugin-barcodescanner.git#2.0.1)

Build was successful, i didnt test it yet, anyway this is progress. Thx again.

0 Kudos
Jaap_v_
New Contributor I
672 Views

Thanks Paul for the feedback.

But now I'm back to the "stale" 2.0.1 version, which does not work for me on WP8 when using EA.
(plugin works fine when building in EA for Android crosswalk and iOS)

When calling the cordova.plugins.barcodeScanner.scan action, the camera mode opens for a sec and the application quits.
I don't know who to address this issue to, is this related to XDK / plugin or just windows phone messing up?

@Алексей : Please let me know if this build works on an actual WP8 device for you.

0 Kudos
PaulF_IntelCorp
Employee
672 Views

@Jaap -- it sounds like you are building for Cordova WP8, which means you should be using the procedure outlined here: https://software.intel.com/en-us/forums/topic/563699 -- is that correct?

If that is correct, then my suspicion is that there is a problem with the Windows Phone 8 implementation of the plugin. The XDK builds a standard Cordova app, we are using standard Cordova for the build system, we do not modify or change the plugin code in any way. Unfortunately, Windows and Windows Phone apps are currently the hardest to debug.

You can use the weinre script on the Test tab to debug them. You cannot single-step, you need to setup your code so you can either print console.log messages and use the console to exercise functions and inspect variables.

See the following docs for hints on how to get started using weinre:

0 Kudos
Jaap_v_
New Contributor I
672 Views

@Paul

Correct I'm using the Cordova WP8 build which is available in the Early Access XDK as described in your link.

Thanks for the feedback on how to to debug on WP8, as you've mentioned it's so much more complex to sort out issues on windows phone.
Is there a change that we can debug on USB connected windows phone devices in the near future in XDK, like android / iOS?

For now I'll try the weinre script approach to track down issues on WP8 and address them to MS.

0 Kudos
John_H_Intel2
Employee
672 Views

FWIW ~

We do not have Cordova WP8 builds available in the XDK. If you are building for WP8, you are using the LEGACY builds which are completely different than the (not available in the XDK currently) Cordova WP8 builds.

0 Kudos
PaulF_IntelCorp
Employee
672 Views

@Jaap -- having USB debug is something that Microsoft has to provide hooks for. Today there are no such hooks for us to use. I have no idea if they are working on such a hook (they are aware of this deficiency), so we must wait to see what they do. If they do choose to provide such a hook I not expect to see it until Windows Phone 10 is released -- but I have no idea if such a feature will become available at that time.

0 Kudos
Reply