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
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: [ERROR] Cannot sign application - failed to find signing keys

And what about just a straight bbwp package (i.e. no -g)?


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
nathanpc
Posts: 134
Registered: ‎05-19-2012
My Device: Torch 9800, PlayBook 64GB, Dev Alpha

Re: [ERROR] Cannot sign application - failed to find signing keys

Interestingly enough that was without the -g argument.

If I helped you please click the "Like" button to support my work.
My apps: CherryNotes - Bookmarked - Requests
Social Me: about.me - Twitter
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: [ERROR] Cannot sign application - failed to find signing keys

Here are some recommendations from a colleague.

 

Try this on the terminal:
echo ${HOME}

Just to double check.

You aren't using sudo when signing right?

Or try this one on terminal, if it succeeded there's something wrong in the environment variable:
HOME=/Users/Nathan bbwp -g <signpass> <sourcedir> -o <outputDir>

I usually just add the bbwp dir and the dependencies/tools/bin dir to the PATH environment variable to make life easier (use terminal):

PATH=<wwsdkpath>:<wwsdkpath>/dependencies/tools/bin:$PATH
export PATH

After that you can use blackberry-signer and blackberry-deploy anywhere without changing dir.

There's a good idea of setting the HOME variable directly in the actual call, though at this point I'm fairly certain it's properly set.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: [ERROR] Cannot sign application - failed to find signing keys

That is indeed interesting. I don't see why it would be looking for code signing keys if that wasn't specified in the first place...

 

Would you happen to have time for a Skype (or I can set up an online meeting) so that we could do some screen sharing? If so, fire me an email to eoros@rim.com with a time tomorrow (Wednesday, December 5th) that might work for you or later this week if that works better?

 

That should give me time to round up a Mac / WebWorks guru to help guide us in person. As well, if you could request a new set of CSJ files just in case we need a new registration at some point, that would be ideal.

 

I'm hoping that if we sit down and walk through the process, something will stand out...


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
nathanpc
Posts: 134
Registered: ‎05-19-2012
My Device: Torch 9800, PlayBook 64GB, Dev Alpha

Re: [ERROR] Cannot sign application - failed to find signing keys

Sadly, here's the results: :smileysad:

Nathan-Camposs-MacBook-Pro:BBApp Nathan$ echo ${HOME}/Users/NathanNathan-Camposs-MacBook-Pro:BBApp Nathan$ HOME=/Users/NathanNathan-Camposs-MacBook-Pro:BBApp Nathan$ /Developer/SDKs/Research\ In\ Motion/BlackBerry\ WebWorks\ SDK\ for\ TabletOS\ 2.2.0.5/bbwp/bbwp build/BBApp.zip -g ******** -o build/
[INFO]      		Parsing command line options
[ERROR]     		Cannot sign application - failed to find signing keys
Nathan-Camposs-MacBook-Pro:BBApp Nathan$ PATH=/Developer/SDKs/Research\ In\ Motion/BlackBerry\ WebWorks\ SDK\ for\ TabletOS\ 2.2.0.5/bbwp:$PATHNathan-Camposs-MacBook-Pro:BBApp Nathan$ export PATH
Nathan-Camposs-MacBook-Pro:BBApp Nathan$ bbwp build/BBApp.zip -g ******** -o build/[INFO]      		Parsing command line options
[ERROR]     		Cannot sign application - failed to find signing keys
Nathan-Camposs-MacBook-Pro:BBApp Nathan$

 

If I helped you please click the "Like" button to support my work.
My apps: CherryNotes - Bookmarked - Requests
Social Me: about.me - Twitter
Developer
nathanpc
Posts: 134
Registered: ‎05-19-2012
My Device: Torch 9800, PlayBook 64GB, Dev Alpha

Re: [ERROR] Cannot sign application - failed to find signing keys

Just sent you an email about the methods and the time.
If I helped you please click the "Like" button to support my work.
My apps: CherryNotes - Bookmarked - Requests
Social Me: about.me - Twitter
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: [ERROR] Cannot sign application - failed to find signing keys

I had exectly the same problem

 

My stupid Mac installed everything in /Developer

 

The solution is actually quite easy

 

OSX is Linux-based but you run as a restricted privs user

 

Open a terminal

 

sudo su -l (your Mac pass is rqd)

 

You're now able to do anything

 

First thing to do...

 

cd /

/usr/libexec/locate.updatedb

 

This is a useful process (takes a while) as it indexes your drive - now you can find out where everything is

 

[I'll start typing again when update has finished - doing mine now <g>]

 

Now type ...

 

locate bbwp/bbwp

 

This will tell you where bbwp is if you don't know

 

Now create a text file with the following contents

 

#!/bin/bash

<path to bbwp>/bbwp $1.zip -d -v -gp12 <password> -gcsk <another password> -buildId $2

 

In the <path to> bit add a \ windows-style slash before every space

 

Save the file as bbuild

 

chmod 700 bbuild

mv bbuild /usr/bin

 

You can now build test.zip with a buildId of 123 using the following command

 

bbuild test 123

 

There's a similar script I use for installing stuff wirelessly

 

I use exactly the same build kit on Windoze (same script almost)

 

It's a good idea to create a directory for builds (I use /src/bars)

 

You HAVE to root yourself in order to use bbuild but it always works

 

Took me a day to fight through the code just to build the stupid build chains :smileysad:




Click the like button if you find my posts useful!
Developer
nathanpc
Posts: 134
Registered: ‎05-19-2012
My Device: Torch 9800, PlayBook 64GB, Dev Alpha

Re: [ERROR] Cannot sign application - failed to find signing keys

Thanks very very very much for your help 

Nathan-Camposs-MacBook-Pro:BBApp Nathan$ sudo /Developer/SDKs/Research\ In\ Motion/BlackBerry\ WebWorks\ SDK\ for\ TabletOS\ 2.2.0.5/bbwp/bbwp build/BBApp.zip -g ****** -o build/
[INFO]      		Parsing command line options
[ERROR]     		Cannot sign application - failed to find signing keys
Nathan-Camposs-MacBook-Pro:BBApp Nathan$

Then I started to separate things beginning with the compiler, which finally worked and haven't gave me that file not found error while trying to package everything:

Nathan-Camposs-MacBook-Pro:BBApp Nathan$ sudo /Developer/SDKs/Research\ In\ Motion/BlackBerry\ WebWorks\ SDK\ for\ TabletOS\ 2.2.0.5/bbwp/bbwp build/BBApp.zip -o build/
[INFO]      		Parsing command line options
[INFO]      		Parsing bbwp.properties
[INFO]      		Validating WebWorks archive
[INFO]      		Parsing config.xml 
[INFO]      		Populating application source
[INFO]      		Compiling WebWorks application
[INFO]      		Packaging the bar file
[INFO]      		Bar packaging complete
[INFO]      		WebWorks application packaging complete
Nathan-Camposs-MacBook-Pro:BBApp Nathan$

Since that worked I began to try signing which finally gave me a interesting error that led me to the solution:

Nathan-Camposs-MacBook-Pro:BBApp Nathan$ sudo /Developer/SDKs/Research\ In\ Motion/BlackBerry\ WebWorks\ SDK\ for\ TabletOS\ 2.2.0.5/bbwp/blackberry-tablet-sdk/bin/blackberry-signer -storepass ******* build/BBApp.bar

Error: Keystore load: /Users/Nathan/Library/Research In Motion/author.p12 (No such file or directory)
Nathan-Camposs-MacBook-Pro:BBApp Nathan$

So the first thing I did was move all the contents from ~/Research in Motion/ (where the SDK generated the signing files). After I did that I tried again and got this:

Nathan-Camposs-MacBook-Pro:BBApp Nathan$ sudo /Developer/SDKs/Research\ In\ Motion/BlackBerry\ WebWorks\ SDK\ for\ TabletOS\ 2.2.0.5/bbwp/blackberry-tablet-sdk/bin/blackberry-signer -storepass ******** build/BBApp.bar

Error: Code signing request failed because Application-Development-Mode in Manifest is present and is not set to [false].
Nathan-Camposs-MacBook-Pro:BBApp Nathan$

 That error was very interesting so I did a Google search and found this StackOverflow answer. So I generated a new certificate and got the same error as before, but this time when I ran the compiler BOOM it worked perfectly.

Nathan-Camposs-MacBook-Pro:BBApp Nathan$ sudo /Developer/SDKs/Research\ In\ Motion/BlackBerry\ WebWorks\ SDK\ for\ TabletOS\ 2.2.0.5/bbwp/bbwp build/BBApp.zip -g ******** -o build/
[INFO]      		Parsing command line options
[INFO]      		Parsing bbwp.properties
[INFO]      		Validating WebWorks archive
[INFO]      		Parsing config.xml 
[INFO]      		Populating application source
[INFO]      		Compiling WebWorks application
[INFO]      		Packaging the bar file
[INFO]      		Bar packaging complete
[INFO]      		Starting signing tool
[INFO]      		Signing complete
[INFO]      		WebWorks application packaging complete
Nathan-Camposs-MacBook-Pro:BBApp Nathan$

After that I transfered the bar file to my PlayBook and the app worked perfectly.

 

I want to thanks very much everyone that helped me with this and sorry for the long post, but I wanted to make this as detailed as possible so other users having the same issue could resolve it as I did. Again, thanks very much for everyone. :smileyhappy:

If I helped you please click the "Like" button to support my work.
My apps: CherryNotes - Bookmarked - Requests
Social Me: about.me - Twitter
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: [ERROR] Cannot sign application - failed to find signing keys

That was my next suggestion (keys)

 

Wanted to find out how my solution worked first as there have been a load of signing problems reported recently

 

Glad you got it sorted

 

I didn't even get a like :smileysad:




Click the like button if you find my posts useful!
Developer
nathanpc
Posts: 134
Registered: ‎05-19-2012
My Device: Torch 9800, PlayBook 64GB, Dev Alpha

Re: [ERROR] Cannot sign application - failed to find signing keys

Just liked your post. Sorry I was busy contacting oros via email to notify that it got resolved.
If I helped you please click the "Like" button to support my work.
My apps: CherryNotes - Bookmarked - Requests
Social Me: about.me - Twitter