03-25-2013 11:21 AM
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/documentati
I can sign using Momentics and Cascades without a problem.
I followed the Getting Started Guide for BlackBerry:
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 126.96.36.199\Framework\ext [zip] Building zip: D:\projects\phonegap\bb10\example\build\cordovaExa
mple.zip load-device: [exec] [exec] D:\projects\phonegap\bb10\example>"D:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 188.8.131.52\third_party\node\windows\node.exe" "D:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 184.108.40.206\lib\bbwp.js" D:\projects\phonegap\bb10\example\build\cordovaExa mple.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\cor dovaExample.bar
Solved! Go to Solution.
03-25-2013 02:35 PM
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.
03-25-2013 04:02 PM
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.
03-26-2013 06:49 AM - edited 03-26-2013 06:52 AM
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:
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.
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?
03-26-2013 08:59 AM
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.