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

Crash on android v12, unable to create application *java.io.SyncFailedException: sync failed #80

Closed
ghost opened this issue Aug 2, 2021 · 7 comments

Comments

@ghost
Copy link

ghost commented Aug 2, 2021

I am seeing crashes reported on Pixel 4a devices using android v12.

Crash logs,

Fatal Exception: java.lang.RuntimeException: Unable to create application com.simpl.android.MainApplication: java.lang.RuntimeException: java.io.SyncFailedException: sync failed
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6720)
       at android.app.ActivityThread.access$1300(ActivityThread.java:250)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2045)
       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:7829)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:982)

Versions
React native : 0.63.4
soloader: 0.9.0

Any idea on what could be causing this?

@spaiman
Copy link

spaiman commented Aug 4, 2021

I'm also seeing the same crash in Android 12. Not a react native app, it's a native Android app. The SoLoader version that I'm using is 0.10.1

Caused by java.io.SyncFailedException: sync failed
       at java.io.FileDescriptor.sync(FileDescriptor.java)
       at com.facebook.soloader.UnpackingSoSource.writeState(UnpackingSoSource.java:173)
       at com.facebook.soloader.UnpackingSoSource.refreshLocked(UnpackingSoSource.java:335)
       at com.facebook.soloader.UnpackingSoSource.prepare(UnpackingSoSource.java:433)
       at com.facebook.soloader.SoLoader.initSoSources(SoLoader.java:327)
       at com.facebook.soloader.SoLoader.init(SoLoader.java:207)
       at com.facebook.soloader.SoLoader.init(SoLoader.java:189)
       at com.facebook.soloader.SoLoader.init(SoLoader.java:217)

Interestingly, I found that the crash doesn't happen to every Android 12 devices, only some of it. Would be great to know the possible cause and solution for this.

@capezzbr
Copy link

capezzbr commented Aug 6, 2021

Same here issue for us.

  • SoLoader: 0.10.1
  • React native: 0.63.3
  • Operating system cashing: 100% Android 12
  • Stacktrace:
Fatal Exception: java.lang.RuntimeException: Unable to create application com.test.android.MainApplication: java.lang.RuntimeException: java.io.SyncFailedException: sync failed
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6720)
       at android.app.ActivityThread.access$1300(ActivityThread.java:250)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2045)
       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:7829)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:982)

@scottkruse
Copy link

scottkruse commented Aug 11, 2021

Also got this when initializing Fresco (Android 12, Pixel 5)

Fatal Exception: java.lang.RuntimeException: Could not initialize SoLoader at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:76) at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:45) at com.app.ApplicationController.initializeFresco(ApplicationController.kt:263) at com.app.ApplicationController.access$initializeFresco(ApplicationController.kt:50) at com.app.ApplicationController$onCreate$1.invokeSuspend(ApplicationController.kt:126) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

  `Caused by java.io.SyncFailedException: sync failed
   at java.io.FileDescriptor.sync(FileDescriptor.java)
   at com.facebook.soloader.UnpackingSoSource.writeState(UnpackingSoSource.java:176)
   at com.facebook.soloader.UnpackingSoSource.refreshLocked(UnpackingSoSource.java:321)
   at com.facebook.soloader.UnpackingSoSource.prepare(UnpackingSoSource.java:420)
   at com.facebook.soloader.SoLoader.initSoSources(SoLoader.java:304)
   at com.facebook.soloader.SoLoader.init(SoLoader.java:181)
   at com.facebook.soloader.SoLoader.init(SoLoader.java:164)
   at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:68)`

Crashlytics is reporting ~50 crashes per user allegedly, we leverage Flipper & Fresco in the project

@simpleton
Copy link
Member

Hi @capezzbr, @selva-at-simpl, sorry for late reply. can you guys share any sample app that could reproduce this issue if it's convenience? thanks a lot.

@ghost
Copy link
Author

ghost commented Oct 8, 2021

Hey @simpleton, sorry for the delayed response. This error was reported by the firebase crash monitor and I am not sure how to reproduce this error.

@capezzbr
Copy link

Same, I suspect it might be happening on specific devices

image

@haozhutw
Copy link

haozhutw commented Nov 4, 2021

Same issue for me, all the crashes are happening on Android 12 google pixel devices so far.

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

No branches or pull requests

5 participants