You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After switching to my new Phone with Android 14, Unciv cannot load or save files from/to the usual folder in android/data.
Saving in game fails saying "Could not save game".
My old games are not displayed in load dialog.
When I "return to main menu" the auto save produces the attached Exception.
I guess it has something to do with changed storage access in Android 14.
Steps to Reproduce
Start new game and try to save, see above comment.
Screenshots
No response
Link to save file
No response
Operating System
Android
Additional Information
Platform: Android Version: 4.15.4 (Build 1,093) Rulesets: [Civ V - Vanilla, Civ V - Gods & Kings] Last Screen:com.unciv.ui.screens.mainmenuscreen.MainMenuScreen
Device Model: SHIFTphone 8
API Level: 34
System Memory: 10318 MB
Available (used by Kernel): 4190 MB
System Low Memory state: false
Java heap limit: 512 MB
Java heap free: 65 MB
Message:
com.badlogic.gdx.utils.GdxRuntimeException: Error writing file: SaveFiles/Autosave (External)
at com.badlogic.gdx.files.FileHandle.writeString(FileHandle.java:386)
at com.unciv.logic.files.UncivFiles.saveGame(UncivFiles.kt:172)
at com.unciv.logic.files.UncivFiles.saveGame(UncivFiles.kt:161)
at com.unciv.logic.files.UncivFiles.saveGame$default(UncivFiles.kt:159)
at com.unciv.logic.files.Autosaves.autoSave(UncivFiles.kt:476)
at com.unciv.logic.files.Autosaves$requestAutoSaveUnCloned$job$1.invokeSuspend(UncivFiles.kt:465)
at com.unciv.logic.files.Autosaves$requestAutoSaveUnCloned$job$1.invoke(Unknown Source:8)
at com.unciv.logic.files.Autosaves$requestAutoSaveUnCloned$job$1.invoke(Unknown Source:4)
at com.unciv.utils.ConcurrencyKt$launchCrashHandling$1.invokeSuspend(Concurrency.kt:89)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at com.unciv.utils.Dispatchers$CrashHandlingDispatcher$dispatch$1.invoke(Concurrency.kt:190)
at com.unciv.utils.Dispatchers$CrashHandlingDispatcher$dispatch$1.invoke(Concurrency.kt:190)
at com.unciv.ui.crashhandling.CrashHandlingExtensionsKt$wrapCrashHandling$1.invoke(CrashHandlingExtensions.kt:17)
at com.unciv.ui.crashhandling.CrashHandlingExtensionsKt$wrapCrashHandlingUnit$1.invoke(CrashHandlingExtensions.kt:33)
at com.unciv.ui.crashhandling.CrashHandlingExtensionsKt$wrapCrashHandlingUnit$1.invoke(CrashHandlingExtensions.kt:33)
at com.unciv.utils.Dispatchers$CrashHandlingDispatcher.dispatch$lambda$0(Concurrency.kt:190)
at com.unciv.utils.Dispatchers$CrashHandlingDispatcher.$r8$lambda$L3K1aau81hhVdGYYei_E7yWI2wU(Unknown Source:0)
at com.unciv.utils.Dispatchers$CrashHandlingDispatcher$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Error writing file: SaveFiles/Autosave (External)
at com.badlogic.gdx.files.FileHandle.writer(FileHandle.java:363)
at com.badlogic.gdx.files.FileHandle.writeString(FileHandle.java:383)
... 21 more
Caused by: java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.unciv.app/files/SaveFiles/Autosave: open failed: EACCES (Permission denied)
at libcore.io.IoBridge.open(IoBridge.java:574)
at java.io.FileOutputStream.<init>(FileOutputStream.java:259)
at com.badlogic.gdx.files.FileHandle.writer(FileHandle.java:355)
... 22 more
Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:563)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:274)
at libcore.io.ForwardingOs.open(ForwardingOs.java:563)
at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:8109)
at libcore.io.IoBridge.open(IoBridge.java:560)
... 24 more
Save Mods:
[Civ V - Gods & Kings]
``
The text was updated successfully, but these errors were encountered:
I cannot make sense of this at all.
It's trying to write to the external storage folder belonging to Unciv so according to everything I read online Unciv should by default have permissions to write there
I can't find anything that states otherwise, I think we need a real Android dev to weigh in here :|
Ok, I deinstalled the app and deleted the data folder. After reinstall it works now... Something must have gone wrong when I restored my save games the first time, though i dont know what.
Is there an existing issue for this?
Game Version
4.15.4
Describe the bug
After switching to my new Phone with Android 14, Unciv cannot load or save files from/to the usual folder in android/data.
Saving in game fails saying "Could not save game".
My old games are not displayed in load dialog.
When I "return to main menu" the auto save produces the attached Exception.
I guess it has something to do with changed storage access in Android 14.
Steps to Reproduce
Start new game and try to save, see above comment.
Screenshots
No response
Link to save file
No response
Operating System
Android
Additional Information
Platform: Android
Version: 4.15.4 (Build 1,093)
Rulesets: [Civ V - Vanilla, Civ V - Gods & Kings]
Last Screen:
com.unciv.ui.screens.mainmenuscreen.MainMenuScreen
Device Model: SHIFTphone 8
API Level: 34
System Memory: 10318 MB
Available (used by Kernel): 4190 MB
System Low Memory state: false
Java heap limit: 512 MB
Java heap free: 65 MB
Message:
Save Mods:
The text was updated successfully, but these errors were encountered: