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 Promise creation from a worker thread #34649

Closed
SergeyZhukovsky opened this issue Nov 30, 2023 · 0 comments · Fixed by brave/brave-core#21171
Closed

Crash on Promise creation from a worker thread #34649

SergeyZhukovsky opened this issue Nov 30, 2023 · 0 comments · Fixed by brave/brave-core#21171
Assignees
Labels
crash OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA/No release-notes/exclude

Comments

@SergeyZhukovsky
Copy link
Member

I found that on GPC on the latest nightly 1.62.90. It's related to the attempt of fixing that issue #34135
We should call it from UI thread only in a case when there is a connection failure in a mojo channel.

Exception java.lang.RuntimeException: Can't create handler inside thread Thread[Timer-2,5,main] that has not called Looper.prepare()
  at android.os.Handler.<init> (Handler.java:227)
  at android.os.Handler.<init> (Handler.java:129)
  at org.chromium.base.Promise.<init> (Promise.java:43)
  at org.chromium.chrome.browser.misc_metrics.MiscAndroidMetricsFactory.getMetricsService (MiscAndroidMetricsFactory.java:45)
  at org.chromium.chrome.browser.app.BraveActivity.initMiscAndroidMetrics (BraveActivity.java:2042)
  at org.chromium.chrome.browser.misc_metrics.MiscAndroidMetricsConnectionErrorHandler.onConnectionError (MiscAndroidMetricsConnectionErrorHandler.java:34)
  at org.chromium.mojo.bindings.Interface$AbstractProxy$HandlerImpl.onConnectionError (Interface.java:161)
  at org.chromium.mojo.bindings.Interface$AbstractProxy.onConnectionError (Interface.java:263)
  at org.chromium.mojo.bindings.DelegatingConnectionErrorHandler.onConnectionError (DelegatingConnectionErrorHandler.java:32)
  at org.chromium.mojo.bindings.Connector.onError (Connector.java:162)
  at org.chromium.mojo.bindings.Connector.accept (Connector.java:101)
  at org.chromium.mojo.bindings.RouterImpl.accept (RouterImpl.java:160)
  at org.chromium.mojo.bindings.AutoCloseableRouter.accept (AutoCloseableRouter.java:69)
  at org.chromium.misc_metrics.mojom.MiscAndroidMetrics_Internal$Proxy.recordBrowserUsageDuration (MiscAndroidMetrics_Internal.java:114)
  at org.chromium.chrome.browser.util.UsageMonitor$1.run (UsageMonitor.java:35)
  at java.util.TimerThread.mainLoop (Timer.java:563)
  at java.util.TimerThread.run (Timer.java:513)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA/No release-notes/exclude
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants