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

Fixed ServiceWorker Initialization Issue #3880

Merged
merged 2 commits into from
Jun 15, 2024
Merged

Fixed ServiceWorker Initialization Issue #3880

merged 2 commits into from
Jun 15, 2024

Commits on Jun 15, 2024

  1. Fixed ServiceWorker Initialization Issue

    * ServiceWorker was being initialized every time the `CoreApp` instance was created. When the application crashed, `ErrorActivity` was invoked to send a crash report, running in a separate process. In this new process, the ServiceWorker was also being initialized.
    * Upon user interaction (e.g., clicking "No Thanks" to relaunch the app), the application returned to the main process, leading to a second initialization of the ServiceWorker with the same data directory, causing a crash.
    * Since `ErrorActivity` does not require any WebView-related functionality, it is unnecessary to initialize the ServiceWorker in this process.
    * The fix involves modifying the initialization code to ensure the ServiceWorker is only initialized in the main process of the application.
    MohitMaliDeveloper authored and kelson42 committed Jun 15, 2024
    Configuration menu
    Copy the full SHA
    824aa96 View commit details
    Browse the repository at this point in the history
  2. Initlizing the ServiceWorker in onCreate method of CoreApp clas…

    …s so that all necessary application setup is complete before the service worker is initialized and provides better control over the initialization sequence.
    MohitMaliDeveloper authored and kelson42 committed Jun 15, 2024
    Configuration menu
    Copy the full SHA
    4c3af12 View commit details
    Browse the repository at this point in the history