08-07-2014 05:58 PM - edited 08-07-2014 06:02 PM
Our client is reporting when they try to start the app on their testing devices, they provided a screenshot where the following error message appears:
I searched for the error, I have found many post with people experiencing this issue and it's mentioned this is caused when the code sign process is faulty.
From what I understand, if the code signing process fails, then the app shouldn't be able to run on any device, but the ones we have have no problem running the app at all.
The app is built with BlackBerry SDK 6.0 and we have tested on both a BlackBerry 9360 with OS version 7.1 Bundle 2102 (v.184.108.40.2066, Platform 220.127.116.11) and a BlackBerry 9800 with OS 6.0 Bundle 1907 (v18.104.22.1688, Platform 22.214.171.124). Both devices can run the app. The client is testing on a BlackBerry 9900 7.1 bundle 1909 v126.96.36.1998 platform 188.8.131.525.
The client uses BlackBerry Desktop Software to install the app on their testing device.
What can cause for the app to run fine on our devices but not on the ones the client uses? Is the problem related to the code signing keys?
On my end I've installed the app through Eclipse (with the Eclipse's Debug As BlackBerry Device option and Eclipse's Load Project(s) on Device option) and BlackBerry Desktop Software, in every instance I've uninstalled the app or reinstalled it to see if that made any difference but we have no problem installing the app on the devices we have and running it. In every try the signature tool doesn't show any failed sign message.
What may be the cause? I'm lost as to why it works on our side but on theirs it fails to run.
08-08-2014 09:39 AM
I recommend trying to install the same cod files using the same method as your client. They likely have one that isn't signed. Note that Eclipse has multiple sets of COD files. There is a set for each version of SDK used to build the application and within that, there are 2 copies. One set that can be used for over the air installations through the browser and another that can be used with Desktop Manager or the BlackBerry Enterprise Server.
You can verify if the files they were sent are signed by opening them up in SignatureTool. It will list the signatures applied to the COD files.
08-08-2014 10:45 AM
I mentioned in my post that I tried with the BlackBerry Desktop Software and still I'm able to run the app with no problems.
When I package my project, the result is packed at PROJECT_FOLDER/deliverables/Standard/6.0.0, that's the route where the COD, CLS and CSO files are located, I ran the Signature Tool and the only stuff that doesn't get signed are the modules with SignerID as RCI or 3. I attach images showing the result from the Signature Tool.
The files we sent to the client are those located in the folder I mentioned earlier, even before sending those files our Quality Assurance personal test the app with these files.
I even tried to load the ALX file without the COD files on BlackBerry Desktop Software but a message is shown stating that cannot be done.
How can it be the client fails to run the app? Are there any possible scenarios I haven't tested yet? What could be the cause for their devices to fail to run the app but ours to run it fine?
08-08-2014 11:01 AM
Can you get an event log extracted from the device after they run the app and get that error? You can use javaloader to extract the event log:
javaloader -u eventlog > mylog.txt
That will show more details for this error.
08-08-2014 07:11 PM
We'll meet the client on Monday and test on their devices to see what's the issue, I'll try with the JavaLoader, is there anything I should keep in mind when going through it?
08-11-2014 09:13 AM
You'll see some log lines that say "... no sig from...". Those and the lines around it are the ones to look out for. Ignore any that say "no sig from 0x33", those are normal.
08-11-2014 05:58 PM
I went today with the client and the devices in which I reproduced the problem were the following:
Device 1: BlackBerry 9720 7.1 bundle 2839 v184.108.40.2066 platform 220.127.116.11
Device 2 BlackBerry 9900 7.1 bundle 1909 v18.104.22.1688 platform 22.214.171.1245
Device 3: BlackBerry 9860 7.1 bundle 1909 v126.96.36.1998 platform 188.8.131.525
First I tried with BlackBerry Desktop Software on one of their PCs, all three of their devices failed to run the application, every time displaying the same "module attempts to access a secure API" message. Then I tried on my work place laptop with my BlackBerry Desktop Software and all three failed to run the app. FInally I tried with a build I made with SDK 7 and the application was executed with no problem at all.
Unfortunately the laptop I had with me had troubles with the Java installation so it couldn't find the jar.exe to make the jar, a missing route in the PATH was the responsible, but couldn't fix that before I left the place due to time constraints.
I've read before that some times building and signing something on an earlier SDK version ignored modelues that were required for BlackBerry devices with more recent OS versions, so I speculate that might give a hint on the problem.
I'm gonna try to download the simulators for those devices and see if the issue can be reproduced on those.
I'll see when I can make another visit with a laptop with a proper development enviroment installation or at least ask for one of their devices to get a read at the log.
Does this information give any idea about what might be the cause here?
08-12-2014 10:19 AM
Building and signing with an SDK that has a lower version than the device software should be fine. Going the other way doesn't work. I'm interested to hear your results with the simulator. In case you need them, here are the instructions for enabling device security in the simulator (if this isn't enabled signature checks are ignored).
08-12-2014 12:54 PM
Yeah I know, apps built with SDK 6 should be able to run on devices with OS 7.x, we have no problem with either of our devices but for the client to be unable to do it is odd.
I don't remember where I read it but I came across a post stating that sometimes some modules that are ignored in earlier versions are required on newer, I don't know how much truth that statement holds, does anybody know something about it?
I'll make room to test tomorrow on the simulators, M Sohm thanks for providing information on how to enable security on simulator.
08-12-2014 01:02 PM
This may have been what you read... The SDK applies only the signatures required by the application. But if you happen to have an application that uses a custom library, which uses APIs that require signing by key X, but the application doesn't use any API that requires key X the application may not be signed by key X. Then when the application tries to use the library, which calls that method requiring key X it'll fail with the not signed message. If the library is built in the same workspace as the application this is usually avoided. It's more a concern when they are built separately.
However, I don't think this should be the case here since the screenshot showed your COD files signed by all 3 keys.