LibreShift / red-moon

Android screen filter app for night time phone use.
GNU General Public License v3.0
647 stars 81 forks source link

Error analyzing package - impossible to install APK #229

Closed ghost closed 4 years ago

ghost commented 5 years ago

Hi,

I am trying to install the program on Android 4.2.1, Samsung Galaxy S3 mini. However when I tap the APK (downloaded from F-Droid) the phone says there is a problem analyzing the package and shows just an OK button. This makes it impossible to install it.

Can anyone help?

smichel17 commented 5 years ago

Hmm. Just to be clear, is an apk downloaded from f-droid.org or through the f-droid client? If the latter, the error pops up when you hit the install button (ie, the download completes successfully)?

I'm asking because in the past, f-droid has had issues with not keeping around apks for apps (not Red Moon) that haven't had a release for a while. I want to figure out whether it's an f-droid issue or a Red Moon issue.

If you're sure the apk is successfully downloaded, could any chance you could get a logcat and see if there's a more specific error from the package installer?

ghost commented 5 years ago

Just to be clear, is an apk downloaded from f-droid.org or through the f-droid client?

The latter.

If the latter, the error pops up when you hit the install button (ie, the download completes successfully)?

When I tap the file. I download the APK on the computer, then transfer it to Downloads folder of the phone via USB cable, then go to Android's "My files > Downloads" and tap the file to install it. Same procedure works fine for other programs from F-droid (e.g. K-9 mail).

If you're sure the apk is successfully downloaded, could any chance you could get a logcat and see if there's a more specific error from the package installer?

I don't know how to do that (or what "logcat" is). Please explain, so I can check if I can provide more info for you.

smichel17 commented 5 years ago

When I tap the file. I download the APK on the computer, then transfer it to Downloads folder of the phone via USB cable, then go to Android's "My files > Downloads" and tap the file to install it. Same procedure works fine for other programs from F-droid (e.g. K-9 mail).

Err, this would be through f-droid.org, not through the client (f-droid app), then. Anyway, about a logcat, see https://github.com/LibreShift/red-moon/issues/184#issuecomment-330053370. You'll probably want to look for something like PackageManager for the relevant part of the log. If you're having trouble getting logcat working, feel free to ask me in one of the Red Moon chat rooms (linked in the readme).

ghost commented 5 years ago

Seen. Sorry but I don't have the time to install and learn how to use that additional software for the purpose of debugging this. If it is something available on the phone as it is now, then I can provide feedback.

smichel17 commented 5 years ago

Unfortunately in this case, because the error is with installing Red Moon, built-in logging wouldn't help, since Red Moon needs to be installed for it to work (the logs we're after are from the package installer).

I will look and see if I can find any additional information about these types of crashes. Maybe it's a common enough problem that I can figure out the cause without a log.

ghost commented 5 years ago

Thanks for your understanding. I hope you will find the reason.

smichel17 commented 5 years ago

@anchev Any chance you could get a screenshot of the error? I see a few similar errors but none with the exact phrasing you used.

ghost commented 5 years ago

Sorry, my phone was not set to English, so I was translating (obviously a wrong translation by someone else). When setting it to English (United States) it says:

Parsing error

There is a problem parsing the package

followed by an 'OK' button.

smichel17 commented 5 years ago

I'm going to close this issue because the person who opened it has deleted their account. However, @anchev if you're still around, my best guess is that you have not enabled installing apps from unknown sources. Ex: https://techmused.com/fix-problem-parsing-package/#Fix_Parse_Error_by_Enabling_Unknown_Sources

nchv commented 5 years ago

I'm going to close this issue because the person who opened it has deleted their account.

I had to reopen my account because something happened to my old one. Sorry for the confusion.

my best guess is that you have not enabled installing apps from unknown sources.

Not true. That has been enabled before downloading your app and opening this issue. I still cannot install the file for which this issue was opened.

FWIW: The actual situation as of today is: F-Droid (which I have installed on the phone) now shows that red moon is incompatible version.

smichel17 commented 5 years ago

Hmm. Red moon should support Android 4.2.x currently (but not 4.1.x). However, there's not really a good reason for that any more and the next release will lower the minimum supported version to 4.0.1. I'm going to do the release soon — maybe tonight, maybe tomorrow, plus however long it takes f-droid to do the builds — so we can see if that helps.

nchv commented 5 years ago

Sounds good, thanks. Please let me know when it is ready to test again.

smichel17 commented 5 years ago

I've made the release now, so it should appear on F-Droid within a couple days. If you're impatient*, I also uploaded a debug version (can be installed alongside the f-droid version) at https://smichel.me/files/red-moon/red-moon-debug-2019-02-03.apk

*The irony of me saying this given the issue has been open for a couple months is not lost on me :)

nchv commented 5 years ago

Thanks! I was able to install it now.

BTW: The program crashes if I try to turn it on/off with "Lower system brightness" enabled. When it is disabled it works.

smichel17 commented 4 years ago

The "Lower system brightness" crash was fixed in e8f2b76645d6bdd848e7073a62021399da2c1296 and will be available as soon as F-Droid builds version 3.5.0.