Skip to content
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

App crashes instantly on open #174

Closed
3 tasks done
Wojtaz0w opened this issue May 27, 2023 · 5 comments
Closed
3 tasks done

App crashes instantly on open #174

Wojtaz0w opened this issue May 27, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@Wojtaz0w
Copy link

Steps to reproduce

  1. Open app after clean install

Expected behavior

It works

Actual behavior

It crashes

Connect You version

4.0

Android version

Android 13

Other details

CRASH LOG: https://paste.crdroid.net/JBakCU

time: 1685178351863
msg: java.lang.SecurityException: Remote stack trace:
	at com.android.server.am.ContentProviderHelper.checkAssociationAndPermissionLocked(ContentProviderHelper.java:651)
	at com.android.server.am.ContentProviderHelper.getContentProviderImpl(ContentProviderHelper.java:354)
	at com.android.server.am.ContentProviderHelper.getContentProvider(ContentProviderHelper.java:140)
	at com.android.server.am.ActivityManagerService.getContentProvider(ActivityManagerService.java:6559)
	at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2412)

stacktrace: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bnyro.contacts/com.bnyro.contacts.ui.MainActivity}: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{af5ccaa 14351:com.bnyro.contacts/u0a385} (pid=14351, uid=10385) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3646)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3783)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7919)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:859)
Caused by: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{af5ccaa 14351:com.bnyro.contacts/u0a385} (pid=14351, uid=10385) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3028)
	at android.os.Parcel.createException(Parcel.java:3012)
	at android.os.Parcel.readException(Parcel.java:2995)
	at android.os.Parcel.readException(Parcel.java:2937)
	at android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:5258)
	at android.app.ActivityThread.acquireProvider(ActivityThread.java:7054)
	at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:3420)
	at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:2526)
	at android.content.ContentResolver.query(ContentResolver.java:1203)
	at android.content.ContentResolver.query(ContentResolver.java:1151)
	at android.content.ContentResolver.query(ContentResolver.java:1107)
	at m4.d.<init>(SourceFile:85)
	at com.bnyro.contacts.ui.MainActivity.onCreate(SourceFile:46)
	at android.app.Activity.performCreate(Activity.java:8311)
	at android.app.Activity.performCreate(Activity.java:8290)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1423)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3627)
	... 12 more
Caused by: android.os.RemoteException: Remote stack trace:
	at com.android.server.am.ContentProviderHelper.checkAssociationAndPermissionLocked(ContentProviderHelper.java:651)
	at com.android.server.am.ContentProviderHelper.getContentProviderImpl(ContentProviderHelper.java:354)
	at com.android.server.am.ContentProviderHelper.getContentProvider(ContentProviderHelper.java:140)
	at com.android.server.am.ActivityManagerService.getContentProvider(ActivityManagerService.java:6559)
	at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2412)

Error seems to be about permissions. It is first time I ever install this app. After I gave it access to contacts it worked. But it doesn't ask for permission - just crashes

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I will fill out all of the requested information in this form.
@Wojtaz0w Wojtaz0w added the bug Something isn't working label May 27, 2023
@Bnyro Bnyro mentioned this issue May 27, 2023
3 tasks
@smaragdus
Copy link

The same problem here on Android 11. When I install Connect You on top of version 3.1 it works but when I make a clean install of version 4.0 the app keeps crashing on launching it.

@Bnyro
Copy link
Member

Bnyro commented May 27, 2023

I'm aware of the issue, I will try to release a hotfix version later today if my time allows me to.
Sorry for the inconvenience.

@Bnyro Bnyro closed this as completed in 6e7f22b May 27, 2023
@Wojtaz0w
Copy link
Author

Thank you very much, you are amazing for responding so quickly 😄

@smaragdus
Copy link

@Bnyro

Thanks for the quick fix, version 4.1 works as expected, regards.

@Bnyro
Copy link
Member

Bnyro commented May 27, 2023

Great to hear, thank you both for reporting the issue quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants