Etar-Group / Etar-Calendar

Android open source calendar
https://f-droid.org/packages/ws.xsoh.etar/
GNU General Public License v3.0
2.06k stars 393 forks source link

Crash on launch #1532

Closed Spiralo-Idioide closed 11 months ago

Spiralo-Idioide commented 11 months ago

Infos

Problem

If I don't accept calendar permission the app does not crash. But as soon as I accord it the app crash.

Logs (I think)

onResume getComponentName().getClassName():com.android.calendar.AllInOneActivity
Shutting down VM
FATAL EXCEPTION: main
Process: ws.xsoh.etar, PID: 29525
java.lang.RuntimeException: Unable to resume activity {ws.xsoh.etar/com.android.calendar.AllInOneActivity}: java.lang.SecurityException: Failed to find provider com.android.calendar for user 0; expected to find a valid ContentProvider for this authority
    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4233)
    at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4265)
    at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
    at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2041)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7386)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
Caused by: java.lang.SecurityException: Failed to find provider com.android.calendar for user 0; expected to find a valid ContentProvider for this authority
    at android.os.Parcel.createException(Parcel.java:2072)
    at android.os.Parcel.readException(Parcel.java:2040)
    at android.os.Parcel.readException(Parcel.java:1988)
    at android.content.IContentService$Stub$Proxy.registerContentObserver(IContentService.java:1234)
    at android.content.ContentResolver.registerContentObserver(ContentResolver.java:2263)
    at android.content.ContentResolver.registerContentObserver(ContentResolver.java:2251)
    at com.android.calendar.AllInOneActivity.onResume(AllInOneActivity.java:617)
    at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1453)
    at android.app.Activity.performResume(Activity.java:7993)
    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4223)
    at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4265) 
    at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52) 
    at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) 
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2041) 
    at android.os.Handler.dispatchMessage(Handler.java:107) 
    at android.os.Looper.loop(Looper.java:214) 
    at android.app.ActivityThread.main(ActivityThread.java:7386) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980) 
Caused by: android.os.RemoteException: Remote stack trace:
    at com.android.server.content.ContentService.registerContentObserver(ContentService.java:344)
    at android.content.IContentService$Stub.onTransact(IContentService.java:482)
    at android.os.Binder.execTransactInternal(Binder.java:1021)
    at android.os.Binder.execTransact(Binder.java:994)
jspricke commented 11 months ago

Failed to find provider com.android.calendar for user 0; expected to find a valid ContentProvider for this authority

This sounds like you don't have the Android Calendar provider installed or deactivated it. Etar can not work without as explained in the readme: https://github.com/Etar-Group/Etar-Calendar#technical-explanation

Spiralo-Idioide commented 11 months ago

Thank you ! It worked perfectly.

Also thank for the fast answers.

levone1 commented 1 month ago

Failed to find provider com.android.calendar for user 0; expected to find a valid ContentProvider for this authority

This sounds like you don't have the Android Calendar provider installed or deactivated it. Etar can not work without as explained in the readme: https://github.com/Etar-Group/Etar-Calendar#technical-explanation

Same happens to me, but only in more recent versions. When I go back to 1.0.23, it works fine. I am using TCL Android 11, and have the stock calendar app installed as calendar provider.

Output of adb shell pm list packages -s | grep cal :

package:com.android.providers.calendar
package:com.android.calendar
package:com.android.calllogbackup
package:com.android.localtransport
package:com.google.android.syncadapters.calendar
package:com.mediatek.calendarimporter
package:com.mediatek.callrecorder
package:com.android.calculator2

Seems like at some point, the criteria for "valid ContentProvider" changed...

levone1 commented 1 month ago

Thank you ! It worked perfectly.

Also thank for the fast answers.

Can you tell me what worked perfectly? Did you install some other package to make it work?