itkach / aard2-android

Aard2 for Android, a simple dictionary app
GNU General Public License v3.0
458 stars 97 forks source link

AARD 2 doesn't start #108

Open outlogic opened 4 years ago

outlogic commented 4 years ago

I didn't have any problem installing AARD 2 onto Likebook Plus (with Android 4.2 only). But when I tap the AARD 2 icon from a launcher, it doesn't start. Tried version 0.38 and 0.39, but the result was the same. Is there any debugging information that can be analyzed to try to fix the problem?

itkach commented 4 years ago

You can look at the logs on device with https://developer.android.com/studio/command-line/logcat .

outlogic commented 4 years ago

Here is what I got with logcat:

Events injected: 1
## Network stats: elapsed time=107ms (0ms mobile, 0ms wifi, 107ms not connected)
shell@android:/ $ logcat | grep itkach.aard2 
I/ActivityManager(  347): START u0 {act=itkach.aard2 flg=0x10000000} from pid 10342
I/ActivityManager(  347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 10365
I/ActivityManager(  347): Start proc itkach.aard2 for activity itkach.aard2/.MainActivity: pid=10375 uid=10033 gids={50033, 1028, 1015, 3003}
I/ActivityManager(  347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 7665
I/WindowState(  347): WIN DEATH: Window{41d65128 u0 itkach.aard2/itkach.aard2.MainActivity}
I/ActivityManager(  347): Process itkach.aard2 (pid 10375) has died.
W/ActivityManager(  347): Force removing ActivityRecord{41c6e918 u0 itkach.aard2/.MainActivity}: app died, no saved state
I/ActivityManager(  347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 7665
I/ActivityManager(  347): Start proc itkach.aard2 for activity itkach.aard2/.MainActivity: pid=10457 uid=10033 gids={50033, 1028, 1015, 3003}
I/WindowState(  347): WIN DEATH: Window{41db1eb0 u0 itkach.aard2/itkach.aard2.MainActivity}
I/ActivityManager(  347): Process itkach.aard2 (pid 10457) has died.
W/ActivityManager(  347): Force removing ActivityRecord{41c7a800 u0 itkach.aard2/.MainActivity}: app died, no saved state
I/ActivityManager(  347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 7665
I/ActivityManager(  347): Start proc itkach.aard2 for activity itkach.aard2/.MainActivity: pid=10477 uid=10033 gids={50033, 1028, 1015, 3003}
I/ActivityManager(  347): Process itkach.aard2 (pid 10477) has died.
I/WindowState(  347): WIN DEATH: Window{41df7468 u0 itkach.aard2/itkach.aard2.MainActivity}
W/ActivityManager(  347): Force removing ActivityRecord{41c99270 u0 itkach.aard2/.MainActivity}: app died, no saved state
I/ActivityManager(  347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 10619
I/ActivityManager(  347): Start proc itkach.aard2 for activity itkach.aard2/.MainActivity: pid=10629 uid=10033 gids={50033, 1028, 1015, 3003}
I/ActivityManager(  347): Process itkach.aard2 (pid 10629) has died.
I/WindowState(  347): WIN DEATH: Window{41e95df8 u0 itkach.aard2/itkach.aard2.MainActivity}
W/ActivityManager(  347): Force removing ActivityRecord{41c7a800 u0 itkach.aard2/.MainActivity}: app died, no saved state
I/ActivityManager(  347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 7665
I/ActivityManager(  347): Start proc itkach.aard2 for activity itkach.aard2/.MainActivity: pid=10825 uid=10033 gids={50033, 1028, 1015, 3003}
I/WindowState(  347): WIN DEATH: Window{41c880c0 u0 itkach.aard2/itkach.aard2.MainActivity}
I/ActivityManager(  347): Process itkach.aard2 (pid 10825) has died.
W/ActivityManager(  347): Force removing ActivityRecord{41c6e918 u0 itkach.aard2/.MainActivity}: app died, no saved state
I/ActivityManager(  347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 10885
I/ActivityManager(  347): Start proc itkach.aard2 for activity itkach.aard2/.MainActivity: pid=10895 uid=10033 gids={50033, 1028, 1015, 3003}
D/itkach.aard2.SlobDescriptorList(10895): beginUpdate
D/itkach.aard2.SlobDescriptorList(10895): endUpdate, changed? false
D/itkach.aard2.SlobDescriptorList(10895): beginUpdate
D/itkach.aard2.SlobDescriptorList(10895): endUpdate, changed? false
D/itkach.aard2.SlobDescriptorList(10895): beginUpdate
D/itkach.aard2.SlobDescriptorList(10895): endUpdate, changed? false
I/ActivityManager(  347): START u0 {cmp=itkach.aard2/.FileSelectActivity} from pid 10895
E/SurfaceFlinger(  106): add dialog --- itkach.aard2/itkach.aard2.FileSelectActivity
E/SurfaceFlinger(  106): add dialog --- itkach.aard2/itkach.aard2.FileSelectActivity
I/ActivityManager(  347): Displayed itkach.aard2/.FileSelectActivity: +431ms
E/SurfaceFlinger(  106): remove dialog --- itkach.aard2/itkach.aard2.MainActivity
E/SurfaceFlinger(  106): remove dialog --- itkach.aard2/itkach.aard2.MainActivity

I still can't launch the AARD2 app from my launcher (never had such problem before with any other apps), but I was able to open it via the adb command: adb shell monkey -p itkach.aard2 -c android.intent.category.LAUNCHER 1

outlogic commented 4 years ago

After launching the app with adb and adding dictionaries I closed the app. Now it starts just fine from the launcher.

When using the search box on a device with e-Ink screen both background and text are black. It would be nice to have an e-Ink friendly mode.

Also when the word is found in multiple dictionaries it is great to see all the entries on one page. The MDict app allows to expand several entries from different dictionaries or only one of them. It is very convenient, so I highly recommend to take a look at this approach.

itkach commented 4 years ago

Interesting. I don't see this above, but in the GH email notification log also has these lines:

logcat | grep itkach.aard2                                   
W/PackageManager(  347): Package itkach.aard2 desires unavailable shared library com.sec.android.app.multiwindow; ignoring!
I/ActivityManager(  347): Force stopping package itkach.aard2 appid=10033 user=-1

I wonder if despite PackageManager claiming unavailable shared library will be ignored it actually results in force stopping the package... Also if you don't filter with grep perhaps there's more relevant context from the os side...

itkach commented 4 years ago

When using the search box on a device with e-Ink screen both background and text are black. It would be nice to have an e-Ink friendly mode.

Search box is actually built-in OS component, unfortunately long neglected and unmaintained. The app doesn't control how it looks. Perhaps it will be replaced since after recent system updates it stopped working altogether - see https://github.com/itkach/aard2-android/pull/107. Note that .apk I build won't work for you as is though, because Google now requires minimum target version of 26 if I'm not mistaken for the app to be published in Play Store, and Android 4.2 is 15.

itkach commented 4 years ago

Also when the word is found in multiple dictionaries it is great to see all the entries on one page. The MDict app allows to expand several entries from different dictionaries or only one of them. It is very convenient, so I highly recommend to take a look at this approach.

This has been discussed before. In short, this approach would require a significant rewrite and doesn't work well for long content such as Wikipedia/Wiktionary. It's not going to happen (although people are free to write new UIs for the app if they feel so inclined).

outlogic commented 4 years ago

Here is the the full log https://drive.google.com/open?id=1blV2af0MDAUzUeyXJn13o908CVPy47s_

Also if you don't filter with grep perhaps there's more relevant context from the os side...

outlogic commented 4 years ago

When using the search box on a device with e-Ink screen both background and text are black. It would be nice to have an e-Ink friendly mode. Note that .apk I build won't work for you as is though, because Google now requires minimum target version of 26 if I'm not mistaken for the app to be published in Play Store, and Android 4.2 is 15.

I don't know how it works, but, unlike many other apps that don't work on my Likebook Plus with Android 4.2, Google Play still shows that AARD 2 is compatible with all my devices. And I can install it. I was also able to launch it from within the CoolReader and it translates just fine. The only problem so far was with launching it. May be it is somehow related to the first log I posted above and then edited it above: logcat | grep itkach.aard2 W/PackageManager( 347): Package itkach.aard2 desires unavailable shared library com.sec.android.app.multiwindow; ignoring! I/ActivityManager( 347): Force stopping package itkach.aard2 appid=10033 user=-1 I/ActivityManager( 347): START u0 {act=itkach.aard2 flg=0x10000000} from pid 10342 I/ActivityManager( 347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 10365 I/ActivityManager( 347): Start proc itkach.aard2 for activity itkach.aard2/.MainActivity: pid=10375 uid=10033 gids={50033, 1028, 1015, 3003} I/ActivityManager( 347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 7665 I/WindowState( 347): WIN DEATH: Window{41d65128 u0 itkach.aard2/itkach.aard2.MainActivity} I/ActivityManager( 347): Process itkach.aard2 (pid 10375) has died. W/ActivityManager( 347): Force removing ActivityRecord{41c6e918 u0 itkach.aard2/.MainActivity}: app died, no saved state I/ActivityManager( 347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 7665 I/ActivityManager( 347): Start proc itkach.aard2 for activity itkach.aard2/.MainActivity: pid=10457 uid=10033 gids={50033, 1028, 1015, 3003} I/WindowState( 347): WIN DEATH: Window{41db1eb0 u0 itkach.aard2/itkach.aard2.MainActivity} I/ActivityManager( 347): Process itkach.aard2 (pid 10457) has died. W/ActivityManager( 347): Force removing ActivityRecord{41c7a800 u0 itkach.aard2/.MainActivity}: app died, no saved state I/ActivityManager( 347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 7665 I/ActivityManager( 347): Start proc itkach.aard2 for activity itkach.aard2/.MainActivity: pid=10477 uid=10033 gids={50033, 1028, 1015, 3003} I/ActivityManager( 347): Process itkach.aard2 (pid 10477) has died. I/WindowState( 347): WIN DEATH: Window{41df7468 u0 itkach.aard2/itkach.aard2.MainActivity} W/ActivityManager( 347): Force removing ActivityRecord{41c99270 u0 itkach.aard2/.MainActivity}: app died, no saved state I/ActivityManager( 347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 10619 I/ActivityManager( 347): Start proc itkach.aard2 for activity itkach.aard2/.MainActivity: pid=10629 uid=10033 gids={50033, 1028, 1015, 3003} D/itkach.aard2.SlobDescriptorList(10629): beginUpdate D/itkach.aard2.SlobDescriptorList(10629): beginUpdate D/itkach.aard2.SlobDescriptorList(10629): endUpdate, changed? false D/itkach.aard2.SlobDescriptorList(10629): endUpdate, changed? true D/itkach.aard2.SlobDescriptorList(10629): beginUpdate D/itkach.aard2.SlobDescriptorList(10629): endUpdate, changed? false E/SurfaceFlinger( 106): add dialog --- itkach.aard2/itkach.aard2.MainActivity E/SurfaceFlinger( 106): add dialog --- itkach.aard2/itkach.aard2.MainActivity D/itkach.aard2.SlobDescriptorList(10629): beginUpdate D/itkach.aard2.SlobDescriptorList(10629): endUpdate, changed? false I/ActivityManager( 347): Displayed itkach.aard2/.MainActivity: +1s381ms

itkach commented 4 years ago

Here is the the full log https://drive.google.com/open?id=1blV2af0MDAUzUeyXJn13o908CVPy47s_

I get "The requested URL was not found on this server."

itkach commented 4 years ago

I don't know how it works, but, unlike many other apps that don't work on my Likebook Plus with Android 4.2, Google Play still shows that AARD 2 is compatible with all my devices. And I can install it.

You mention versions 0.38 and 0.39. Minimum target version was bumped in 0.40 (Play Store requirements) so you don't see it or later ones (latest is 0.43) and you won't see any updates that might be pushed to the Play store because it is not possible to publish to the Play store anything targeting Android < 8 (even if technically it is still compatible with those older versions)

outlogic commented 4 years ago

I get "The requested URL was not found on this server."

Please copy the URL with the underscore

outlogic commented 4 years ago

You mention versions 0.38 and 0.39. Minimum target version was bumped in 0.40 (Play Store requirements) so you don't see it or later ones (latest is 0.43) and you won't see any updates that might be pushed to the Play store because it is not possible to publish to the Play store anything targeting Android < 8 (even if technically it is still compatible with those older versions)

Tried to install version 0.43 with adb install and it worked. Tried to re-install from Google Play and in the about section I see the same version - 0.43.

p.s. But after re-installing I can only start it with adb untill I add a dictionary and close the app. The refresh button in the dictionaries section crashes the app.

logcat | grep itkach.aard2 W/ActivityManager( 347): No content provider found for permission revoke: file:///data/data/com.android.vending/cache/copies/itkach.aard2-1884012752.apk W/ActivityManager( 347): No content provider found for permission revoke: file:///data/data/com.android.vending/cache/copies/itkach.aard2-1884012752.apk W/PackageManager( 347): Package itkach.aard2 desires unavailable shared library com.sec.android.app.multiwindow; ignoring! I/ActivityManager( 347): Force stopping package itkach.aard2 appid=10033 user=-1 I/ActivityManager( 347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 7665 I/ActivityManager( 347): Start proc itkach.aard2 for activity itkach.aard2/.MainActivity: pid=13885 uid=10033 gids={50033, 1028, 1015, 3003} I/WindowState( 347): WIN DEATH: Window{41d307a0 u0 itkach.aard2/itkach.aard2.MainActivity} I/ActivityManager( 347): Process itkach.aard2 (pid 13885) has died. W/ActivityManager( 347): Force removing ActivityRecord{41d20ba8 u0 itkach.aard2/.MainActivity}: app died, no saved state W/WindowManager( 347): This window was lost: Window{41d307a0 u0 itkach.aard2/itkach.aard2.MainActivity} W/WindowManager( 347): mToken=AppWindowToken{42765278 token=Token{419e40f8 ActivityRecord{41d20ba8 u0 itkach.aard2/.MainActivity}}} W/WindowManager( 347): mRootToken=AppWindowToken{42765278 token=Token{419e40f8 ActivityRecord{41d20ba8 u0 itkach.aard2/.MainActivity}}} W/WindowManager( 347): mAppToken=AppWindowToken{42765278 token=Token{419e40f8 ActivityRecord{41d20ba8 u0 itkach.aard2/.MainActivity}}} W/WindowManager( 347): WindowStateAnimator{42729fa0 itkach.aard2/itkach.aard2.MainActivity}: W/WindowManager( 347): mSurface=Surface(name=itkach.aard2/itkach.aard2.MainActivity, identity=369) I/ActivityManager( 347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 14190 I/ActivityManager( 347): Start proc itkach.aard2 for activity itkach.aard2/.MainActivity: pid=14201 uid=10033 gids={50033, 1028, 1015, 3003} D/itkach.aard2.SlobDescriptorList(14201): beginUpdate D/itkach.aard2.SlobDescriptorList(14201): beginUpdate D/itkach.aard2.SlobDescriptorList(14201): endUpdate, changed? false D/itkach.aard2.SlobDescriptorList(14201): endUpdate, changed? true W/MainActivity(14201): at itkach.aard2.MainActivity.onPause(MainActivity.java:202) D/itkach.aard2.SlobDescriptorList(14201): beginUpdate D/itkach.aard2.SlobDescriptorList(14201): endUpdate, changed? false E/SurfaceFlinger( 106): add dialog --- itkach.aard2/itkach.aard2.MainActivity E/SurfaceFlinger( 106): add dialog --- itkach.aard2/itkach.aard2.MainActivity I/ActivityManager( 347): Displayed itkach.aard2/.MainActivity: +2s664ms D/itkach.aard2.SlobDescriptorList(14201): beginUpdate D/itkach.aard2.SlobDescriptorList(14201): endUpdate, changed? false I/ActivityManager( 347): START u0 {cmp=itkach.aard2/.FileSelectActivity} from pid 14201 E/SurfaceFlinger( 106): add dialog --- itkach.aard2/itkach.aard2.FileSelectActivity E/SurfaceFlinger( 106): add dialog --- itkach.aard2/itkach.aard2.FileSelectActivity E/SurfaceFlinger( 106): add dialog --- itkach.aard2/itkach.aard2.FileSelectActivity I/ActivityManager( 347): Displayed itkach.aard2/.FileSelectActivity: +640ms E/SurfaceFlinger( 106): remove dialog --- itkach.aard2/itkach.aard2.MainActivity E/SurfaceFlinger( 106): remove dialog --- itkach.aard2/itkach.aard2.MainActivity E/SurfaceFlinger( 106): remove dialog --- itkach.aard2/itkach.aard2.MainActivity W/Application(14201): at itkach.aard2.Application$EnableLinkHandling.doInBackground(Application.java:509) W/Application(14201): at itkach.aard2.Application$EnableLinkHandling.doInBackground(Application.java:501) E/SurfaceFlinger( 106): add dialog --- itkach.aard2/itkach.aard2.MainActivity E/SurfaceFlinger( 106): add dialog --- itkach.aard2/itkach.aard2.MainActivity E/SurfaceFlinger( 106): add dialog --- itkach.aard2/itkach.aard2.MainActivity E/SurfaceFlinger( 106): remove dialog --- itkach.aard2/itkach.aard2.FileSelectActivity E/SurfaceFlinger( 106): remove dialog --- itkach.aard2/itkach.aard2.FileSelectActivity E/SurfaceFlinger( 106): remove dialog --- itkach.aard2/itkach.aard2.FileSelectActivity E/SurfaceFlinger( 106): remove dialog --- itkach.aard2/itkach.aard2.FileSelectActivity E/SurfaceFlinger( 106): remove dialog --- itkach.aard2/itkach.aard2.MainActivity E/SurfaceFlinger( 106): remove dialog --- itkach.aard2/itkach.aard2.MainActivity I/ActivityManager( 347): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=itkach.aard2/.MainActivity} from pid 7665 E/SurfaceFlinger( 106): add dialog --- itkach.aard2/itkach.aard2.MainActivity E/SurfaceFlinger( 106): add dialog --- itkach.aard2/itkach.aard2.MainActivity I/ActivityManager( 347): Displayed itkach.aard2/.MainActivity: +1s240ms D/itkach.aard2.SlobDescriptorList(14201): beginUpdate D/itkach.aard2.SlobDescriptorList(14201): endUpdate, changed? true W/InputDispatcher( 347): channel '41d3bcb0 itkach.aard2/itkach.aard2.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9 E/InputDispatcher( 347): channel '41d3bcb0 itkach.aard2/itkach.aard2.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed! W/InputDispatcher( 347): Attempted to unregister already unregistered input channel '41d3bcb0 itkach.aard2/itkach.aard2.MainActivity (server)' E/SurfaceFlinger( 106): remove dialog --- itkach.aard2/itkach.aard2.MainActivity I/WindowState( 347): WIN DEATH: Window{41d3bcb0 u0 itkach.aard2/itkach.aard2.MainActivity} I/ActivityManager( 347): Process itkach.aard2 (pid 14201) has died. W/ActivityManager( 347): Force removing ActivityRecord{41c77860 u0 itkach.aard2/.MainActivity}: app died, no saved state

Olf0 commented 4 years ago

I was reading this, because I also observe Aard2 0.43 not starting on AOSP 4.1.2 (API level 16) and AOSP 4.4.4 (API level 19), while v0.41 (and older versions) works fine on both devices. All these versions are / were installed from F-Droid (which states that the minimum Android version is 4.0.3 for Aard2 0.4{1,3,4}) per F-Droid client app.

I will try v0.44 (first the version compiled at F-Droid, then the one from the releases here) this weekend. If Aard 0.44 still shows this issue, I might provide logs from a these devices.