Dictionary icon indicating copy to clipboard operation
Dictionary copied to clipboard

Not working on Android 14?

Open eirinn1975 opened this issue 2 years ago • 72 comments

The app stopped working after updating to Android 14. The splash screen appears for a fraction of second and then it closes. Is it just me?

eirinn1975 avatar Oct 10 '23 15:10 eirinn1975

I do not have an actual device running Android 14. But it seems to work fine on the emulator. I also see no crash reports that seem related on the Play Store side either. I am working on an update to fully support Android 14. Those are just minor detail changes though, but maybe it would fix something. In the mean time, the usual cleaning cache and data and/or reinstalling might be worth a try?

rdoeffinger avatar Oct 10 '23 23:10 rdoeffinger

I've tried cleaning cache, purging the storage and reinstalling, but nothing worked.

eirinn1975 avatar Oct 11 '23 03:10 eirinn1975

Are you able to get access to the logcat, or some other way to get a backtrace? Or if you have the Play Store version to allow Google to send error reports? I have one single crash report from Android 14 on a Pixel 7 Pro, but that seems to be something broken in Android's libicu and not the app itself...

rdoeffinger avatar Oct 11 '23 08:10 rdoeffinger

Interesting, I'm on a pixel 7 (not pro). I removed the store version and installed it manually, but I will go back to the store version and allow error reports. Any fix for that libicu thingy?

--

Maximiliano Morsia

Hakamäentie 31, 26840 Rauma - Finland

tel. +358 (0) 40 175 1973tel:+358401751973


From: Reimar Döffinger @.> Sent: Wednesday, October 11, 2023 11:53:40 AM To: rdoeffinger/Dictionary @.> Cc: eirinn1975 @.>; Author @.> Subject: Re: [rdoeffinger/Dictionary] Not working on Android 14? (Issue #159)

Are you able to get access to the logical, or some other way to get a backtrace? Or if you have the Play Store version to allow Google to send error reports? I have one single crash report from Android 14 on a Pixel 7 Pro, but that seems to be something broken in Android's libicu and not the app itself...

— Reply to this email directly, view it on GitHubhttps://github.com/rdoeffinger/Dictionary/issues/159#issuecomment-1757177329, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC2J23SRLZYGXII72ZNLPF3X6ZNA7ANCNFSM6AAAAAA52SBH2I. You are receiving this because you authored the thread.Message ID: @.***>

eirinn1975 avatar Oct 11 '23 10:10 eirinn1975

You can also opt in to the 5.7.0 testing release to see if that helps. I think the libicu thing was some OS level bug or data corruption, it was on the beta of Android 14, not final version. So I think it's unlikely to be related to your issue, and I certainly have no idea what could be done about it (and not planning to try).

rdoeffinger avatar Oct 11 '23 16:10 rdoeffinger

Reinstalled the app from the store. Both stable (5.6.3) and beta version (5.7.0) crash on startup. I've forwarded the collected data after crashes. Hopefully it will be useful.

eirinn1975 avatar Oct 11 '23 17:10 eirinn1975

Thanks for testing! Have not gotten the crash data yet, will check again tomorrow.

rdoeffinger avatar Oct 11 '23 19:10 rdoeffinger

Just for info, I don't if it can help, but the exception class name seems to be java.lang.StackOverflowError:

Screenshot_20231012-183808

eirinn1975 avatar Oct 12 '23 15:10 eirinn1975

Ah, useful, so it is indeed that ICU issue. If lucky, it's some kind of startup race condition, I am adding a workaround, see patch linked above.

rdoeffinger avatar Oct 12 '23 17:10 rdoeffinger

Published a version with that workaround as beta (5.7.1). Please report if it changes anything (it might take a bit before it becomes available due to Google's review process, it's possible it will be available on F-droid first).

rdoeffinger avatar Oct 12 '23 17:10 rdoeffinger

Thanks! I'll let you know as soon as it hits the f-droid or Google store.

eirinn1975 avatar Oct 12 '23 17:10 eirinn1975

Yes! It's working now 😊 thanks a lot!

eirinn1975 avatar Oct 12 '23 19:10 eirinn1975

Oh not so quick... After downloading a dictionary and selecting it, it went back to the same problem.

eirinn1975 avatar Oct 12 '23 19:10 eirinn1975

Yes, that will be when ICU is initialised when the other code fails. Ok, that means it's indeed an ICU issue and it's not a race condition. Unfortunately I am out of ideas for now.

rdoeffinger avatar Oct 12 '23 19:10 rdoeffinger

Do you have the ability to experiment with your locale (e.g. app language) setting? I just wonder if this maybe only happens in certain regions, and if that could be why I cannot reproduce it.

rdoeffinger avatar Oct 21 '23 12:10 rdoeffinger

I could change it, yes, however my phone system language is set to English (United States). Any idea which language should I try?

eirinn1975 avatar Oct 21 '23 13:10 eirinn1975

Ok, that I should have tested, so it's probably not it. I guess you could try English (UK) or such, but maybe not worth messing with your phone settings since it's unlikely to help. I tried having a look at the ICU code to see if I could limit the recursion somehow, but did not find any there either so far.

rdoeffinger avatar Oct 22 '23 09:10 rdoeffinger

I've given UK English, Italian and Finnish a try, but all with the same result.

eirinn1975 avatar Oct 22 '23 12:10 eirinn1975

I have exactly the same problem with Android 14

You can't give the app any permissions to access the storage and thus the dictionaries. That's why the app probably always crashes as soon as it tries to access the dictionary. Screenshot_20231204-205130_Einstellungen

RDusr05 avatar Dec 04 '23 19:12 RDusr05

As the only competent FOSS offline dictionary app, it's a shame that it won't run on android 14 at all. I can't contribute on the android development side, but I'd be happy to donate money for this bug to be fixed.

occivink avatar Dec 13 '23 12:12 occivink

What you can do to help as a non-developer:

  • test non-Google Android 14 device. All the issue reports I have so far are on Google devices
  • try not convince Google to investigate this. Not very likely to work, but if there's evidence that non-Google Android 14 devices work fine, that might increase the chances.

I have no conclusive proof, but my best guess is that this is a bug in Android. If I had access to an affected device, I might be able to come up with a workaround, but since the app would still not work 100% right, it's not worth a lot of effort.

rdoeffinger avatar Dec 13 '23 17:12 rdoeffinger

I now have confirmation that the app works fine on a Samsung S22 running Android 14 (and previously confirmed that it works fine on emulator with Android 14), making it more likely that this is a Google issue. At least it is not a general Android 14 incompatibility.

rdoeffinger avatar Dec 13 '23 20:12 rdoeffinger

Another affected user here. Using a Pixel 6, the issues happens with the stock OS and also with a 3rd party OS. There's no other translator app I would want to use. So, please don't let use hang with this issue. Pretty please. ;)

Besides, how can it be that it works on Samsung but not on pixels? If it really is an Android 14 specific bug, then I wonder that Samsung patched that bug out. My guess, somehow luckily it works with Samsung but probably more devices will come where it fails.

bypear avatar Dec 19 '23 10:12 bypear

So, please don't let use hang with this issue. Pretty please. ;)

It's not so simple. Right now I'm enjoying a mostly computer-free vacation. But after that, either I can blindly try out workarounds and hope someone among you can test them for me. Or I find someone with an affected device so I can experiment hands-on, which would probably speed it up a lot. That option is a lot harder if only pixel devices are affected, thus my interest in reports of other devices with issues.

Besides, how can it be that it works on Samsung but not on pixels?

The Android emulator by Google also works fine.

then I wonder that Samsung patched that bug out.

More likely, the Google pixel team patched it in...

somehow luckily it works with Samsung but probably more devices will come where it fails.

That is also possible. And that would be useful information.

rdoeffinger avatar Dec 19 '23 16:12 rdoeffinger

I can confirm the issue (downloading and unpacking dictionaries works, but the app crashes as soon as a dictionary is selected) on a Fairphone 4 with CalyxOS 5.3.1, based on AOSP 14. If the Let me know if there is anything I can do to help debug the issue. The app worked great (thank you!) on Android 13 based CalyxOS and stopped working right with the update to Android 14. I would guess that the similarity to the affected Pixels is in the shared AOSP code base that somehow does not apply to Samsung's Android variant, but I unfortunately I don't have deeper knowledge of Android.

atopia avatar Jan 17 '24 21:01 atopia

This is a pretty bad hack, but maybe someone can test if this version works around the issue? I expect it will create some issues with word search, but it's a try Dictionary-issue159-testing.zip

rdoeffinger avatar Jan 17 '24 21:01 rdoeffinger

I've just tried the testing version. Unfortunately it doesn't solve the issue. If anything, now the app crashes whimsically at startup or after selecting the dictionary.

eirinn1975 avatar Jan 18 '24 05:01 eirinn1975

This is a pretty bad hack, but maybe someone can test if this version works around the issue?

I can confirm that this version still exhibits the same crashing behavior as the latest beta.

atopia avatar Jan 18 '24 09:01 atopia

Hi @rdoeffinger , I have some additional information for you that perhaps may be helpful in debugging.

I am experiencing the same issue as the above users, but with one caveat -- the app actually works in certain instances.

FYI, my phone is a Pixel 6, running the latest Android v14 (UQ1A.240105.002) non-root, and I am using QuickDic v5.7.1 (F-droid variant).

My phone is set up as follows: -Owner profile: minimal profile with only a few apps -"main" secondary profile: this is my "daily driver" that includes the apps I normally use, and where QuickDic v5.6.3 was installed with Android v13, which worked fine until v14.

As the other commenters above, upgrading to Android v14 caused the same kind of crashing that has been mentioned. Upgrading QuickDic to v5.7.1 did not change anything. I have tried downloading dictionary files (which would then place them in the /data/ folder), or also setting a custom data folder with manually downloaded dictionaries -- in either scenario, once you select a dictionary, the app crashes as mentioned. I have tried clearing the app cache, clearing the app storage, uninstalling, re-installing, etc. -- always the same behaviour.

The potential difference is -- this only happens on the secondary profile where QuickDic had been installed prior to Android v14. The app works perfectly well as expected, either with downloading dictionaries, or using prior downloaded dictionaries in a custom folder: -on the owner profile -on another secondary profile with Google Play Services -on another secondary profile without Google Play Services

Therefore, it can't simply be a bug in Android v14, since the app is clearly working for my Pixel on the latest Android in the above instances. I don't know how to interpret this other than maybe one of the following problems:

  1. There is some "left-over" data in my "main" secondary profile that had QuickDic installed during Android v13, that even upon uninstalling, is left over and creates some conflict even when reinstalling QuickDic under Android v14.
  2. There is a specific system setting enabled that causes QuickDic to crash.
  3. QuickDic is crashing because of a conflict with some other app installed on the profile.

I hope this is helpful!

code-consensus avatar Jan 29 '24 10:01 code-consensus

Hi, I have another minor detail that may also provide some insight into why the problem exists.

In my prior post above, I mentioned how in some user profiles on the same phone, the problem didn't exist. One thing I noticed in the "dysfunctional" user profile, was that after installation and program launch, there is no data directory "accessible" somehow.

Steps to reproduce:

  1. install Quickdic
  2. launch the program and adjust settings
  3. open the Files app, and go to /storage/emulated/{userID}/Android/data and no directory of "de.reimardoeffinger.quickdic" is shown to exist (though doing the same install on another user profile does show this folder created)
  4. launch app again and download a dictionary -- the app will show messages that a dictionary gets downloaded and installed, and then it will appear in the "dictionaries on device" list
  5. again, using the Files app, "de.reimardoeffinger.quickdic" somehow doesn't show up
  6. connect the phone to a computer for USB file transfer -- browsing to \Internal shared storage\Android\data and no "de.reimardoeffinger.quickdic" directory is shown

The app has clearly downloaded dictionary files and shows them being stored. So they must be there somehow, but maybe the fact that it is not visible is pointing to the problem.

Hopefully that gives some hint as to what is happening

code-consensus avatar Feb 20 '24 18:02 code-consensus