12-31-2012 06:38 PM
Hi,
I completed developing my application today and am finally ready to build a signed version and submit it. I followed these exact instructions : http://supportforums.blackberry.com/t5/Cascades-De
Thanks,
Gerry
Solved! Go to Solution.
12-31-2012 07:21 PM
01-01-2013 08:52 AM
Thanks for the reply Peter,
Apologies for the misuse of terms here. By crash I mean - immediately when I open the app it closes, so that I never even see the splash screen. Note the first time I opened it the application permissions dialog did show, but as soon as I pressed ok, that app closed.
By release build I meant I had built it using the "device-release" configuration, but after checking the MANIFEST.MF file I can see : "Application-Development-Mode: true", so I definitely misunderstood what that was doing. I also checked the signed build and have pasted a copy below.
Also, as far as I know I am not assuming I have access to the assets folder. I used the quotes sample app and can confirm the database I am using in my app is being copied to the data folder. Other than that I am not using files in the file system.
Thanks,
Gerry
Archive-Manifest-Version: 1.5
Archive-Created-By: BlackBerry Cascades BAR Packager 1.8
Package-Type: application
Package-Author: Gerry Moerkerken
Package-Name: moerkerkenBert.ExpenseTracker
Package-Version: 1.0.0.1
Package-Architecture: armle-v7
Package-Author-Certificate-Hash: Sk7793vziRJP7GOZm5eWlIgSbn4F3PTZvOUdFMUjP_FCsYli9L
Package-Author-Id: gYAAgGSSkDphPRunwOjjSOnmHNk
Package-Id: gYABgAHBhrPkh00OK86MLk-xSaE
Package-Version-Id: gYACgKCtMio5Kt_-IeK-yHIgsBE
Package-Issue-Date: 2012-12-31T23:21:18Z
Application-Name: Expense Tracker
Application-Description: This application helps you keep track of where your money is going, who owes you money, and who you owe money to.
Application-Version: 1.0.0.1
Application-Category: core.media
Application-Requires-System: BlackBerry 10/10.0.9.0
Application-Development-Mode: false
Application-Id: gYADgIbLfEbB-q1p3GN-OGyhy3A
Application-Version-Id: gYAEgCo1KJe-NAlm83DF8Wj_Atc
Entry-Point-Name: Expense Tracker
Entry-Point-Key: e1
Entry-Point: LD_LIBRARY_PATH=app/native/lib:/usr/lib/qt4/lib app/native/ExpenseTracker
Entry-Point-Type: Qnx/Cascades
Entry-Point-Icon: native/icon.png
Entry-Point-Orientation: portrait
Entry-Point-User-Actions: bbm_connect
Entry-Point-System-Actions: run_native
Archive-Asset-Name: native/bar-descriptor.xml
Archive-Asset-SHA-512-Digest: lv_u3ln6kj0eElwMgzjnoTly_HnSX98F4_4IeWVejjsfsbKdkb
Archive-Asset-Name: native/icon.png
Archive-Asset-SHA-512-Digest: AqgE90QMo-tPofkU0dEek33ia1T-AJX9HPVKclnZsJuxARu_cv
Archive-Asset-Name: native/assets/AboutPage.qml
Archive-Asset-SHA-512-Digest: hhz2_IJqzXsb8NkHr3v2EefnDpSWax8tZS3eH1hstCkD29BocQ
Archive-Asset-Name: native/assets/AppCover.qml
Archive-Asset-SHA-512-Digest: 91N3Dp6M0caTXW07gbWJfqQTF7kupKBzoM1-rgYKBNOoKhINRr
Archive-Asset-Name: native/assets/Expenses_QML/EditExpensePage.qml
Archive-Asset-SHA-512-Digest: 5u4qmJlE3Ws1Ly1eUPg0N8nPzYpLni337TfeSLyv-4llU5_uas
Archive-Asset-Name: native/assets/Expenses_QML/ExpenseListItemView.qml
Archive-Asset-SHA-512-Digest: LXhP2ta8heX71403UJEeC4TiOkYCsSd7v0MDBAjb879CMKBWgx
Archive-Asset-Name: native/assets/Expenses_QML/ExpensePage.qml
Archive-Asset-SHA-512-Digest: o5Ck0r4Vip2IuwH5eY0t_dU-zVQrC3uA5NV11DR-TNYGR231Kp
Archive-Asset-Name: native/assets/Expenses_QML/ViewExpensePage.qml
Archive-Asset-SHA-512-Digest: IaWBOkaP7AsfYhKjkR5cA_AsKk6uGa1vBdfjyAeHwzDDuStbN5
Archive-Asset-Name: native/assets/HelpPage.qml
Archive-Asset-SHA-512-Digest: vCdtDwisKNek_i2AFlPWi8yPLEZJLtQv0d_QGGnV8ufgvFMxVh
Archive-Asset-Name: native/assets/images/About.png
Archive-Asset-SHA-512-Digest: 0qm-tj-7yo4xkmjddb2wKa8ClaSh-mnyQHsncUVaTbzk-SwCry
Archive-Asset-Name: native/assets/images/Add.png
Archive-Asset-SHA-512-Digest: o7fMlKy4za_LLrWABcxoD_UE31jIZg2ZryRXcn2FqoTj1ieHOc
Archive-Asset-Name: native/assets/images/Appliances.png
Archive-Asset-SHA-512-Digest: cDuiUfupUPnZ99YffT-yVIOvCL1v8WpzQ_D9Iac2ovqCWrrN1U
Archive-Asset-Name: native/assets/images/background_1.jpg
Archive-Asset-SHA-512-Digest: tvVnUa-dReRKenhH4QJX60CXQTEHURRUnCNJXuDV87d3l0xRS9
Archive-Asset-Name: native/assets/images/BB_ExpenseTrackerTitle.png
Archive-Asset-SHA-512-Digest: 0Ty7D23f3uahQ-RcI_fh8WiR-LDGT5uA6BmtuN8uzADmaZKqOV
Archive-Asset-Name: native/assets/images/Blank.png
Archive-Asset-SHA-512-Digest: kqKTR06YDoNfMox0uubk9kLTulLiZ5A5XPVcW-pMPxMu7DFPl7
Archive-Asset-Name: native/assets/images/Books.png
Archive-Asset-SHA-512-Digest: 4GgL031UzuVYT2aaiqQSF-GkG-VH-4X86JgvvhONmwP5K52Dx5
Archive-Asset-Name: native/assets/images/Clothes.png
Archive-Asset-SHA-512-Digest: 94WdWsNME3Z01fkFmEG9RxquusHQCPpYzN2NLszxiDRVvCuzio
Archive-Asset-Name: native/assets/images/Edit.png
Archive-Asset-SHA-512-Digest: sLkwSehvb8oGdbC_jdCLjDpGR-JCUNGTrGSuCgS14AAvJJlBA0
Archive-Asset-Name: native/assets/images/Electronics.png
Archive-Asset-SHA-512-Digest: DlUojM64e8kp9oQCZjYwUZP47gMTEu4zQmGq039AHF-8QUOMBj
Archive-Asset-Name: native/assets/images/Gas.png
Archive-Asset-SHA-512-Digest: D6oSAk7QmuoBecwoguaA1jBihuj3aP2Km_qrbO2ZbfiNGWKlJj
Archive-Asset-Name: native/assets/images/Gift.png
Archive-Asset-SHA-512-Digest: qxkH04gKWbeldgfgkVzFphpQC_IkUent_Oiuq5jGxZwg8Bquxx
Archive-Asset-Name: native/assets/images/Groceries.png
Archive-Asset-SHA-512-Digest: 7WYLXi9LCsreEM9UJyVe4TDysRluaNVSK9kuH4m1nxnvqIFuaJ
Archive-Asset-Name: native/assets/images/icon.png
Archive-Asset-SHA-512-Digest: AqgE90QMo-tPofkU0dEek33ia1T-AJX9HPVKclnZsJuxARu_cv
Archive-Asset-Name: native/assets/images/Music.png
Archive-Asset-SHA-512-Digest: DE04H1_NykNVJObYazgKh1kB9MKLYpKYeDZCxvUsUV1M4uaoaY
Archive-Asset-Name: native/assets/images/Other.png
Archive-Asset-SHA-512-Digest: MOy45YnuKc2XJXMVgdhL1h8ZTbNUwBTfBpNblZU3YS4TFJ2MTC
Archive-Asset-Name: native/assets/images/Owed.png
Archive-Asset-SHA-512-Digest: 8BAbQ4V3Bu90xk5UehLo-pv3Va3xjx3A76xyRQyLzjpq-YOJIo
Archive-Asset-Name: native/assets/images/Owing.png
Archive-Asset-SHA-512-Digest: qNcS9rHmNlX0BG5_8CcTAA7222L-v1NjkKrX-hLX7mHNw6TJoi
Archive-Asset-Name: native/assets/images/Solved.png
Archive-Asset-SHA-512-Digest: MEFoxeh6qKgrPnh9445uWgETHiUT1C8FgTWKOK8sno971-Lkv1
Archive-Asset-Name: native/assets/images/Solved_Icon.png
Archive-Asset-SHA-512-Digest: ON__gcgcUVlxSr92cVIxcteTTNbCfj3x5KEmD1Qt_NUbfQtSIN
Archive-Asset-Name: native/assets/images/Sports.png
Archive-Asset-SHA-512-Digest: W5bVRVUcOb7mwZlvlM_erAGVyLMGJIqDsJAQeKfdinAhYbOeso
Archive-Asset-Name: native/assets/images/Tickets.png
Archive-Asset-SHA-512-Digest: 4HIIBk5BPb7asM0pKi-wnGrqAvJ9gfs170jFu3FIn3g2CN1jNh
Archive-Asset-Name: native/assets/images/Tools.png
Archive-Asset-SHA-512-Digest: T6uaamXY5l-LafrkM5AQ2-ob4qviMJ8VUQHSXDgOmqjejC88LN
Archive-Asset-Name: native/assets/images/Utilities.png
Archive-Asset-SHA-512-Digest: kBvK3DVCf7cFxcEGqWCHCrgnEWKuIkZKzSVJsepDGpiAOWBgea
Archive-Asset-Name: native/assets/main.qml
Archive-Asset-SHA-512-Digest: 7xpGDYiyKAA8qWfx-pFW4xl2CggwaWU5rJ5BmRdHVdFn0DYSVD
Archive-Asset-Name: native/assets/models/create table.txt
Archive-Asset-SHA-512-Digest: 2WDIz--Rv8RwMqbDxTV3SLMXxqIErfZNB5aj3laIZGzAJTc8LD
Archive-Asset-Name: native/assets/models/expenses.db
Archive-Asset-SHA-512-Digest: _fp9GlzL3PRkD2lIouIrbHEZuVffEzyRAbW9XxhrOGn24T9e1r
Archive-Asset-Name: native/assets/registration.qml
Archive-Asset-SHA-512-Digest: udWYZpFQU9VSDzwoXoZk2KjeIeR4y7y-VNjDaCpNbqdkK9HMCf
Archive-Asset-Name: native/assets/Reports_QML/ExpenseListItemView.qml
Archive-Asset-SHA-512-Digest: T4bbaJyIYZzfG_Z6cjarlHLhf92_8QKkfT4Vn3_WFBClt6UAuC
Archive-Asset-Name: native/assets/Reports_QML/ExpenseReportPage.qml
Archive-Asset-SHA-512-Digest: 8CvPpkUU2bzkmb0opW1rBsIZ-dbHbNs8db8lvFtE1fL5xI-fv4
Archive-Asset-Name: native/assets/Reports_QML/LoanListItemView.qml
Archive-Asset-SHA-512-Digest: lRhdCmjdqwP-Z9aRUV9j3fKT7v6NA6QzPJHrdBI1T8pBCAGpl-
Archive-Asset-Name: native/assets/Reports_QML/LoanReportPage.qml
Archive-Asset-SHA-512-Digest: W8OvsmkpO3pJMVbCaguyWj2t-AM-3YDsFIN3RsO8xOwzGQft9Z
Archive-Asset-Name: native/assets/Reports_QML/ReportListItemView.qml
Archive-Asset-SHA-512-Digest: kv3iIAI5AIGpaFdRTKsDGBj3796ZCMDBiQ-EVmQGt-GkZi07Oz
Archive-Asset-Name: native/assets/Reports_QML/ReportPage.qml
Archive-Asset-SHA-512-Digest: yeFUF63R1ZSV839xDqbZM3_Q8JuO3dLSyahps9sFs4FansTFox
Archive-Asset-Name: native/assets/WelcomePage.qml
Archive-Asset-SHA-512-Digest: ZZ6wcANfctGoyPeqWUlm4A1XeiEOUsw84sO0YMKOstiqRY52ER
Archive-Asset-Name: native/qm/ExpenseTracker.qm
Archive-Asset-SHA-512-Digest: -VG1Ef-xprlLG8rp3ya0Gy_4KVYFg9fIPnAnnRtTBL3imbNnnY
Archive-Asset-Name: native/qm/ExpenseTracker_de.qm
Archive-Asset-SHA-512-Digest: x18ImpUQeZewp4bnwRkeSOx6aa7_-X2vN3g3kdlDxhK3wbQ7zC
Archive-Asset-Name: native/qm/ExpenseTracker_en_GB.qm
Archive-Asset-SHA-512-Digest: x18ImpUQeZewp4bnwRkeSOx6aa7_-X2vN3g3kdlDxhK3wbQ7zC
Archive-Asset-Name: native/qm/ExpenseTracker_es.qm
Archive-Asset-SHA-512-Digest: x18ImpUQeZewp4bnwRkeSOx6aa7_-X2vN3g3kdlDxhK3wbQ7zC
Archive-Asset-Name: native/qm/ExpenseTracker_fr.qm
Archive-Asset-SHA-512-Digest: m7Wj0ykh92gFn8qm5fgKZsZU2jg-8ZvnaD4XpsTYNC6uXEDkQU
Archive-Asset-Name: native/qm/ExpenseTracker_it.qm
Archive-Asset-SHA-512-Digest: x18ImpUQeZewp4bnwRkeSOx6aa7_-X2vN3g3kdlDxhK3wbQ7zC
Archive-Asset-Name: native/ExpenseTracker
Archive-Asset-SHA-512-Digest: o7tIsgTkBqHvzEh79xPoqNiMXLa8p7B8N2vELuAPeeb0otMBbs
Archive-Asset-Type: Qnx/Elf
01-01-2013 10:11 AM
It's a bit tricky to troubleshoot such problems, because you can't see into the sandbox area for the signed app, including its log file. Note that Device-Debug and Device-Release differ only in terms of having debugging stuff enabled, but both do have that development-mode flag set true. With Momentics, only the "export release build" feature would generate a .bar that has that turned to false, and sign the app. (From the command line, the key difference is whether the -devMode flag has been specified.)
One thing you can do is unzip the signed .bar file, remove the files in META-INF other than MANIFEST.MF, edit MANIFEST.MF to make that development mode flag read "true", and zip the whole set of files back up again. You've now "unsigned" the .bar file, and should be able to install it via the usual debug-token route and see logs/log this time.
If you do that and run the app again, you may see some additional sign of the problem (e.g. in logs/log) and can make some progress at tracking it down.
If you do that and the app suddenly works, then check very carefully for the thing I described above where it assumes it has write access to the app/ area, since there are almost no other relevant differences between a signed and an unsigned (devmode) app.
Depending on how things go, you may also need to instrument your app with additional logging output and/or modify the startup so that it's more robust in the face of certain failures. Sometimes I have the app create a secondary log file in shared/misc (giving it the access_shared permission in the bar-descriptor file, of course), and append to that as the very first thing in the main() code. If you don't see that appear after the crash, you know for certain the problem isn't in your own code but in the way the package was built or such things.
What about missing libraries? Does app/native/ExpenseTracker want some extra .so file or something which you're somehow not bundling in the signed release build? Compare the contents of the two .bar files to check for differences in the files present (aside from the extra four you'll see in META-INF for the signed app.. those aren't likely relevant here).
01-01-2013 02:48 PM
Thanks again Peter,
I've been trying to solve this for way too long, and all seems of no avail. First I did a compare of the bar files (by extracting to zip) - they are, other than the 4 files in META-INF, identical. Then I tried to make an unsigned bar out of a signed, as you described, and that bar file will not install onto the device. My next step was to try creating a signed app from another project (I used the sample cookbook app). This app installs and works without issue, so I know its not my method of signing or my signing keys. Then I created a brand new project and copied my source from the old to the new project (in case some configurations or something have broken since I created the project back in October). The new project aso works fine in debug mode, but the signed app again fails. I went through the code looking for any code that might be causing the issue. First I removed the BBM registration, then I removed all the database code temporarily, but the app still refuses to launch. My final step was to uninstall ndk, and reinstall it, but again no luck.
Anything else you can think of that might be worth trying. After all this time and effort, it would really suck to see my first attempt at an app-world app fail because of a signing issue. (I need it done by Jan 11)
Thanks,
Gerry
01-01-2013 05:12 PM
I tried one more thing that you mentioned and that is to write to a "log" file in the shared folder of the device so I can see if I ever get into main. Here's the code I used :
int main(int argc, char **argv)
{
QString newFileName = QDir::currentPath() + "/shared/documents/log.txt";
QFile newFile(newFileName);
newFile.open(QIODevice::Append);
newFile.write(QString("I got here!").toStdString().c_str());
newFile.close();
Application app(argc, argv);
const QString uuid(QLatin1String("e5e9b6a8-a8ac-43e3-892a-4aa7ea a518fa"));
RegistrationHandler *registrationHandler = new RegistrationHandler(uuid,
&app);
// initiate fixit app
ExpenseTracker *expenseTracker = new ExpenseTracker(registrationHandler->context(), &app);
// wait for bbm registered signal to be emitted before starting the app.
QObject::connect(registrationHandler, SIGNAL(registered()), expenseTracker,
SLOT(bbmConnected()));
// we complete the transaction started in the app constructor and start the client event loop here
return Application::exec();
// when loop is exited the Application deletes the scene which deletes all its children (per qt rules for children)
}
When I run the debug version of the app it launches fine and I see the log file created in the shared/documents folder with the text. However, when I built another signed build, and ran it, the log file is not created. Would this be convincing proof that I have a nasty build issue somewhere? (I've never been too good at solving those compared to coding issues)
Thanks,
Gerry
01-01-2013 06:20 PM
01-01-2013 08:57 PM
Thanks for the help Peter,
Starting with a working app and slowly adding my pieces fixed the issue! Now I can submit to app world. I strongly feel the issue was due to me copying complete source files into the project, rather than creating the source files and then copying the code, but I can't be sure, and at this point it doesn't matter since the issue is solved.
Thanks again,
Gerry