Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

Could not find the provider authority. #106

Open
tajchert opened this issue Jun 2, 2017 · 9 comments
Open

Could not find the provider authority. #106

tajchert opened this issue Jun 2, 2017 · 9 comments

Comments

@tajchert
Copy link

tajchert commented Jun 2, 2017

I got this error from one of users phones (LG-D855 Android 6.0):

Fatal Exception: java.lang.RuntimeException: Unable to create application XApplication.onCreate: net.grandcentrix.tray.core.TrayRuntimeException: Internal tray error. Could not find the provider authority. Please fill an issue at https://github.com/grandcentrix/tray/issues
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4824)
       at android.app.ActivityThread.access$1600(ActivityThread.java:157)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:5551)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
Caused by net.grandcentrix.tray.core.TrayRuntimeException: Internal tray error. Could not find the provider authority. Please fill an issue at https://github.com/grandcentrix/tray/issues
       at net.grandcentrix.tray.provider.TrayContract.getAuthority(SourceFile:138)
       at net.grandcentrix.tray.provider.TrayContract.generateContentUri(SourceFile:109)
       at net.grandcentrix.tray.provider.TrayContract.generateContentUri(SourceFile:80)
       at net.grandcentrix.tray.provider.TrayUri.(SourceFile)
       at net.grandcentrix.tray.provider.ContentProviderStorage.(SourceFile)
       at net.grandcentrix.tray.TrayPreferences.(SourceFile)
       at net.grandcentrix.tray.TrayPreferences.(SourceFile)
       at net.grandcentrix.tray.AppPreferences.(SourceFile)
       at X$Builder.(SourceFile)
       at X.init(SourceFile:36)
       at X.onCreate(SourceFile:57)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4821)
       at android.app.ActivityThread.access$1600(ActivityThread.java:157)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:5551)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
@StefMa
Copy link
Contributor

StefMa commented Jun 12, 2017

Hey,

can you please give us a little bit more infos?
How do you have setup Tray?
Have you noticed the changes in 0.12.0?
What call was made until it's crashed? 🤔

@tajchert
Copy link
Author

Hi, sure.
We are soon about to open source our SDK so will will call you on that at that point (<1-2 weeks).
It was one time crash on over 20k devices so no any major issue at all.

Yes, we use 0.12.0 and no ContentProvider.

It was only "new AppPreferences(context)" from onCreate in Application.

@tajchert
Copy link
Author

tajchert commented Jun 12, 2017

Ok, I checked Fabric once again:
6 users crashed with it, 6 times (all together so only once).
Samsung and LG.
Android 4.4.2, 6.0, 6.0.1, 4.1.2, 4.4.4

Always in "new AppPreferences(this)" in Application "onCreate()".

@fillobotto
Copy link

Same scenario for me. We are talking about lonely crashes but that's it

@eggcaker
Copy link

eggcaker commented Jul 3, 2017

+1

@StefMa
Copy link
Contributor

StefMa commented Jul 3, 2017

@fillobotto can you please show us some more information?
How do you setup tray? On which devices/OS will happen the crash? 🤔

@tajchert is the SDK open source now? Would be great if we can have a look inside it...

@tajchert
Copy link
Author

tajchert commented Jul 3, 2017

@StefMa - sorry not yet. I will post it here when done.

@OUCHUNYU
Copy link

OUCHUNYU commented Apr 23, 2018

@StefMa In my case, I use tray in a library project. The library splits into client and service. The client part of the library is used in application main process. The service part is a remote service running in a separate process. Both client and service initialize tray AppPreferences object and do read/write operations. For small portion of users I get


Fatal Exception: java.lang.RuntimeException: Unable to create application xxxxxxxx: xxxxx: Internal tray error. Could not find the provider authority. Please fill an issue at https://github.com/grandcentrix/tray/issues
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6431)
       at android.app.ActivityThread.access$1800(ActivityThread.java:229)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1887)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:7331)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by net.grandcentrix.tray.a.h: Internal tray error. Could not find the provider authority. Please fill an issue at https://github.com/grandcentrix/tray/issues
       at net.grandcentrix.tray.provider.TrayContract.getAuthority(TrayContract.java:138)
       at net.grandcentrix.tray.provider.TrayContract.generateContentUri(TrayContract.java:109)
       at net.grandcentrix.tray.provider.TrayContract.generateContentUri(TrayContract.java:80)
       at net.grandcentrix.tray.provider.TrayUri.(TrayUri.java:75)
       at net.grandcentrix.tray.provider.ContentProviderStorage.(ContentProviderStorage.java:146)
       at net.grandcentrix.tray.TrayPreferences.(TrayPreferences.java:43)
       at net.grandcentrix.tray.TrayPreferences.(TrayPreferences.java:48)
       at net.grandcentrix.tray.AppPreferences.(AppPreferences.java:41)

@imlk0
Copy link

imlk0 commented Jun 1, 2018

I try to use Tray because I cant access the shared_prefs directory.
But I faced this Exception when i use tray,
So,I give up it,

and now I find a mistake in my AndroidManifest.xml

            android:exported="false"
            android:isolatedProcess="true"  //here !!!!!!!!!!!!!!!!!!!!!!!!!!!1
            android:label="@string/service_name"
            android:process=":autoupdate"
            android:permission="">

set android:isolatedProcess="true" makes my application process and the service process run in different UID (i check it by ps commend),
and that cause the Permission Denied in SharedPreference.

I don't know if it is the same mistake that cause the tray to an Exception.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

6 participants