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
set OLDDIR=%CD%
cd C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.4.7\dependencies\tools\bin
REM cd c:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.2.0.5\bbwp\blackberry-tablet-sdk\bin
c:
call blackberry-debugtokenrequest -storepass xxx -devicepin 50209B1D d:\Dropbox\BB_Keys\debug_token_playbook.bar
call blackberry-deploy -installDebugToken d:\Dropbox\BB_Keys\debug_token_playbook.bar -device 169.254.219.125 -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 2.2.0.5. 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: http://supportforums.blackberry.com/t5/Testing-and-Deployment/Windows-8-Code-Signing/td-p/2014201

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: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Error-Code-signing-request-failed/td-p/1008911

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="blackberry.app" required="true" version="1.0.0.0"/>

See here for more infos: http://208.74.204.192/t5/Web-and-WebWorks-Development/How-to-Migrate-your-BlackBerry-WebWorks-application-from/ta-p/1988289

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-1.0.4.7.js"></script>

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

http://blogs.msdn.com/b/oldnewthing/archive/2005/01/28/362565.aspx

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

Leave a Reply

You must be logged in to post a comment.