Signing broke Database connection?

cyclechris

Member
Licensed User
Longtime User
Using B4A 2.52

I was testing my app with the default debug signature until I got it all working the way I liked. Multiple times installing, uninstalling from phone, no problem. I also tried production/obfuscated and it worked great.

So I went and signed it and now when I install it to my phone Using the B4A bridge, on running, the app errors out at the first SQLite database connection.

Any ideas? Ugh was supposed to show my boss tomorrow!
 

yttrium

Active Member
Licensed User
Longtime User
Have you tried copying the signed apk to your device?

Also, you can install using a debug key for the demo to your boss, and then work on fixing the signing later. You just can't publish it until then.
 
Upvote 0

cyclechris

Member
Licensed User
Longtime User
Have you tried copying the signed apk to your device?

Also, you can install using a debug key for the demo to your boss, and then work on fixing the signing later. You just can't publish it until then.
Hi yttrium, thanks for the idea! I tried it but still getting an error. So I am at a loss for what is going on, but it seems to me like this thing must be on egg shells. I'm just using DBUtils which worked totally fine, compiled, installed to phone, everything. Then I signed it and BAM! DB errors. I've tried deleting the DB from the project and re-adding it, cleaning the project, etc. No luck.

This kind of thing is so exasperating. Hopefully someone will have had some similar experience and be able to tell me what I can do to fix it.

The only other thing I can think of is I moved the folder containing the project, I can't imagine what that would do though. I moved it back just in case and it still doesn't work.
 
Upvote 0

cyclechris

Member
Licensed User
Longtime User
OK yttrium, Actually I was able to do that as you suggested, thanks again! I had to go into Application Manager, stop the app, clear the data and uninstall it. Then recompiling using the debug key worked.

Whew! So at least I can show my boss!

Question, why would making a new key break the database? Is that the "installation failure" that the IDE talks about? If so, how do I manually uninstall the program so that I can install a signed one?

So far, repeating the procedure above that allowed me to install a working, debug-signed app, does not work when pointing to the signed key file. Is there anything funky about the key file names or passwords? I have a mixture of upper and lower case letters in both as well as a number in the password.
 
Upvote 0

yttrium

Active Member
Licensed User
Longtime User
OK yttrium, Actually I was able to do that as you suggested, thanks again! I had to go into Application Manager, stop the app, clear the data and uninstall it. Then recompiling using the debug key worked.

Whew! So at least I can show my boss!

Question, why would making a new key break the database? Is that the "installation failure" that the IDE talks about? If so, how do I manually uninstall the program so that I can install a signed one?

So far, repeating the procedure above that allowed me to install a working, debug-signed app, does not work when pointing to the signed key file. Is there anything funky about the key file names or passwords? I have a mixture of upper and lower case letters in both as well as a number in the password.

"Installation error" might occur when you're trying to replace a debug-signed apk with a custom-signed apk. Uninstall the debug version first manually, then install the signed one.
 
Upvote 0

cyclechris

Member
Licensed User
Longtime User
Hi again yttrium, hey thanks for all the help! So does that mean not going into application manager and selecting uninstall, but navigating to the files on the phone and deleting them via file manager?
 
Upvote 0

yttrium

Active Member
Licensed User
Longtime User
Hi again yttrium, hey thanks for all the help! So does that mean not going into application manager and selecting uninstall, but navigating to the files on the phone and deleting them via file manager?

No, that does mean going into the application manager. You just have to uninstall it first, you can't use a "reinstall" like usual.
 
Upvote 0

cyclechris

Member
Licensed User
Longtime User
Signing broke Database connection? - Solved

OK, thanks yttrium! Well I am afraid I was not a good troubleshooter since I am in a hurry! So I did a couple things and now the signed app is working fine for me. So just in case anyone runs into this sort of problem, here is what I did:

  1. uninstalled the unsigned app
  2. searched for the app name with file manager and deleted the files if any (was a downloaded APK - I tried downloading from my server)
  3. restarted the phone
  4. created a new key file and password without caps and numbers

I used both the bridge install which worked. Then uninstalled it completely and tried downloading the apk from my server and then installing and that worked.

So... I'm not 100% sure what my problem was, but these steps seem to have solved it.

When I have more time, I may go back and try to recreate the problem and see if I cannot find out exactly what the issue was.
 
Upvote 0
Top