chrisprice / phonegap-build

This project aims to provide a stand-alone Java API for communicating with the PhoneGap Build REST API and a Maven Plugin which makes use of the API to turn WAR projects into binaries for mobile platforms.
http://chrisprice.github.com/phonegap-build/phonegap-build-maven-plugin
Apache License 2.0
11 stars 18 forks source link

iOS key upload results in unusable key #14

Closed IngmarStein closed 11 years ago

IngmarStein commented 11 years ago

Hi,

I've set up iOS signing in the pom according to the documentation:

<phonegap-build.ios.server>digimob-ios-distribution-certificate</phonegap-build.ios.server>
<phonegap-build.ios.provision>phonegap-build/adhoc.mobileprovision</phonegap-build.ios.provision>

<plugin>
    <groupId>com.github.chrisprice</groupId>
    <artifactId>phonegap-build-maven-plugin</artifactId>
    <configuration>
        <iOsMobileProvision>${phonegap-build.ios.provision}</iOsMobileProvision>
        <androidSign>${phonegap-build.android.sign}</androidSign>
        <platforms>
            <platform>ios</platform>
            <platform>android</platform>
        </platforms>
    </configuration>
    <executions>
        <execution>
            <id>phonegap-build</id>
            <goals>
                <goal>clean</goal>
                <goal>build</goal>
            </goals>
        </execution>
    </executions>
</plugin>

My settings.xml contains

<server>
    <id>digimob-ios-distribution-certificate</id>
    <privateKey>${user.home}/key.p12</privateKey>
    <passphrase>…</passphrase> 
</server>

Uploading the key seems to work fine (it shows up as unlocked on build.phonegap.com):

DEBUG] Authenticating.
[INFO] AuthChallengeProcessor - -basic authentication scheme selected
[DEBUG] Requesting summary from cloud.
[DEBUG] Checking for existing app.
[DEBUG] Ensuring ios key exists if it is a target platform.
[DEBUG] Checking for existing ios key.
[DEBUG] Building iOS key upload request.
[DEBUG] iOS key not found, uploading.
[INFO] Storing new iOS key id 101446
[DEBUG] Ensuring android key exists if it is a target platform and Android signing is enabled.
[DEBUG] Building upload request.
[INFO] Starting upload.
[INFO] Storing new app id 575830
[INFO] Starting downloads.

However, the build fails with

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal com.github.chrisprice:phonegap-build-maven-plugin:0.0.6:build failed: Build error : can't convert nil into String
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: com.github.chrisprice.phonegapbuild.api.ApiException: Build error : can't convert nil into String
    at com.github.chrisprice.phonegapbuild.api.managers.AppsManagerImpl.downloadApp(AppsManagerImpl.java:119)
    at com.github.chrisprice.phonegapbuild.plugin.utils.AppDownloaderImpl.downloadArtifacts(AppDownloaderImpl.java:33)
    at com.github.chrisprice.phonegapbuild.plugin.BuildMojo.execute(BuildMojo.java:299)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    ... 20 more

And PhoneGap Build presents the dreaded "Oh geez. Your build failed." message. If I upload the very same certificate and profile using PhoneGap Build's website, the application builds just fine. Any idea what is wrong here?

chrisprice commented 11 years ago

No idea sorry, it looks like the server is responding with the "can't convert nil into String" message but a quick Google doesn't turn up any results from other people using the API (it appears to be a RoR message). All I can suggest is asking the PGB support what went wrong with the build?

IngmarStein commented 11 years ago

Ok, I found the issue: the name of the p12 file must not start with a dot…