Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
hendrik
Posts: 63
Registered: ‎09-10-2009
My Device: Z10, Bold 9700
My Carrier: O2 Germany
Accepted Solution

Signing error: "failed to find signing key file: author.p12"

I'm trying to set up PhoneGap for HTML5 development, but get a strange error message.

 

The author.p12, barsigner.csk and barsigner.db files are placed under C:\Users\[user]\AppData\Local\Research In Motion as explained in https://developer.blackberry.com/html5/documentation/signing_setup_bb10_apps_2008396_11.html

 

I can sign using Momentics and Cascades without a problem.

 

I followed the Getting Started Guide for BlackBerry:

http://docs.phonegap.com/en/2.5.0/guide_getting-started_blackberry_index.md.html#Getting%20Started%2...

 

I have entered qnx.bbwp.dir, qnx.sigtool.password, qnx.device.ip, qnx.device.password and qnx.device.pin in the project.properties files of the example project.

 

But when I type ant qnx load-device on the command prompt, I always get an error stating that the author.p12 file cannot be found. Do I have to copy the signing files anywhere else? Where is it looking for them?

 

qnx:

load-device:

generate-cod-name:
     [echo] Generated name: cordovaExample.bar

clean:
   [delete] Deleting directory D:\projects\phonegap\bb10\example\build

package-app:
    [mkdir] Created dir: D:\projects\phonegap\bb10\example\build\widget
     [copy] Copying 25 files to D:\projects\phonegap\bb10\example\build\widget
     [copy] Copying 3 files to D:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.4.11\Framework\ext
      [zip] Building zip: D:\projects\phonegap\bb10\example\build\cordovaExample.zip

load-device:
     [exec] 
     [exec] D:\projects\phonegap\bb10\example>"D:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.4.11\third_party\node\windows\node.exe" "D:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.4.11\lib\bbwp.js" D:\projects\phonegap\bb10\example\build\cordovaExample.zip -g [signing-password] -o D:\projects\phonegap\bb10\example\build -b 22 --loglevel error 
     [exec] [BUILD]   Populating application source
     [exec] [BUILD]   Parsing config.xml
     [exec] [ERROR]   Cannot sign application - failed to find signing key file: author.p12
     [exec] Error: File does not exist or not a file or cannot read: D:\projects\phonegap\bb10\example\build\device\cordovaExample.bar 

 

----

My Twitter: @hendrik_dev
Please use plain text.
Administrator
MSohm
Posts: 14,226
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Signing error: "failed to find signing key file: author.p12"

Does %HOMEPATH% on your computer map to your C:\Users\[user]\ directory?  You can just type that in the Run dialog to see where it goes.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 614
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: Signing error: "failed to find signing key file: author.p12"

Also,  which version of Java JDK are you running?  I've seen odd issues like this before when using the 64bit version. Make sure yo have the 32bit version only.

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
Developer
hendrik
Posts: 63
Registered: ‎09-10-2009
My Device: Z10, Bold 9700
My Carrier: O2 Germany

Re: Signing error: "failed to find signing key file: author.p12"

[ Edited ]

It's a 32bit JDK on a 32bit Windows 7.

 

I think the %HOMEPATH% variable could be the cause of the problem.

 

The environment variables are set by the Active Directory on my machine:

HOMEDRIVE=Y:
HOMEPATH=\
HOMESHARE=\\server\share\username

 

I think these are the correct settings when a remote network drive is configured for the user by the Active Directory.

 

Manually setting HOMEPATH to C:\Users\user doesn't work, neither as user or system variable.

I've even tried manually editing the registry under HKEY_CURRENT_USER\Volatile Environment, but the changes are not applied.

 

Then I tried the following in the command prompt:

setx HOMEPATH C:\Users\user
set HOMEPATH=C:\Users\user

Typing "echo %HOMEPATH%" shows the correct value afterwards.


However trying ant qnx load-device in the same command prompt still fails with the same error. The mapping also fails outside the command prompt when checking %HOMEPATH% in the Run dialog and it is also gone when opening a new command prompt, so it is definitely not applied system-wide.

 

Can I manually edit the location where the signing tool is looking for the key files somewhere?

 

----

My Twitter: @hendrik_dev
Please use plain text.
Developer
hendrik
Posts: 63
Registered: ‎09-10-2009
My Device: Z10, Bold 9700
My Carrier: O2 Germany

Re: Signing error: "failed to find signing key file: author.p12"

I finally got it working!

 

With Process Monitor for Windows I was able to find out where it was really looking for the signing key files.

 

Turns out it was looking for them on the remote network drive, although HOMEPATH is simply pointing to "/".

 

I've now copied the three files to a new folder \\server\share\username\AppData\Local\Research in Motion\. That did the trick for me.

----

My Twitter: @hendrik_dev
Please use plain text.