CONFIRMED: PGB fails with cli-6.0.0 for winphone

  • 3
  • Idea
  • Updated 4 years ago
Today (Feb 10,2015) was the start of cli-6.0.0 as a build setting.
Early on there were several reported issues.
When ColinBau reported the issue, I asked him to confirmed his situation.

Source Code:
https://github.com/jessemonroy650/Phonegap--Generic-Boilerplate-for-cli-6.0.0

Build
https://build.phonegap.com/apps/1907350/share

Screens
cli-5.4.1 everything okay



cli-6.0.0 FAIL

Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes

Posted 4 years ago

  • 3
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
Commented on the above issues that needed it.
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Really sad, when a forum post at this support forum must be followed with a Tweet to get their attention. :-(
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
Looks like the new Windows platform doesn't like dashes in the `name` field in config.xml. Removing that fixed the build for me.

If you click the Log button on your failed build it will often shed light on what went wrong, if you're able to interpret the native compile logs.

Having a look at the other reported issues.
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Ryan,
Yes. Removing the dash in the 'name' field worked. I deleted the project in error and create a new one. It is here:

https://build.phonegap.com/apps/1908842/builds

This seems like a bogus requirement. I follow your suggestion to read the "error log". The error reporting seems bogus as well. It says "The 'Id' attribute is invalid". (See below) A developer would presume it means the 'id' in the header field, NOT the 'name' field.

This QUIRK should have a comment in two places.

http://docs.build.phonegap.com/en_US/configuring_basics.md.html#The%20Basics

and

http://docs.build.phonegap.com/en_US/configuring_basics.md.html#_platform_build_selection

Okay, we'll get the word out.

Thanks
Jesse


Build Date: 2016-02-11 21:19:05 +0000
--------------------------------------------------------------------------------
PLUGIN OUTPUT
--------------------------------------------------------------------------------
Building project: C:\project\CordovaApp.Phone.jsproj
Configuration : debug
Platform : anycpu
C:\project\build\phone\debug\anycpu\AppxManifest.xml(43,18): error APPX1404: File content does not conform to specified schema. The 'Id' attribute is invalid - The value 'Generic-Boilerplate8' is invalid according to its datatype 'http://schemas.microsoft.com/appx/201...' - The Pattern constraint failed. [C:\project\CordovaApp.Phone.jsproj]
Photo of ColinBau

ColinBau

  • 730 Posts
  • 18 Reply Likes
hi Ryan
just like Jesse said
Removing the dash in the 'name' field worked
but the fact is,this is impossible
let me show you a testing and very short config.xml

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="XXX" version="12345">
<name>TEST</name>
<gap:platform name="winphone" />
<preference name="phonegap-version" value="cli-6.0.0" />
</widget>


don't you see the "phonegap-version" attribute ?
it have the dash (-) in the 'name' field too (this just a example,in fact,a lot of different attribute have this symbol too)

so I think,this is not a solution way

another thing,click the Log button have no any help,because when I click it
it only show the line
Build Date: 2016-02-12 15:14:19 +0000
that's all
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
@colinbau its not an issue with the name attribute on the preference tag its, an issue with the <name></name> element because this field gets used in the Application Manifest's ID tag, and apparently these Windows builds don't accept a dash in the ID. For example the error log in this case showed:


C:\project\build\phone\debug\anycpu\AppxManifest.xml(43,18): error APPX1404: File content does not conform to specified schema. The 'Id' attribute is invalid - The value 'PhoneGapBuild-Tester' is invalid according to its datatype 'http://schemas.microsoft.com/appx/2010/manifest:ST_ApplicationId' - The Pattern constraint failed. [C:\project\CordovaApp.Phone.jsproj]


This is unrelated to the dash in phonegap-version.
Photo of ColinBau

ColinBau

  • 730 Posts
  • 18 Reply Likes
hi Ryan
but I really tried many times with my config.xml
for example...

case 1
no mater
<name>jQueryMobile for Cordova Edition</name>
OR
<name>jQueryMobileforCordovaEdition</name>
winphone always build fail with cli-6.0.0

case 2
if my config.xml have this line
<preference name="phonegap-version" value="cli-6.0.0" />
winphone will build fail
otherwise (I mean delete this line),build success
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Colin,
There were 5 people with issues.
1. mine was resolved by removing dash (-)
2. person decided to build local, the person responses no more
3. the other issue resolved by removing <feature> tag, which is now obsolete.
4. the other person forgot to add <platform name="wp8">

This only leaves you.

Jesse
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
@Jesse:
Careful when drawing conclusions though, Jesse!
Over the years, Colin has always posted detailed reports of true issues...and quite often, he was the first to report such problem.

@Colin: if your Winphone build fails, do you get the exact same message in the log as quoted by Ryan 13 hours ago? Does the log complain about
The 'Id' attribute is invalid - The value '....-....' is invalid according to its datatype
?
Or do you have another error (which might indicate that there is more than one issue with Winphone builds)?
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Petra,
Yes, thank you. I am not saying that Colin is wrong. I am only saying to Colin, "here are some other things you should try." I know if Colin has found an issue, it is very likely a bug, and also a nitche than lesser developers miss.

Cheers
Jesse
Photo of ColinBau

ColinBau

  • 730 Posts
  • 18 Reply Likes
hi @Ryan @Petra @Jesse
thanks you guys reply
let me explain once again [if could,please follow my step and try it yourself]

step 1
please download this zip file
http://www.littlebau.com/phonegap_bui...

step 2
you can uncompress this zip file or upload this zip file to your own "build.phonegap.com" directly

step 3
about after 6 seconds,winphone appear the build fail


step 4
if I click the "Log" button,it will only show one line


I found (only cli-6.0.0 have this issue,5.2.0 or 5.4.1 won't) and really tried many times
in the config.xml

step 1
if you delete this line
<preference name="phonegap-version" value="cli-6.0.0" />

step 2
let all files compress to a new zip and upload to "build.phonegap.com" again

step 3
this time you will found,winphone build success (I don't know why too,but this is the fact)
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Colin
Hmm.... I got it to build, but I replaced your config.xml with one of mine.
I'm going to work on yours to try to find the issue.

Jesse

Build Log & Error

Build Date: 2016-02-13 22:28:49 +0000
--------------------------------------------------------------------------------
PLUGIN OUTPUT
--------------------------------------------------------------------------------
Building project: C:\project\CordovaApp.Phone.jsproj
Configuration : debug
Platform : anycpu
package.phone.appxmanifest(25,6): error APPX3009: App manifest validation failed. Length of element '/Package/Properties/PublisherDisplayName' must be at least 1 character(s). [C:\project\CordovaApp.Phone.jsproj]
package.phone.appxmanifest(21,75): error APPX3019: App manifest validation failed. Value 'CN=' of attribute '/Package/Identity/@Publisher' is not a valid distingushed name. [C:\project\CordovaApp.Phone.jsproj]
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Colin,
Okay. Found this issue. You forgot to use the 'author' field.

If should look like this,

<author href="http://colinbau.com" email="colin@mail.com">Colin Bau</author>

I check the documentation. It is in the example, but not the text describing that section. I will file a bug report to get that fixed.

Good Job
Jesse
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@All,
okay I filed a bug report for the documentation issues.
For Config.xml missing documentation for elements field 'author' and 'name'

The three (3) major error are:

1) a dash (-) is not allowed in the <name> field for Windows. (There may be other requirements. I did not check)
2) the <author> element is required for Windows. (I double checked this. It is not required for Android or iOS.)
3) the <author> is listed in the example, but not describe in the documentation

Jesse
Photo of ColinBau

ColinBau

  • 730 Posts
  • 18 Reply Likes
thanks Jesse
hope these issue can solved as soon as possible
Photo of Marko

Marko

  • 24 Posts
  • 1 Reply Like
step 1
if you delete this line

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


doing this just makes it build as cli-5.2.0, so not a solution

I have no dashes in the name and the author is specified.
I have the same problem, none of the solutions work.
Any other suggestions?

Marko
Photo of ColinBau

ColinBau

  • 730 Posts
  • 18 Reply Likes
Please follow my config.xml and it will build success with windhone 4.3.0,of course I know this is not a solution,for now there is no solution
Photo of Marko

Marko

  • 24 Posts
  • 1 Reply Like
Do you mean:
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="XXX" version="6.0001">
<name>TEST</name>
<gap:platform name="winphone" />
<preference name="phonegap-version" value="cli-6.0.0" />
</widget>


and then remove the cli-6.0.0 line?
This will fall back to cli-5.2.0 ... and not build winphone 4.3.0... see your own screenshot.

Or did I miss something here?
I think I am staying with cli-5.4.1 for now until Phonegap Build is fixed.
Photo of ColinBau

ColinBau

  • 730 Posts
  • 18 Reply Likes
oh...I made a mistake
yes you can use 5.4.1 for now
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Marko,
5.4.1 is not officially listed, but it is available. If you still have issues, please let us know. And if you have an errorlog, please post it.
Jesse
Photo of Marko

Marko

  • 24 Posts
  • 1 Reply Like
@JesseMonroy650 The errorlog is a one-liner with "Build Date: 2016-02-18 06:49:10 +0000" or whatever time/date it is... nothing else;
The build fails...
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
Some of the <feature/> tags may be causing windows failures in the new version (cli-6.0.0). We're working this out but in the meantime as a solution you should be able to remove all of your feature tags -- they translate to permissions, and any permissions you need should be added implicitly by the plugins requiring them.
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
agree with Petra <feature> should be removed.
Photo of ColinBau

ColinBau

  • 730 Posts
  • 18 Reply Likes
agree +1
for now I have already remove all feature tag but still build fail
hope this problem can solve as soon as possible
https://github.com/phonegap/build/iss...
Photo of Marko

Marko

  • 24 Posts
  • 1 Reply Like
@ryan https://build.phonegap.com/apps/10093... Current upload is with the cli-6.0.0 setting.

@petra Thanks, I will check all the plugins and update if needed... the code is about a year old (with minor changes after that) and needs updating now because Google Play requires at least Cordova 4.1.1 (I think).
I know the problem is with winphone, but my code needs to work on all platforms; I don't want to maintain different versions per platform. And yes, using cli-5.2.0 would be enough too, but if 6.0.0 is available I'd rather go to the latest version.
Also; It needed those features in the config for certain functionality to work on all platforms. I will try without them later, but that requires some more testing.
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
@Marko your issue was an error with Publisher IDs that is now fixed (http://community.phonegap.com/nitobi/...)
Photo of Marko

Marko

  • 24 Posts
  • 1 Reply Like
@Ryan... Thank you!
I tried again and indeed, my problem is solved...
Photo of ColinBau

ColinBau

  • 730 Posts
  • 18 Reply Likes
hi @Ryan
after a few days review
the windows build still build error,but it appear different wrong message
my appid is 697726
these are my logs
https://justpaste.it/rmen

First of all,no matter what the above error is
after when I remove "cordova-plugin-vibration" and "phonegap-plugin-barcodescanner-ps" and "cordova-plugin-x-socialsharing"
the windows build appear another different wrong message again
https://justpaste.it/rmey

so...don't know how to fix this
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Colin
Both messages appear to be problems with the plugins.
Can you build successfully with the core plugins?

List of core plugins.

Jesse
Photo of ColinBau

ColinBau

  • 730 Posts
  • 18 Reply Likes
HI Jesse
but the...
"cordova-plugin-vibration" is already the core plugin
"phonegap-plugin-barcodescanner-ps" is the 3rd plugin
"cordova-plugin-x-socialsharing" is the 3rd plugin
you can see my first log
https://justpaste.it/rmen

and I did another test
if I delete all 3rd plugin but let core plugin still in my config.xml
it still appear the "cordova-plugin-vibration" log
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Colin,
Sorry I missed this. Are you still having an issue with Vibration? if so, can you try an earlier version of the plugin?

The blog says 2.1.0 is pinned to 6.0. But earlier version are: 2.0.0, 1.2.0, 1.1.0, and 1.0.0.

Jesse
Photo of ColinBau

ColinBau

  • 730 Posts
  • 18 Reply Likes
hi Jesse
I will jump to this topic
http://community.phonegap.com/nitobi/...
"cordova-plugin-vibration" is not the true reason to cause windows build fail
Photo of Anton Oosthuizen

Anton Oosthuizen

  • 12 Posts
  • 0 Reply Likes
Thanks Jesse

Removing cordova-plugin-vibration fixed my problem