mwarning / trigger

Android app to lock/unlock/ring doors. Supports generic HTTPS/SSH/Bluetooth/MQTT and Nuki Smartlock.
GNU General Public License v3.0
133 stars 22 forks source link

unable to install 1.31 - 1.9.0 from GitHub #10

Closed clach04 closed 5 years ago

clach04 commented 5 years ago

I can successfully install Fdroid https://f-droid.org/repo/com.example.trigger_130.apk

I cannot install https://github.com/mwarning/trigger/releases/tag/v1.3.1

mwarning commented 5 years ago

I rebuild the apk using ./gradlew assembleRelease. Let's if that helps. I am new to Android.

clach04 commented 5 years ago

I've no idea what F-Droid do differently. I just downloaded 1.31 again in case you meant you had rebuilt (its identical to the one from earlier today.

I can wait until the F-Droid build of 1.31 and report back. I'm using Android 8 for testing.

clach04 commented 5 years ago

Tried an Android 5.0.1 device. Fails too, but with (maybe more information); "Problem parsing package"

theAkito commented 5 years ago

Tried an Android 5.0.1 device. Fails too, but with (maybe more information); "Problem parsing package"

As far as I recall, this happened to another app I tried to update, as well, so it might be an issue with F-Droid.

mwarning commented 5 years ago

@clach04 yes, I rebuild the 1.3.1 apk again. If the binary is identical, then it must be the result of the build.

I currently work on expanding the UI to allow to select multiple setup types.

mwarning commented 5 years ago

I do not know what the problem is and I do not know if the problem still exists. So I close the issue for now until this problem occurs again.

clach04 commented 5 years ago

From #14 Android 5.0 o nwards should work, I can not install apks from https://github.com/mwarning/trigger/releases on the two devices I've tested with. Android 5 and Android 8.

I can install F-Droid builds from https://f-droid.org/en/packages/com.example.trigger/ (or using the app) on both devices.

I get no useful information why the install fails :-( What debugging/logging can I do to work out what the problem is? Anything I can do on device or do I need to attempt to load via adb?

clach04 commented 5 years ago

@mwarning I installed Stanley from https://f-droid.org/en/packages/fr.xgouchet.packageexplorer/ and it claims that packageInfo is null when I open the Trigger 1.9.0 (and 1.7.1) apk from github. Opening the Trigger apk (1.7.1) from FDroid works fine.

clach04 commented 5 years ago

Is the apk signed?

mwarning commented 5 years ago

The apks are not signed. Do you at least get to the install screen with the install button? You need to allow installation of apks from an unknown source. But you should get a warning from Android telling you that (iirc).

mwarning commented 5 years ago

Please let me know if you can tell me how to build an apk that works for you (you are probably not alone, but I can do only very limited testing with my LineageOS).

Btw., release builds are tricky because the linter flags a lot of stuff, but it is hard to figure everything out.

mwarning commented 5 years ago

Stanley also gives me "Error: packageInfo must not be null". So far I can reproduce the problem. I will try to fix the error.

mwarning commented 5 years ago

@clach04 I have added a signed apk: https://github.com/mwarning/trigger/releases/tag/v1.9.0 Stanley does not throw an error anymore.

clach04 commented 5 years ago

Please let me know if you can tell me how to build an apk that works for you (you are probably not alone, but I can do only very limited testing with my LineageOS).

Sadly I have no idea :-(

@clach04 I have added a signed apk: https://github.com/mwarning/trigger/releases/tag/v1.9.0 Stanley does not throw an error anymore.

Thanks for doing that. No luck I'm afraid :-( I tried on two devices. It did make more progress than before so I think the changes you are are part of the solution.

Android 8 complained about Play Protection, (different from unknown-sources), once I disabled that it failed with not helpful message text :-(

Android 5, I disabled Play protection ahead of time. After accepting new permissions it claimed to be "installing" for a long time and then eventually did not install with "App not installed" and no explanation :-(

I'm not sure what to suggest, I'm happy to do more tests though.

clach04 commented 5 years ago

Just tried on a friend's 8.0.0 device, same behavior and no useful error messages :-( At this point we're battling the (Google) Android installer

clach04 commented 5 years ago

Tried on an Amazon Fire Tablet with same behavior, error "App not installed"

clach04 commented 5 years ago

I wonder how FDroid builds using https://gitlab.com/fdroid/fdroiddata/blob/master/metadata/com.example.trigger.yml - what is it doing (and possibly not doing)?

mwarning commented 5 years ago

@clach04 I asked someone to try to install the apk. But it failed the way you described it. No idea about the cause of it yet.

mwarning commented 5 years ago

@clach04 please try https://github.com/mwarning/trigger/releases/tag/v1.9.1 I think I have found the problem. Previous apks were not signed or signed with the new v2 signature (only supported by android >=7.0).

clach04 commented 5 years ago

@mwarning nice! 👍

Generally positive results with one exception and some things to be aware of.

Installs fine on a device that does NOT have Trigger previously installed, works with:

Failed to install on:

I do wonder if my problems with the first 1.9.1 signed build test would have been resolved by removing the existing install of Trigger. Android 5.0 support would be really nice but I don't have a pressing need at the moment (and I can install an older build).

Annoyingly non of the versions I had installed support backup/export but they do now and backup/export worked great.

clach04 commented 5 years ago
mwarning commented 5 years ago

Thank you a lot for testing. I have build an apk with the v1 signature only. Maybe Android 5 does not like the v2 signature.

See https://github.com/mwarning/trigger/releases/download/v1.9.1/trigger-1.9.1_v1_only.apk

clach04 commented 5 years ago

I tried the v1 sig on Android 5, no luck :-( I tried to upgrade an FDroid build and got the same warning about different certs. Removed FDroid and then attempted install, but go the not helpful did not install message.

I've not had chance to try it on any other devices. I'll try and get that done tomorrow.

mwarning commented 5 years ago

I tried trigger-1.9.1.apk (v1+v2 sig) on a emulated Android 5. It installed fine.