Openhab-android: Cannot install app on Android 5 (error -504)

Created on 22 Mar 2020  Â·  13Comments  Â·  Source: openhab/openhab-android

Steps to reproduce

Do one of the following:

  • Try to install openHAB via Play Store
  • Download APK from apkpure.com and try to install it

Error: Cannot install app. Error code in Play Store is: -504.

Environment data

Client

  • Android version: 5.0.1
  • Device model: Telekom Puls (Tablet)
  • App version: Play Store: 2.11.0
  • Build flavor : ?
  • Device language: German

What I did try

  • Reset Google Play Store, Google Service Manager and Download Manager data
  • Readd Google account to the device

Can anyone reproduce this? Any ideas?

bug

All 13 comments

Can you try 2.12.0 from github?
What kind of device is it? Smartphone, tablet,...?

Thank you for the reply! This APK fails as well as installation. Telekom Puls is a tablet (added above).

Do you have multiple users on the tablet?

Did you try to install it over adb?

I'm closing this issue as I don't think it's the apk that causes the issue.

Did you try to install it over adb?

What's the simplest way to do so?

Sorry, the issue still persists:

$ adb install '.\openhab-android.apk'
Performing Push Install
.\openhab-android.apk: 1 file pushed, 0 skipped. 4.1 MB/s (9979134 bytes in 2.314s)
        pkg: /data/local/tmp/openhab-android.apk
Failure [INSTALL_FAILED_DEXOPT]

What error details should I collect and how? :)

Can you post the output of 'adb logcat' after that attempt? Googling for that error suggests there are different potential reasons for this, among which are disk space issues or issues in the tooling we use to build the app.

Can you post the output of 'adb logcat' after that attempt?

That command does never terminate (I have been waiting a few hours). The output file is dozens of MBs large and contains sensitive information. How can I extract the relevant logs?

Just

  • start 'adb logcat'
  • attempt install (from another terminal)
  • wait until error message appears
  • press Ctrl+C to stop 'adb logcat'
  • post output that appeared in between

Ah, that's good to know :)

Here is what I found:

W/PackageParser(26461): Problem in package /data/local/tmp/openhab-android.apk:
W/PackageParser(26461): Unknown element under <activity>: layout at /data/local/tmp/openhab-android.apk Binary XML file line #103
...
W/PackageManager(23117): Package org.openhab.habdroid desires unavailable shared library org.apache.http.legacy; ignoring!
...
I/PackageManager(23117): Perform pre-dex opt for package: org.openhab.habdroid
I/art     (23117): DexFile_isDexOptNeeded failed to open oat file '/data/dalvik-cache/arm/data@[email protected]@[email protected]' for file location '/data/app/org.openhab.habdroid-1/base.apk': Failed to open oat filename for reading: No such file or directory
...
W/PackageManager(23117): Package couldn't be installed in /data/app/org.openhab.habdroid-1
W/PackageManager(23117): com.android.server.pm.PackageManagerException: scanPackageLI
W/PackageManager(23117):    at com.android.server.pm.PackageManagerService.scanPackageDirtyLI(PackageManagerService.java:6309)
W/PackageManager(23117):    at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:5615)
W/PackageManager(23117):    at com.android.server.pm.PackageManagerService.installNewPackageLI(PackageManagerService.java:10744)
W/PackageManager(23117):    at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:11299)
W/PackageManager(23117):    at com.android.server.pm.PackageManagerService.access$2800(PackageManagerService.java:243)
W/PackageManager(23117):    at com.android.server.pm.PackageManagerService$6.run(PackageManagerService.java:9193)
W/PackageManager(23117):    at android.os.Handler.handleCallback(Handler.java:815)
W/PackageManager(23117):    at android.os.Handler.dispatchMessage(Handler.java:104)
W/PackageManager(23117):    at android.os.Looper.loop(Looper.java:194)
W/PackageManager(23117):    at android.os.HandlerThread.run(HandlerThread.java:61)
W/PackageManager(23117):    at com.android.server.ServiceThread.run(ServiceThread.java:46)
I/PackageManager(23117): Installation done for package: null

Does this include the relevant errors? Otherwise, I will have to through the whole 1.5 MB file to remove all private information.

Yes, that's the relevant part, thanks. Now we 'just' need to make sense of it ... it doesn't obviously make sense to me. I'll google around a bit.

Edit: did you cut that output (visible via the ellipsis)? Are you sure there's nothing related between the 'failed to open oat file' message and the next one after ellipsis? Anything that has 'Package' in its tag might be related.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

holmes picture holmes  Â·  7Comments

maniac103 picture maniac103  Â·  5Comments

ThomDietrich picture ThomDietrich  Â·  6Comments

KushAdit picture KushAdit  Â·  12Comments

kaikreuzer picture kaikreuzer  Â·  4Comments