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

[InitialActivity::getStartupFailureType] StorageAccessException: No write access to AnkiDroid directory /storage/emulated/0/AnkiDroid #17374

Closed
Tracked by #17370
david-allison opened this issue Nov 7, 2024 · 2 comments
Labels

Comments

@david-allison
Copy link
Member

david-allison commented Nov 7, 2024

https://ankidroid.org/acra/app/1/bug/250201/report/e477fd85-ca48-4956-bb25-e2d69be83879

com.ichi2.anki.exception.StorageAccessException: No write access to AnkiDroid directory /storage/emulated/0/AnkiDroid
	at com.ichi2.anki.exception.StorageAccessException.<init>(StorageAccessException.kt:22)
	at com.ichi2.anki.exception.StorageAccessException.<init>(StorageAccessException.kt:19)
	at com.ichi2.anki.CollectionHelper.initializeAnkiDroidDirectory(CollectionHelper.kt:91)
	at com.ichi2.anki.CollectionManager.collectionPathInValidFolder(CollectionManager.kt:264)
	at com.ichi2.anki.CollectionManager.ensureOpenInner(CollectionManager.kt:243)
	at com.ichi2.anki.CollectionManager.getColUnsafe$lambda$11$lambda$10(CollectionManager.kt:299)
	at com.ichi2.anki.CollectionManager$withQueue$3.invokeSuspend(CollectionManager.kt:103)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.java:111)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)
--------- beginning of main
--------- beginning of system
11-07 06:56:52.194 I/AnkiDroid( 6587): Timber config: PRODUCTION
11-07 06:56:52.195 I/AnkiDroid( 6587): initialize()
11-07 06:56:52.599 I/AnkiDroid( 6587): Not participating in analytics sample (sample percentage vs random: 10 36)
11-07 06:56:52.599 I/AnkiDroid( 6587): setOptIn(): from false to false
11-07 06:56:52.599 I/AnkiDroid( 6587): Not participating in analytics sample (sample percentage vs random: 10 70)
11-07 06:56:52.638 I/AnkiDroid( 6587): Creating notification channel with id/name: General Notifications/AnkiDroid
11-07 06:56:52.641 I/AnkiDroid( 6587): Creating notification channel with id/name: Synchronization/Sincronización
11-07 06:56:52.641 I/AnkiDroid( 6587): Creating notification channel with id/name: Global Reminders/Tarjetas programadas
11-07 06:56:52.642 I/AnkiDroid( 6587): Creating notification channel with id/name: Deck Reminders/Recordatorios
11-07 06:56:52.658 E/AnkiDroid( 6587): Instrumentation/ Could not initialize AnkiDroid directory
11-07 06:56:52.658 E/AnkiDroid( 6587): com.ichi2.anki.exception.StorageAccessException: No write access to AnkiDroid directory /storage/emulated/0/AnkiDroid
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at com.ichi2.anki.exception.StorageAccessException.<init>(StorageAccessException.kt:22)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at com.ichi2.anki.exception.StorageAccessException.<init>(StorageAccessException.kt:19)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at com.ichi2.anki.CollectionHelper.initializeAnkiDroidDirectory(CollectionHelper.kt:91)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at com.ichi2.anki.AnkiDroidApp.onCreate(AnkiDroidApp.kt:194)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7593)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.app.ActivityThread.access$1500(ActivityThread.java:301)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2177)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.os.Handler.dispatchMessage(Handler.java:106)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.os.Looper.loop(Looper.java:246)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.app.ActivityThread.main(ActivityThread.java:8653)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at java.lang.reflect.Method.invoke(Native Method)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
11-07 06:56:52.658 E/AnkiDroid( 6587): 
11-07 06:56:52.658 E/AnkiDroid( 6587): com.ichi2.anki.exception.StorageAccessException: No write access to AnkiDroid directory /storage/emulated/0/AnkiDroid
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at com.ichi2.anki.exception.StorageAccessException.<init>(StorageAccessException.kt:22)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at com.ichi2.anki.exception.StorageAccessException.<init>(StorageAccessException.kt:19)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at com.ichi2.anki.CollectionHelper.initializeAnkiDroidDirectory(CollectionHelper.kt:91)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at com.ichi2.anki.AnkiDroidApp.onCreate(AnkiDroidApp.kt:194)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7593)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.app.ActivityThread.access$1500(ActivityThread.java:301)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2177)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.os.Handler.dispatchMessage(Handler.java:106)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.os.Looper.loop(Looper.java:246)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at android.app.ActivityThread.main(ActivityThread.java:8653)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at java.lang.reflect.Method.invoke(Native Method)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
11-07 06:56:52.658 E/AnkiDroid( 6587): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
11-07 06:56:52.668 I/AnkiDroid( 6587): isLegacyStorage(): current dir: /storage/emulated/0/AnkiDroid
11-07 06:56:52.668 I/AnkiDroid( 6587): scoped external dirs: /storage/emulated/0/Android/data/com.ichi2.anki/files
11-07 06:56:52.668 I/AnkiDroid( 6587): scoped internal dir: /data/user/0/com.ichi2.anki/files
11-07 06:56:52.669 I/AnkiDroid( 6587): isLegacyStorage(): true
11-07 06:56:56.847 I/AnkiDroid( 6587): AnkiDroidApp: Starting Services
11-07 06:56:56.848 W/AnkiDroid( 6587): AnkiDroidApp/ BootService - unexpected action received, ignoring: null
11-07 06:56:56.912 I/AnkiDroid( 6587): IntentHandler::onCreate
11-07 06:56:56.912 I/AnkiDroid( 6587): Setting theme to BLACK
11-07 06:56:56.940 I/AnkiDroid( 6587): Launching DeckPicker
11-07 06:56:57.059 I/AnkiDroid( 9789): Timber config: PRODUCTION
11-07 06:56:57.059 I/AnkiDroid( 9789): initialize()
11-07 06:56:57.108 I/AnkiDroid( 6587): AnkiDroid Version = 2.19.1 (6953d60532ee2762d29b06fd1d76e69203ad8455)
11-07 06:56:57.108 I/AnkiDroid( 6587): 
11-07 06:56:57.108 I/AnkiDroid( 6587): Backend Version = 0.1.43-anki24.06.3 (24.06.3 d678e39350a2d243242a69f4e22f5192b04398f2)
11-07 06:56:57.108 I/AnkiDroid( 6587): 
11-07 06:56:57.108 I/AnkiDroid( 6587): Android Version = 11 (SDK 30)
11-07 06:56:57.108 I/AnkiDroid( 6587): 
11-07 06:56:57.108 I/AnkiDroid( 6587): ProductFlavor = play
11-07 06:56:57.108 I/AnkiDroid( 6587): 
11-07 06:56:57.108 I/AnkiDroid( 6587): Manufacturer = samsung
11-07 06:56:57.108 I/AnkiDroid( 6587): 
11-07 06:56:57.108 I/AnkiDroid( 6587): Model = SM-A715F
11-07 06:56:57.108 I/AnkiDroid( 6587): 
11-07 06:56:57.108 I/AnkiDroid( 6587): Hardware = qcom
11-07 06:56:57.108 I/AnkiDroid( 6587): 
11-07 06:56:57.108 I/AnkiDroid( 6587): Webview User Agent = Mozilla/5.0 (Linux; Android 11; SM-A715F Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.107 Mobile Safari/537.36
11-07 06:56:57.108 I/AnkiDroid( 6587): 
11-07 06:56:57.108 I/AnkiDroid( 6587): ACRA UUID = 45fc7cc0-5b15-49a7-a96f-4b5b4000192a
11-07 06:56:57.108 I/AnkiDroid( 6587): 
11-07 06:56:57.108 I/AnkiDroid( 6587): FSRS = 0.6.4 (Enabled: null)
11-07 06:56:57.108 I/AnkiDroid( 6587): 
11-07 06:56:57.108 I/AnkiDroid( 6587): Crash Reports Enabled = true
11-07 06:56:57.133 I/AnkiDroid( 6587): Setting theme to BLACK
11-07 06:56:57.144 I/AnkiDroid( 6587): DeckPicker::onCreate
11-07 06:56:57.288 I/AnkiDroid( 6587): isLegacyStorage(): current dir: /storage/emulated/0/AnkiDroid
11-07 06:56:57.288 I/AnkiDroid( 6587): scoped external dirs: /storage/emulated/0/Android/data/com.ichi2.anki/files
11-07 06:56:57.288 I/AnkiDroid( 6587): scoped internal dir: /data/user/0/com.ichi2.anki/files
11-07 06:56:57.289 I/AnkiDroid( 6587): isLegacyStorage(): true
11-07 06:56:57.366 I/AnkiDroid( 9789): Not participating in analytics sample (sample percentage vs random: 10 38)
11-07 06:56:57.366 I/AnkiDroid( 9789): setOptIn(): from false to false
11-07 06:56:57.366 I/AnkiDroid( 9789): Not participating in analytics sample (sample percentage vs random: 10 37)
11-07 06:56:57.381 W/AnkiDroid( 6587): Activity/ c4.a: No write access to AnkiDroid directory /storage/emulated/0/AnkiDroid
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.exception.StorageAccessException.<init>(StorageAccessException.kt:22)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.exception.StorageAccessException.<init>(StorageAccessException.kt:19)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.CollectionHelper.initializeAnkiDroidDirectory(CollectionHelper.kt:91)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.CollectionManager.collectionPathInValidFolder(CollectionManager.kt:264)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.CollectionManager.ensureOpenInner(CollectionManager.kt:243)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.CollectionManager.getColUnsafe$lambda$11$lambda$10(CollectionManager.kt:299)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.CollectionManager$withQueue$3.invokeSuspend(CollectionManager.kt:103)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.java:111)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)
11-07 06:56:57.381 W/AnkiDroid( 6587): 
11-07 06:56:57.381 W/AnkiDroid( 6587): com.ichi2.anki.exception.StorageAccessException: No write access to AnkiDroid directory /storage/emulated/0/AnkiDroid
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.exception.StorageAccessException.<init>(StorageAccessException.kt:22)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.exception.StorageAccessException.<init>(StorageAccessException.kt:19)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.CollectionHelper.initializeAnkiDroidDirectory(CollectionHelper.kt:91)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.CollectionManager.collectionPathInValidFolder(CollectionManager.kt:264)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.CollectionManager.ensureOpenInner(CollectionManager.kt:243)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.CollectionManager.getColUnsafe$lambda$11$lambda$10(CollectionManager.kt:299)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at com.ichi2.anki.CollectionManager$withQueue$3.invokeSuspend(CollectionManager.kt:103)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.java:111)
11-07 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
1107 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
1107 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811)
1107 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715)
1107 06:56:57.381 W/AnkiDroid( 6587): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)
@david-allison david-allison changed the title https://ankidroid.org/acra/app/1/bug/250201/report/e477fd85-ca48-4956-bb25-e2d69be83879 [InitialActivity::getStartupFailureType] StorageAccessException: No write access to AnkiDroid directory /storage/emulated/0/AnkiDroid Nov 7, 2024
@david-allison david-allison added this to the 2.19.2 release milestone Nov 7, 2024
@mikehardy
Copy link
Member

Is one of the ones that we should quiet, and will actually quiet with this PR?

@mikehardy
Copy link
Member

#17470 fixed this - I don't see it anymore and I've been testing storage access failure cases

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

No branches or pull requests

2 participants