Skip to content

Conversation

@DaVinci9196
Copy link
Contributor

@DaVinci9196 DaVinci9196 commented Jan 16, 2025

This fix will probably fix #2727. Based on this fix, I did not reproduce the corresponding issue on my test device.
Other known affected applications include: Finance <com.yahoo.mobile.client.android.finance> Scout Sports <com.bet007.mobile.score.d>

@mar-v-in mar-v-in modified the milestone: 0.3.7 Mar 12, 2025
@ale5000-git
Copy link
Member

@mar-v-in
Is possible to merge this workaround first until there is a better fix to this issue?

@mar-v-in
Copy link
Member

mar-v-in commented Jun 1, 2025

I believe this fix is going to break a lot of other apps. Notably, setting the web view data directory of apps (where they have not been set before) will mean they might lose access to the actual data directory.

Given the issue was only introduced via #2664 to workaround issues that were not really specific to microG (but also applied if the app was used on any non-Google system) I'm rather tempted to revert #2664 rather than introducing yet another workaround with even higher potential to break things.

@ale5000-git
Copy link
Member

ale5000-git commented Jun 1, 2025

I believe this fix is going to break a lot of other apps. Notably, setting the web view data directory of apps (where they have not been set before) will mean they might lose access to the actual data directory.

Given the issue was only introduced via #2664 to workaround issues that were not really specific to microG (but also applied if the app was used on any non-Google system) I'm rather tempted to revert #2664 rather than introducing yet another workaround with even higher potential to break things.

Quote:

     * The ads module might try to access the user agent, requiring initialization on the main thread,
     * which may result in deadlocks when invoked from any other thread. This only happens with microG,
     * because we don't use the highly privileged SELinux Sandbox that regular Play Services uses
     * (which allows apps to read the user-agent from Play Services instead of the WebView). To prevent
     * the issue we pre-emptively initialize the WebView.

I don't know this code enough to be sure but isn't possible to maybe "extend" the WebView and make apps use it, so that when an app call methods they are called on our "extended" WebView instead to the real one?
In this way when they try to access the User-Agent when it isn't yet initialized we can just fail without error-out or just return cached data.

@DaVinci9196 DaVinci9196 closed this Jun 9, 2025
@DaVinci9196 DaVinci9196 deleted the fix_module_webview_init_error branch July 15, 2025 02:46
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

Successfully merging this pull request may close these issues.

Applications trying to change the WebView data directory suffix crash after Dynamite preinit commit

3 participants