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

Java Development

Reply
Highlighted
New Developer
Posts: 8
Registered: ‎06-27-2014
My Device: BlackBerry 9360
My Carrier: Movistar

Error APPNAME module attempts to access a secure API when trying to start BlackBerry app on some devices

[ Edited ]

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:

code sign error.jpg

 

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.7.1.0.746, Platform 9.6.0.112) and a BlackBerry 9800 with OS 6.0 Bundle 1907 (v6.0.0.448, Platform 6.4.0.210). Both devices can run the app. The client is testing on a BlackBerry 9900 7.1 bundle 1909 v7.1.0.658 platform 5.1.0.485.

 

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.

BlackBerry Development Advisor
Posts: 15,698
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Error APPNAME module attempts to access a secure API when trying to start BlackBerry app on some devices

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.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 8
Registered: ‎06-27-2014
My Device: BlackBerry 9360
My Carrier: Movistar

Re: Error APPNAME module attempts to access a secure API when trying to start BlackBerry app on some devices

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?

 

 

 

BlackBerry Development Advisor
Posts: 15,698
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Error APPNAME module attempts to access a secure API when trying to start BlackBerry app on some devices

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.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 8
Registered: ‎06-27-2014
My Device: BlackBerry 9360
My Carrier: Movistar

Re: Error APPNAME module attempts to access a secure API when trying to start BlackBerry app on some devices

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?

 

 

BlackBerry Development Advisor
Posts: 15,698
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Error APPNAME module attempts to access a secure API when trying to start BlackBerry app on some devices

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.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 8
Registered: ‎06-27-2014
My Device: BlackBerry 9360
My Carrier: Movistar

Re: Error APPNAME module attempts to access a secure API when trying to start BlackBerry app on some devices

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 v7.1.0.1046 platform 9.105.0.16

 

Device 2 BlackBerry 9900 7.1 bundle 1909 v7.1.0.658 platform 5.1.0.485 

 

Device 3: BlackBerry 9860 7.1 bundle 1909 v7.1.0.658 platform 5.1.0.485 

 

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?

BlackBerry Development Advisor
Posts: 15,698
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Error APPNAME module attempts to access a secure API when trying to start BlackBerry app on some devices

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).

 

How to Enable Device Security in the BlackBerry Smartphone Simulator

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 8
Registered: ‎06-27-2014
My Device: BlackBerry 9360
My Carrier: Movistar

Re: Error APPNAME module attempts to access a secure API when trying to start BlackBerry app on some devices

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.

BlackBerry Development Advisor
Posts: 15,698
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Error APPNAME module attempts to access a secure API when trying to start BlackBerry app on some devices

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.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker