Some little notes about BlackBerry debug token and stuff

Just stumbled upon:

The debug token of my Playbook was invalid and I had to renew it. Of course I have stored my BlackBerry keys (author.p12, barsigner.csk, barsigner.db) on a save place and I already wrote a handy little batch file to create and install the debug token:

REM Playbook
cd C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK\dependencies\tools\bin
REM cd c:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS\bbwp\blackberry-tablet-sdk\bin
call blackberry-debugtokenrequest -storepass xxx -devicepin 50209B1D d:\Dropbox\BB_Keys\
call blackberry-deploy -installDebugToken d:\Dropbox\BB_Keys\ -device -password yyy
chdir /d %OLDDIR% &rem restore current directory

But even if this whole setup worked for month before, it didn’t worked this time. The error I got was “Error: Not yet registered to request debug tokens”. This surprised me much as I was registered to request debug tokens and already did it successfully before with exactly the same command. So as always when BlackBerry puts some obstacles (here: confusing key magic) onto my developing road, ‘ve asked Google for help. Unfortunately not much help was discovered. Some suggest to reregister but I always fear of losing my publisher keys during this procedure.
After some thinking I found the solution: BlackBerry just disabled requesting debug token from old WebWorks SDK installations. As you can see in my script I used WebWorks SDK for TabletOS After switching to the BlackBerry 10 WebWorks SDK path I was able to request and receive my debug token.
tl;dr Don’t give a damn on error messages (as they are mostly completely misleading) but keep your dev environment updated.

Singing key for release is a copy of your author.p12 file renamed to sigtool.p12. You need to copy into the %SDK%/bbwp/bin folder.

[EDIT] Eventually you will run into another problem on Windows 8: you will be unable to sign your release build: “Error: Keystore load: C:\Users\…\Research In Motion\author.p12 (The system cannot find the file specified)”. I run into this and couldn’t find a solution. I dropped the whole Blackberry stuff for quite a while until recently my brother pointed me to this forum post about Windows 8 and signing keys:

You might also run into this error: “Error: Code signing request failed because Application-Development-Mode in Manifest is present and is not set to [false].” Solution sign your app during the build process, add -g password as command line argument. Read here about it:

When building webworks SDK apps for Blackberry 10 you will encounter some new blocks on the road. The blackberry object isn’t defined by default. You will need to manually include “a reference to webworks.js in your project. This file is located in the /Framework/clientFiles folder.” and add this feature into your config.xml

<feature id="" required="true" version=""/>

See here for more infos:

I had to copy the file into my local project folder and to add this into my index.html

<!-- load the webworks sdk -->
<script type="text/javascript" charset="utf-8" src="webworks-"></script>

And now to something completely different. Get and save your current working directory from a windows batch file:

Februar 28, 2013 · admin · No Comments
Posted in: Allgemein, Developing