xxfast
05/09/2023, 9:19 AMokio.IOException
.
Uncaught Kotlin exception: okio.IOException: Operation not permitted
at 0 PSCore 0x10548be63 kfun:okio#errnoToIOException(<http://kotlin.Int|kotlin.Int>){}okio.IOException + 419
Looks like this is thrown from the encoder, which is here and looks like this
override suspend fun encode(value: T?) {
val parentFolder: Path? = path.parent
if (parentFolder != null && !FILE_SYSTEM.exists(parentFolder))
FILE_SYSTEM.createDirectories(parentFolder, mustCreate = false)
if (value != null) FILE_SYSTEM.sink(path).buffer().use { json.encodeToBufferedSink(serializer, value, it) }
else FILE_SYSTEM.delete(path)
}
Unable to reproduce this consistently. But seems to be more prevalent on physical devices compared to the simulator. Raised an issue here. Any idea whats wrong? 🤔jessewilson
05/09/2023, 11:21 AM