uTag icon indicating copy to clipboard operation
uTag copied to clipboard

Widget doesn't work on Pixel 8

Open benjkr opened this issue 2 months ago • 7 comments

I am using Pixel 8 running Android 16 (BP3A.250905.014) Trying to add a widget to see my trackers but getting this message:

Screenshot_20251003-104155.png

Thanks for the app! Works great apart for this :( To clarify, both Location History and Location produce the same results: "Can't load widget". If logs or something like that are necessary, ask and I would give them. I don't know how to find them, so help for direction would be appreciated.

benjkr avatar Oct 03 '25 08:10 benjkr

For widgets, you'd need to take a logcat filtered by AppWidgetHostView, since the logs would be the responsibility of the launcher instead of uTag.

KieronQuinn avatar Oct 03 '25 08:10 KieronQuinn

Same issue on Pixel 10 pro XL.

So might be a pixel issue.

HJADR avatar Oct 13 '25 05:10 HJADR

Same issue here on Pixel 10 Pro XL too. Works fine on my Lenovo Tab Plus.

ALoulie avatar Oct 13 '25 10:10 ALoulie

@KieronQuinn Here is the logcat when installing the widget on Pixel 8 Pro (Android 16, BP3A.251005.004.B1):

--------- beginning of main
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: Error inflating RemoteViews
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: android.widget.RemoteViews$ActionException: java.lang.SecurityException: com.google.android.apps.nexuslauncher is not allowed to access encrypted files
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.widget.RemoteViews$BaseReflectionAction.initActionAsync(RemoteViews.java:2800)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.widget.RemoteViews$AsyncApplyTask.doInBackground(RemoteViews.java:8351)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.widget.RemoteViews$AsyncApplyTask.doInBackground(RemoteViews.java:8298)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.os.AsyncTask$3.call(AsyncTask.java:396)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at java.util.concurrent.FutureTask.run(FutureTask.java:317)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at java.lang.Thread.run(Thread.java:1119)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: Caused by: java.lang.SecurityException: com.google.android.apps.nexuslauncher is not allowed to access encrypted files
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3355)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.os.Parcel.createException(Parcel.java:3339)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.os.Parcel.readException(Parcel.java:3322)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:201)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:164)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:814)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:2045)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1860)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.content.ContentResolver.openInputStream(ContentResolver.java:1530)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.graphics.ImageDecoder$ContentResolverSource.createImageDecoder(ImageDecoder.java:297)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.graphics.ImageDecoder.decodeDrawableImpl(ImageDecoder.java:1750)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.graphics.ImageDecoder.decodeDrawable(ImageDecoder.java:1742)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.widget.ImageView.getDrawableFromUri(ImageView.java:1019)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.widget.ImageView.setImageURIAsync(ImageView.java:575)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at java.lang.invoke.MethodHandle.invokeExact(Native Method)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at java.lang.invoke.MethodHandle.invokeExactWithFrame(Native Method)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at java.lang.invoke.Transformers$Transformer.invokeFromTransform(Transformers.java:91)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at java.lang.invoke.Transformers$AsTypeAdapter.transform(Transformers.java:1817)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at java.lang.invoke.MethodHandle.transformInternal(MethodHandle.java:1615)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	at android.widget.RemoteViews$BaseReflectionAction.initActionAsync(RemoteViews.java:2786)
10-23 14:45:09.527  2629  2629 W AppWidgetHostView: 	... 7 more

sA1mon avatar Oct 23 '25 11:10 sA1mon

Same issue here on Pixel 7 Pro. Worked fine in the past

javier-mateos avatar Oct 25 '25 10:10 javier-mateos

Is there anything we can do to help solve the issue?

HJADR avatar Nov 14 '25 20:11 HJADR

Experiencing same on Pixel 6 Pro, and Pixel 7 (non-Pro). I wonder what "encrypted files" are trying to be accessed that seems to work just fine on non-Pixel devices?

garrettcook avatar Nov 23 '25 03:11 garrettcook

I pulled a log as well but have nothing regarding "encrypted" displayed. Honestly unsure what relevant portions I should post beyond seeing 12 entries that look like

[2025-12-14 08:00:49.034 Uid(value=10593):5700:5700 E/nquinn.app.utag] Invalid resource ID 0x00000000.

Edit: Pixel 9 Pro XL running the latest A16 patch & Nova Launcher Prime.

FazeThree71 avatar Dec 14 '25 14:12 FazeThree71

1.0.12 now fixes this. For a bit of a technical explanation:

Until Android 16, it was possible for an app to detect which app was binding its widget by calling Activity.getCallingPackage(). Since all apps that bind widgets have to use startActivityForResult, this was guaranteed to be filled, and was thought to be pretty safe (albeit never officially recommended).

In Android 16, with the other completely unannounced changes around "remote adapter conversion" (converting widgets that use lists to use RemoteCollectionItems instead of the older service-based setup), Google added a proxy activity, which is used when binding a widget instead. They've never said why this change for adapters was even implemented, let alone the seemingly unrelated change to using a proxied configuration launch, but it means that every widget now just sees the calling app as "android".

uTag up until now had been storing the packages that actually used the widget, and was restricting access to the map images to those apps. This meant that it wasn't possible for apps that hadn't explicitly added the widget (and therefore been granted access), could not get access to an image with the location of your Tags. It was a security feature.

Because of this change, I've had to reduce the security on Android 16+, to now allow implicit access to the launcher by default (which covers 99% of cases), and add an option for anyone who is using widgets that are not bound by the launcher (eg. the Lockscreen Widgets and Drawer app) to allow other apps access. You should only enable this option in that scenario, since it gives all apps access to the images.

KieronQuinn avatar Dec 16 '25 01:12 KieronQuinn

Wonderful! Thank you so much for working on this, and for the explanation.

garrettcook avatar Dec 16 '25 03:12 garrettcook

Confirmed this is working for me now. Great work!

FazeThree71 avatar Dec 16 '25 23:12 FazeThree71