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

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

Open
LucentW opened this issue Jan 4, 2025 · 0 comments
Labels

Comments

@LucentW
Copy link

LucentW commented Jan 4, 2025

Describe the bug
Seemingly due to commit ad7e79e, applications which embed ads and try to change the data directory suffix fail with a IllegalStateException due to WebView being already initialised.

Impacted application in my case is AquaMail (I have a lifetime Pro license, but it seems to still try to load the ad module anyways)

To Reproduce
Steps to reproduce the behavior:

  1. Open an application that tries to change the directory suffix
  2. Observe it crash

Expected behavior
Application should be able to initialize the WebView on its own, avoiding the issue at hand.

Logs

time: 1735961600817
msg: java.lang.IllegalStateException: Can't set data directory suffix: WebView already initialized
stacktrace: java.lang.RuntimeException: Unable to create application org.kman.AquaMail.core.AquaMailApplication: java.lang.IllegalStateException: Can't set data directory suffix: WebView already initialized
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7592)
	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2449)
	at android.os.Handler.dispatchMessage(Handler.java:109)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8787)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:871)
Caused by: java.lang.IllegalStateException: Can't set data directory suffix: WebView already initialized
	at android.webkit.WebViewFactory.setDataDirectorySuffix(WebViewFactory.java:240)
	at android.webkit.WebView.setDataDirectorySuffix(WebView.java:2069)
	at com.microsoft.identity.common.internal.ui.webview.c.a(SourceFile:1)
	at org.kman.AquaMail.core.AquaMailApplication.b(SourceFile:41)
	at org.kman.AquaMail.core.AquaMailApplication.onCreate(SourceFile:13)
	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1392)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7586)
	... 9 more

System
Android Version: 15
Custom ROM: crDroid 11.1-BETA

Additional context
Releases of microG before the seemingly offending commit work as it should.

@LucentW LucentW added the bug label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant