12-14-2011 09:46 AM
Hello,
I have published application to the app world some days ago.
But It seems that some users can't install it.
ERROR: "module attempts to access secure API."
I'm sure that my application was signed. Also it was approved by RIM.
I have the same situation as
http://supportforums.blackberry.com/t5/Java-Develo
What is the best way to fix it? Is it official Blackberry bug?
Thanks.
Solved! Go to Solution.
12-14-2011 11:37 AM
If your app size is close to 65KB just add some 10-12KB picture (you don't need to use it), recompile and sign the app again.
12-14-2011 12:10 PM
No, my app size is more then 1MB
12-14-2011 01:24 PM
Then the app consists of several sibling COD files each about 64KB. Can you check the size of the last one? You can extract the sibling files with WinRAR/WinZip from the original big COD file
12-15-2011 03:51 AM
The last one code file(<appname>-27) is 64.296KB
12-15-2011 11:29 AM
You can try the trick with adding extra image, the goal is to have the last COD file size not so close to 64 KB (adding extra image will probably produce another COD-file <appname>-28). Once you achieve it, send the installation to the user, who encounter the error, hopefully this time the installation will run OK.
12-15-2011 02:32 PM
So, what size should the last file has?
More then 70Kb or just less then 60-50Kb?
I can't send file directly to the user because this problem appears only when user tries to download it from the app world.
12-15-2011 03:40 PM
You don't want the size of any individual .cod files to be close to 64. Adding an image to the build should force the file to be split into a number of smaller .cod files
12-16-2011 05:57 AM
I have added small image (less then 13Kb) to the project and <appname-28>.cod have appeared.
<appname-27> is 58.60Kb now,
but <appname-28>.cod has size 63.90
Olso <appname-5>.cod is very close to 64Kb.
What should I do in this case?
12-16-2011 10:07 AM
If the file size is less than 64KB after signing you are safe IMO.
Some details about - the splitting of COD file into sibling files is kind of legasy approach, it was introduced at the time when mobile traffic speed was low in order to avoid corrupted installations. So the device is downloading small COD files one after another. If you noticed during the signing process every single sibling COD file is signed. However the signing info (it is about 200 bytes I think) is appended at the the end of COD-file. So if the COD file is greater than 64 KB the network transport (it probably depends on the carrier) could cut off the last 200 bytes. This way you will still have valid COD file (not corrupted) but without signing.
It is in fact a rare situation and happens from time to time and as I mentioned above it may be carrier dependent.