Status Update
Comments
er...@google.com <er...@google.com> #2
Some additional observations:
- It seems it has only a chance to happen on the first start after fresh install
- According to Crashlytics the number of crashes = number of affected users. Which could mean it only happens once on the first run and never again.
- Also we do have backups disabled
Can there be a race? Given the code of the Okio ReadScope
seems the file doesn't exist when it's tried to be opened, but exists shortly after that
return try {
fileSystem.read(
file = path
) {
serializer.readFrom(this)
}
} catch (ex: FileNotFoundException) {
if (fileSystem.exists(path)) {
throw ex
}
serializer.defaultValue
}
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com> #4
We have the same issue. Did you try to update to 1.1.1?
ch...@google.com <ch...@google.com>
vi...@gmail.com <vi...@gmail.com> #5
Update to 1.1.1 doesn't help.
vi...@gmail.com <vi...@gmail.com> #7
exact same issue, we went from 1.0.0 to 1.1.1 and are encountering this!
ch...@google.com <ch...@google.com> #8
Did some testing: for 200 fresh app installs there is 10-15 crashes on startup on Android 14.
vi...@gmail.com <vi...@gmail.com> #9
We had the problem with 1.0.0, updating the lib to 1.1.0 didn't change anything.
vi...@gmail.com <vi...@gmail.com> #10
Downgrading from 1.1.1 to 1.0.0 has seemingly resolved the issue for us.
vi...@gmail.com <vi...@gmail.com> #11
Downgrading is not an option for us as we need multiplatform support.
ch...@google.com <ch...@google.com> #12
Right now, there doesn't seem to be a straightforward way to change the error handling here, without adding an abstraction above the DataStore itself.
vi...@gmail.com <vi...@gmail.com> #13
I'm not sure why the above error is happening. It seems to be expecting the file to be created first and then queried.
Is there a timing issue?
ch...@google.com <ch...@google.com> #14
ap...@google.com <ap...@google.com> #15
ch...@google.com <ch...@google.com> #16
Sorry for the delay of responding to this issue, as we've seen similar issues in the other bugs and followed up there. This is hard for us to debug as it seems to be a race condition and we cannot easily reproduce it and understand the root cause. Please help us by providing more details (device populations, API levels, or anything you discover as relevant to the bug distribution) from your observation of its occurrence! Also a sample app to reproduce would be great if possible.
In the meantime, I'll try to do some more investigation with the given information. Thanks for your patience.
Description
1.0.0-alpha07
DEVICE NAME: (Nexus 5X, Samsung S6, etc)
name : FUJITSU arrowsM04
Android OS version : 7.1.1
name: FUJITSU F-04J
Android OS version : 6.0.1
name: FUJITSU F-05J
Android OS version : 7.1.1
DESCRIPTION:
We receive following crash report from our app user.
Fatal Exception: java.lang.IllegalArgumentException: Can not get supported output size under supported maximum for the format: 34
at a.c.a.b.k0.a + 98(SupportedSurfaceCombination.java:98)
at a.c.a.b.k0.a + 30(SupportedSurfaceCombination.java:30)
at a.c.a.b.t.a + 22(Camera2DeviceSurfaceManager.java:22)
at androidx.camera.core.k1.a + 98(CameraX.java:98)
at androidx.camera.core.k1.a + 22(CameraX.java:22)
at a.c.b.c.a + 6(ProcessCameraProvider.java:6)
at <out app package name>.CameraFragment.a + 33(CameraFragment.kt:33)
at <out app package name>.CameraFragment.a + 1(CameraFragment.kt:1)
at <out app package name>.CameraFragment$m.run + 1(CameraFragment.kt:1)
at android.os.Handler.handleCallback + 751(Handler.java:751)
at android.os.Handler.dispatchMessage + 95(Handler.java:95)
at android.os.Looper.loop + 154(Looper.java:154)
at android.app.ActivityThread.main + 6262(ActivityThread.java:6262)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 890(ZygoteInit.java:890)
at com.android.internal.os.ZygoteInit.main + 780(ZygoteInit.java:780)
REPRODUCIBILITY: (5 of out 5, 1 out of 100, etc)
We receive this crash report from only three devices. And these devices's manufacturer is FUJITSU.
ADDITIONAL INFORMATION:
CODE FRAGMENTS (this will help us troubleshoot your issues):
Our app bind usecases by following code.
private fun bindCameraUseCases(processCameraProvider: ProcessCameraProvider) {
preview = Preview.Builder().apply {
setTargetAspectRatio(AspectRatio.RATIO_4_3)
}.build().apply {
previewSurfaceProvider = binding.previewViewCamera.previewSurfaceProvider
}
imageCapture = ImageCapture.Builder().apply {
setCaptureMode(ImageCapture.CaptureMode.MINIMIZE_LATENCY)
setTargetAspectRatio(AspectRatio.RATIO_4_3)
setFlashMode(FlashMode.OFF)
}.build()
val cameraSelector = CameraSelector.Builder().requireLensFacing(LensFacing.BACK).build()
processCameraProvider.bindToLifecycle(viewLifecycleOwner, cameraSelector, preview, imageCapture)
}