New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing APK fails with 'java.lang.RuntimeException: Could not copy bitmap to parcel blob' #2026
Comments
To be clear, the Android installer crashes here. This shouldn't happen no matter what we do on our end. Did you try to contact the GrapheneOS devs? |
I'm not sure that this is just GrapheneOS, because I can't get 1.27.0 and 1.27.1 to install from F-Droid on either a Pixel 7 Pro or a Pixel Tablet, both running the latest stock operating system (December 2023). Other F-Droid apps install without problem. I'll check my logs later today to make sure whether it's the same error or not. |
Yep, it appears to be the same error message on my Pixel 7 Pro, Stock OS, December 2023 update: Stack TraceProcess: com.google.android.packageinstaller
java.lang.RuntimeException: Could not copy bitmap to parcel blob.
at android.graphics.Bitmap.nativeWriteToParcel(Native Method)
at android.graphics.Bitmap.writeToParcel(Bitmap.java:2271)
at android.os.Parcel.writeParcelable(Parcel.java:2584)
at com.android.packageinstaller.PackageUtil$AppSnippet.writeToParcel(PackageUtil.java:151)
at android.os.Parcel.writeParcelable(Parcel.java:2584)
at android.os.Parcel.writeValue(Parcel.java:2485)
at android.os.Parcel.writeValue(Parcel.java:2362)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:1298)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1843)
at android.os.Bundle.writeToParcel(Bundle.java:1389)
at android.os.Parcel.writeBundle(Parcel.java:1367)
at android.content.Intent.writeToParcel(Intent.java:11807)
at android.os.Parcel.writeTypedObject(Parcel.java:2203)
at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:2077)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1873)
at android.app.Activity.startActivityForResult(Activity.java:5615)
at android.app.Activity.startActivityForResult(Activity.java:5573)
at android.app.Activity.startActivity(Activity.java:6071)
at android.app.Activity.startActivity(Activity.java:6038)
at com.android.packageinstaller.PackageInstallerActivity.startInstall(PackageInstallerActivity.java:701)
at com.android.packageinstaller.PackageInstallerActivity.lambda$bindUi$0(PackageInstallerActivity.java:479)
at com.android.packageinstaller.PackageInstallerActivity.$r8$lambda$RCIm8wl1VPqdfQgkgmrBIDbuvOQ(PackageInstallerActivity.java:0)
at com.android.packageinstaller.PackageInstallerActivity$$ExternalSyntheticLambda0.onClick(R8$$SyntheticClass:0)
at com.android.packageinstaller.AlertController$ButtonHandler.handleMessage(AlertController.java:144)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8194)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) |
If it helps anything, both of my devices are currently running 1.26.1, installed prior to the December 2023 android update |
I'm running the fork version v1.27.0.1 installed via F-Droid on my Pixel 4a 5G without problems. Edit: just installed the regular app via F-Droid. Everything working as intended. I'm using Droid-ify as my f-droid client and running vanilla Android 14. |
I'm guessing it has something to do with some changes to Package Installer in Android 14 QPR1. See here: |
Another app experiencing the same issue has worked around it by resizing an image asset: uazo/cromite@1a8ef38. The workaround has been confirmed to work: uazo/cromite#595 (comment) I have reported the issue also on the GrapheneOS forum at https://discuss.grapheneos.org/d/9645-javalangruntimeexception-could-not-copy-bitmap-to-parcel-blob as suggested in #2026 (comment). |
This is my situation as well - one of my 6a devices never had it installed, I can no longer install it on that device as of today (all the 14 updates applied etc.) The other with 1.26.1 installed pre-14 upgrades is working just fine, but will not upgrade to the latest from F-Droid as of today. https://forum.f-droid.org/t/syncthing-1-27-0-1-wont-update-install-on-2x-pixel-6a/24552 |
The reply in the grapheneos thread linked above suggests to me that this is an aosp (android) issue that was fixed, and system updates may not have rolled out to everyone affected:
So I suggest to upgrade your system if you are affected, as soon as you can. |
As far as I can tell, the stock pixel rom hasn't released an update yet for this, but it appears to be in the beta changelog, so hopefully they push it in the January update, but that's still almost a month away |
Reporting the same issue on Pixel 8 Pro after update to Android 14 UQ1A.231205.015 with the latest F-Droid version. Really unfortunate, since I've uninstalled the app while trying to troubleshoot the upgrade. Google Play version of the app works though, so will continue using that till the fix is out. |
Just in case it helps anyone else that wants to upgrade syncthing before Google fixes this, I was able to download the apk from f-droid (be sure to validate the signature), and install it with |
It fails for me on 2x different Pixel 6a w/December updates (one with the app already installed previously, one without) using a direct download; it's the system level Android APK installer failing, not the F-Droid client app. |
I can confirm that I had the issue and was completely unable to install Syncthing, and that when I opted into the Pixel beta and got the newer firmware out was resolved. So the next firmware update should fix it for everyone. |
Well yeah, clearly not our bug - closing. |
The brand new 2024-01-05 security update applied to my Pixel 6a devices does not solve the problem, still crashes.
It may not directly be, but it sure would be nice if the community was able to use this OPEN issue as a focal point until the actual problem is resolved. As it stands, the syncthing-android package (via F-Droid) is the one and only application out of everything on my devices which can't upgrade. Tangentially it is our (syncthing) issue in the sense of there are workarounds which could be applied; other projects (linked above) have done workaround to avoid the bug, the syncthing-android packagers could possibly do the same but choose not to at this time. |
I've tried to limit the vector path length of our drawables in #2035. Could you test if the app is installable with these changes? The debug apk can be downloaded for this build: https://github.com/syncthing/syncthing-android/actions/runs/7424933082 |
Thank you - alas, it sadly seems to crash the same in my test on a stock 6a. I'm using my one device which has never been syncthing-installed ("clean") and it appears to crash the on-device APK installer app in the same way as the releases. |
Sadly same thing for me. The last two versions of syncthing via F-Droid do not install for me. |
If someone is able to figure out what exactly triggers the crash, I could try to patch that. |
Disclaimer: I'm not a programmer. :) Looking at how the other linked project solved it, it boils down to this:
Using that as an idea, I started digging around in the code and found two "these are not
I found two others which had a "high" (non-24) viewport specified:
I tried to backtrace the Android API reference ( My thought is "what if we make those values proper ints? and should they just be generically 24?" ; I have no idea what these things actually are to the code, the next person can maybe pick up my idea from here... |
I had the same initial problem on my Pixel 7a (with 5. Jan. updates) but I was able to install the provided debug apk via |
I am unable to install Syncthing on Android 14, receiving the following stack trace from the package installer when attempting to install the APK from https://github.com/syncthing/syncthing-android/releases/tag/1.27.1:
Stack trace
My phone is a Google Pixel 6a running Android 14 (GrapheneOS UQ1A.231205.015.2023120701).
I was previously using https://github.com/Catfriend1/syncthing-android from F-Droid but updates started crashing the installer as of a couple days ago, with the stack trace above. I figured it might be an issue with the fork and so I uninstalled it and tried installing https://github.com/syncthing/syncthing-android instead, however I received the same result. I figured it might an F-Droid problem so I tried installing the APK directly downloaded from this GitHub repository, which had the same result. I tried versions 1.27.1, 1.27.0, 1.26.1, and 1.26.0, which all had the same issue. I am confident that I was previously using one of these versions without a problem, so I think there is an incompatibility with a recent release of GrapheneOS.
Other apps can still be installed and updated on my phone, just not Syncthing (or Syncthing-Fork).
The text was updated successfully, but these errors were encountered: