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

ServiceWorker mgmt seems instable #3878

Closed
kelson42 opened this issue Jun 11, 2024 · 6 comments · Fixed by #3880
Closed

ServiceWorker mgmt seems instable #3878

kelson42 opened this issue Jun 11, 2024 · 6 comments · Fixed by #3880
Assignees
Labels
Milestone

Comments

@kelson42
Copy link
Collaborator

image

@kelson42 kelson42 added the bug label Jun 11, 2024
@kelson42 kelson42 added this to the 3.12.0 milestone Jun 11, 2024
@MohitMaliFtechiz
Copy link
Collaborator

@kelson42 This crash is related to SDK itself, I had shared this crash with Webkit. But one thing is strange we are currently not supporting Android 14 but in the crash, it shows that there is an error on the Android 14 device. Currently, we are not using the latest webkit dependency that can support Android 14, but we have a ticket for supporting the Android 14. However, we are introducing the zimit 2.0 which does not have the service worker so this implementation will be removed. Also, If we upgrade to the Android 14 then we will definitely upgrade the webkit dependencies that support the Android 14.

Screenshot from 2024-06-11 15-44-54

Exception java.lang.ExceptionInInitializerError:
  at androidx.webkit.ServiceWorkerControllerCompat.getInstance (ServiceWorkerControllerCompat.java:64)
  at org.kiwix.kiwixmobile.core.ServiceWorkerInitialiser.<init> (ServiceWorkerInitialiser.java:32)
  at org.kiwix.kiwixmobile.core.di.components.DaggerCoreComponent$CoreComponentImpl.serviceWorkerInitialiser (DaggerCoreComponent.java:655)
  at org.kiwix.kiwixmobile.core.di.components.DaggerCoreComponent$CoreComponentImpl.injectCoreApp (DaggerCoreComponent.java:914)
  at org.kiwix.kiwixmobile.core.di.components.DaggerCoreComponent$CoreComponentImpl.inject (DaggerCoreComponent.java:867)
  at org.kiwix.kiwixmobile.core.CoreApp.onCreate (CoreApp.kt:85)
  at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1266)
  at android.app.ActivityThread.handleBindApplication (ActivityThread.java:7614)
  at android.app.ActivityThread.-$$Nest$mhandleBindApplication
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2400)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:226)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8757)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)
Caused by java.lang.RuntimeException:
  at org.chromium.android_webview.AwDataDirLock.b (chromium-TrichromeWebViewGoogle6432.aab-stable-636717933:201)
  at org.chromium.android_webview.AwBrowserProcess.j (chromium-TrichromeWebViewGoogle6432.aab-stable-636717933:16)
  at com.android.webview.chromium.L.d (chromium-TrichromeWebViewGoogle6432.aab-stable-636717933:203)
  at com.android.webview.chromium.L.b (chromium-TrichromeWebViewGoogle6432.aab-stable-636717933:42)
  at com.android.webview.chromium.WebViewChromiumFactoryProvider.getServiceWorkerController (chromium-TrichromeWebViewGoogle6432.aab-stable-636717933:22)
  at android.webkit.ServiceWorkerController.getInstance (ServiceWorkerController.java:57)
  at androidx.webkit.internal.ApiHelperForN.getServiceWorkerControllerInstance (ApiHelperForN.java:60)
  at androidx.webkit.internal.ServiceWorkerControllerImpl.<init> (ServiceWorkerControllerImpl.java:44)
  at androidx.webkit.ServiceWorkerControllerCompat$LAZY_HOLDER.<clinit> (ServiceWorkerControllerCompat.java:68)

@kelson42
Copy link
Collaborator Author

why we don't support latest webkit dependency right now?

@MohitMaliFtechiz
Copy link
Collaborator

why we don't support latest webkit dependency right now?

@kelson42 Due to our maximum SDK version. The current maximum SDK version is 33(Android 13), and the latest WebKit version requires a higher gradle version and the higher grade version needs a maximum SDK version of 34.

@kelson42
Copy link
Collaborator Author

@MohitMaliFtechiz OK, seems not impacting and straight like you describe it. Please do to fix that bug.

@kelson42
Copy link
Collaborator Author

This is the priority to fix, too many crash reports on the PlayStore console!

@MohitMaliFtechiz
Copy link
Collaborator

@Kelson I have placed a fix for the ServiceWorker initializer code. There was an issue with initializing the serviceWorker into multiple processes that were leading to a crash. Also, improved the initialing of the ServiceWorker. Now ServiceWorker is initialing after the all necessary application setup is completed(So that it can initialize properly). These were the few reasons that could cause the ServicewWorker issue. Since the playStore showed it was SDK related issue(but these two things were creating the initialization issue of ServiceWorker, and probably these are the reason for the playStore crash)

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

Successfully merging a pull request may close this issue.

2 participants