multiple problems trying to sign and deploy for PlayBook - submit

I have spent days trying to submit my app on the RIM Vendor Portal.
I can build it. I can run it on my device using debugtoken.bar.
When I try to submit it to the Vendor Portal I get the dreaded "Some files are missing signatures" error.
I built my application.bar file (actually named QuoteUnquote.bar), then signed it with:
"C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.1.0.6\bbwp\blackberry-tablet-sdk\bin\blackberry-signer" -verbose -cskpass ******** -keystore sigtool.p12 -storepass ******** "C:\work\word\quotes\platform_airplay\build_smartquotes-airplay_vc10\deployments\default\playbook\release\QuoteUnquote.bar" RDK
"C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.1.0.6\bbwp\blackberry-tablet-sdk\bin\blackberry-signer" -keystore sigtool.p12 -storepass ******** "C:\work\word\quotes\platform_airplay\build_smartquotes-airplay_vc10\deployments\default\playbook\release\QuoteUnquote.bar" author
I confirm that there are the required five files inside the META-INF folder in the signed .bar file.
When I verify it without the -verbose option, it just says ".bar verified". When I verify it with the -verbose option, the verify tool appears to crash:
C:\work\word\quotes\platform_airplay\PlayBook>"C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.1.0.6\bbwp\blackberry-tablet-sdk\bin\blackberry-signer" -verify -keystore sigtool.p12 -verbose "C:\work\word\quotes\platform_airplay\build_smartquotes-airplay_vc10\deployments\default\playbook\release\QuoteUnquote.bar"
2240 Sat Jun 30 00:31:16 PDT 2012 META-INF/MANIFEST.MF
1287 Sat Jun 30 00:31:16 PDT 2012 META-INF/AUTHOR.SF
710 Sat Jun 30 00:31:16 PDT 2012 META-INF/AUTHOR.EC
1287 Sat Jun 30 00:31:02 PDT 2012 META-INF/RDK.SF
280 Sat Jun 30 00:31:02 PDT 2012 META-INF/RDK.EC
0 Tue Jan 01 00:00:00 PST 1980 META-INF/
0 Tue Jan 01 00:00:00 PST 1980 native/
barsigner error: java.lang.NullPointerException
So that's not very helpful. I don't know if the -verify tool is just flaky, or if some problem with the .bar file is making it crash, or what.
This is all very frustrating because I've successfully signed and submitted .bar files in the past. I don't know what I'm doing differently now.
As I say, I've been stuck on this for days. If you can give me pointers, that would be great. If I can send you my .bar file and you can tell me what's wrong with it, that would be better.
Any help greatly appreciated.

My little hack to get around this was to sign the .bar as usual (RDK and Author) then rename the .bar file to .zip and extract all files into an temporary directory.
Using 7Zip I then RE-ZIP all files using this command:
7z a -tzip <AppName>.bar *.* -r
Which will re-zip all files back and remove the entries for directory names.
Run a verify on it:
blackberry-signer -verbose -verify <AppName>.bar
So long as you properly signed the app, you should see the lovely message:
Info: Bar verified.
Submit it and off you go!

I have figure out what was going on here. The problem is that there are two kinds of .zip files in the world, those where the directories get their own entry in the .zip file's directory, and those where they don't. This is a difficult issue because (as I understand it) most tools for viewing .zip files don't give an indication of whether the directories have their own entries -- they just show the directories using GUI folder icons like in Windows Explorer or whatever.
The solution was given here: http://supportforums.blackberry.com/t5/Native-Development/Error-while-uploading-Invalid-signature-file-digest-for-Manifest/td-p/1623873
It gives a java program to rebuild the .zip from the extracted contents, and using that particular java library to rebuild the .zip does not include the folders as their own entries.
This problem arose for two reasons:
(1) The RIM Vendor Portal submission tool checks to see if each item in the file is properly signed, and it apparently sees those two directory entries in the contents directory and freaks out because they are not signed, hence "Some files (sic) are missing signatures." In fact, it seems like it could just notice that those are zero-length directory entries and that there's nothing to sign anyway, and just let it go. That would avoid the whole mess in the first place.
(2) The Marmalade tool that makes the .bar file creates a zip that includes those directory entries. What's tricky is that, best as I can tell, it doesn't create those entries on everyone's system, just on some. There are other Marmalade users who apparently don't get this problem. I don't know if it has to do with the underlying .zip library that the Marmalade tool is using, whether that's part of the .jdk, part of the python system Marmalade uses, or what. But it definitely seems to behave differently on different systems.
So, both RIM and Marmalade should include information about this. When RIM gives the error that "some items are missing signatures" it should specify that it's these zero-length directory entries that are missing signatures (or it could just not treat it as an error at all, as mentioned above). Marmalade should tell all users who are working on PlayBook submissions about this issue.

Ok don't use this method.... it verifies and allows you to submit BUT on RIM's side they will complain about the fact that you modified the .bar file AFTER it was signed! !

Related

problem extracting an app.asar file using the asar command

I am new to Electron and want to make (at first) a sample javascript change in the Slack Electron app. I am here on a Mac OSX:
/Applications/Slack.app/Contents/Resources
and run the following:
asar extract app.asar ~/Desktop/src
And then without even making a change run:
asar pack ~/Desktop/src app.asar
The "re-packed" file is significantly larger:
-rw-r--r-- 1 oliverwilliams staff 28336486 Apr 21 03:25 app.asar
-rw-r--r-- 1 oliverwilliams staff 8175963 Mar 21 13:26 app.asar.original
and Slack will not start. Reverting back to the original file, Slack runs again.
Obviously I need to crawl before I can walk. What needs to be done here?

Apache Ant 1.9.6 will not run on Windows 7

Because I was having problems, I opened a command window and changed to the very bin directory where ant was installed. Then I entered 'ant -version'. It returned:
Files\Java\jdk1.8.0_72"" was unexpected at this time.
Entering 'ant' alone gives the same message. The JAVA_HOME is set to the jdk folder (jsk1.8.0_72), and the PATH adds \bin to it. Nothing else appears broken.
Any ideas gratefully received. Thank you.
Since writing the above, I tried shifting to 32-bit jdk7 from 64-bit jdk8. Output from "ant --version" changed a bit to: Files was unexpected at this time.
Changing the Symlinks in C:\ProgramData\Oracle\Java\javapath did nothing good.
Output of "set | findstr /b /i //"java_home=//"" is:
JAVA_HOME="C:\Program Files (x86)\Java\jdk1.7.0_79"
For PATH=, the output is too long and characters could be missed, so instead I ran: echo %PATH% > d.txt. Here is the result:
C:\Program Files\Everything;C:\Program Files\gradle-2.8\bin;"C:\Program Files (x86)\Launch4j";C:\Program Files (x86)\Apache\apache-ant-1.9.6\bin;"C:\Program Files (x86)\Java\jdk1.7.0_79"/bin;C:\cygwin64;C:\cygwin64\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\curl;C:\Devkit\bin;C:\Ruby21-x64;C:\Ruby21-x64\bin;C:\Perl64\site\bin;C:\Perl64\bin;C:\Program Files (x86)\Apache\apache-ant-1.9.0\bin;"C:\Program Files (x86)\Java\jdk1.7.0_79"\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files (x86)\WinMerge;C:\Program Files (x86)\Bazaar;C:\Program Files\jEdit;C:\Program Files (x86)\Groovy\Groovy-2.1.7\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files (x86)\Calibre2\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\CMake\bin;C:\Program Files (x86)\mingw-w64\i686-4.9.2-posix-dwarf-rt_v4-rev2\mingw32\bin;C:\Program Files (x86)\Scite\scite\bin;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Tcl\bin;C:\Program Files (x86)\Arduino\hardware\tools\avr\bin;C:\Program Files\dbd\Beard;C:\Program Files\dbd\dd;C:\Users\dbd\AppData\Roaming\npm
Please note that all the Java Demos run OK, suggesting that the basic java installation is OK.. Have not yet looked at the Registry. All of this is mysterious and upsetting.
Thanks to Stefan De Laet and Chad Nouis. More to be done.
This entry in your PATH doesn't look quite right:
"C:\Program Files (x86)\Java\jdk1.7.0_79"/bin
Those quotation marks shouldn't be there. Also, the forward slash before bin should be replaced with a backslash:
C:\Program Files (x86)\Java\jdk1.7.0_79\bin
Next, the JDK directories appear twice in your PATH:
...;"C:\Program Files (x86)\Java\jdk1.7.0_79"/bin;...;"C:\Program Files (x86)\Java\jdk1.7.0_79"\bin;...
Only one JDK directory is necessary. I recommend deleting the second entry.
Further, your JAVA_HOME also shouldn't have quotation marks. The following...
JAVA_HOME="C:\Program Files (x86)\Java\jdk1.7.0_79"
...should be...
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_79
At long last and finally, 'ant -version' gets the correct response: "Apache Ant(TM) version 1.9.6 compiled on June 29 2015". I beiieve several things contributed to the success:
Switching from 64-bit to 32-bit java. Since Ant comes as a zip file, I could not discover whether it is really 64-bit or 32-bit. I did find it in my 32-bit folder, but that could be a holdover from earlier times. But maybe not.
fixing the PATH. The PATH which I sent was an end-result after substitution composed of a replacement for the following: "...%JAVA_HOME%/bin...". Normally, I would have spotted it, but because of the %, I did not. Thank you Chad Nouis! When I switched to 32-bit, I did not touch the PATH entry, but merely changed JAVA_HOME. This may have been in the system for some time.
Oh Well! Have a good day everyone and thanks again!

how can I add my publisher name into my delphi exe program?

I do develop delphi programs that people do download.
Problem is when downloading them, they receieve an alert
"The publisher cannot be verified."
How can I add my publisher name into my delphi programs ?
You need a code-signing certificate, and need to digitally sign your executable using that certificate.
Search for [windows] code signing here at StackOverflow. There are tons of questions here on the topic; any and all of them (regardless of language used) for Windows applications apply to Delphi as well. Here is a start for you., and here's another one with links to resources. (Both links are here at StackOverflow, and not external sites.)
This is how I created a test certificate for my setup executable (produced by Inno Setup).
I used:
makecert -r -pe -ss MyCertStore -n "CN=MyTestCert" MyTestCert.cer
signtool sign /s MyCertStore /n MyTestCert MyApplication.exe
I could find these tools under:
"c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\"
Dont forget to install MyTestCert.cer under trusted providers, otherwise the MyApplication.exe will still show unknown publisher. Check with certmgr.exe which I could find in the same folder.
Worked for me on Win7x64.
For final signing you need a commercial code signing certificate, the cheapest I could find was from Comodo (about $70 a year).

OpenCV libopencv_core.so.2.4.1 File Not Found

I am trying to setup OpenCV v2.4.1 with FFMPEG v0.11 support on Scientific Linux SL release 5.0 (Boron), and I am running into a problem with a missing file that seems completely undocumented. The error I am getting is as follows:
-- Install configuration: "Release"
-- Up-to-date: /home/s18/s1138832/OpenCV/include/opencv/cv.h
-- Up-to-date: /home/s18/s1138832/OpenCV/include/opencv/cxmisc.h
-- Up-to-date: /home/s18/s1138832/OpenCV/include/opencv/cvwimage.h
-- Up-to-date: /home/s18/s1138832/OpenCV/include/opencv2/opencv.hpp
CMake Error at modules/core/cmake_install.cmake:63 (FILE):
file INSTALL cannot find file
"/home/s18/s1138832/OpenCV/lib/libopencv_core.so.2.4.1" to install.
Call Stack (most recent call first):
modules/cmake_install.cmake:57 (INCLUDE)
cmake_install.cmake:56 (INCLUDE)
I honestly don't know where to begin troubleshooting this at this point. I successfully installed without ffmpeg a few days ago, but now I can't even install with ffmpeg support set to off.
The files that link to the missing library are:
lrwxrwxrwx 1 s1138832 s18 21 Jun 17 18:26 libopencv_core.so -> libopencv_core.so.2.4
lrwxrwxrwx 1 s1138832 s18 23 Jun 17 18:26 libopencv_core.so.2.4 -> libopencv_core.so.2.4.1
Any advice or prods in the right direction would be much appreciated. I would also be happy to provide more info on whatever interesting details I may have omitted.
UPDATES: This website seems to have the same error, but I can't read it and translations patchy - http://www.opencv.org.cn/forum/viewtopic.php?f=1&t=15664 ( http://translate.google.com/translate?sl=auto&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fwww.opencv.org.cn%2Fforum%2Fviewtopic.php%3Ff%3D1%26t%3D15664&act=url )
libopencv_core.so.2.4.1 exists after "make", but "make install" deletes it somehow. I copied it and added it again, but it didn't change anything
As always, it was something very simple! I had my CMAKE_INSTALL_PREFIX set to "/foo" and I was configuring and building from "/foo" - when I configured from "/foo/temp" everything went swimmingly.
I guess the make install step tries to copy your built files to the install prefix path, and deletes the originals. Obviously this could cause some problems. Works like a charm now.
Thanks to everyone who made suggestions!

A very weird problem with localization (ASP.NET MVC)

I'm using Web Developer 2010. I just created a resource file lang.resx with different values in english. Then I created a lang.FR-fr.resx with French equivalents. However after tryingto compile, I get
Error 131 Task could not find "AL.exe" using the SdkToolsPath "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed
This is so weird! If I remove FR-fr part, it will work, but there will be no translation of course.
I went to that directory and found out that I don't have al.exe there. I managed to find it in .NET 2 folder, but after copying it didn't help. It throws an exception. I tried to reinstall .NET 4, to install Windows SDK, and it still doesn't work.
Maybe I can somehow get this al.exe file?
I solved it by restarting the machine :)

Resources