Skip to content

[Android] Crash on VPN service stop #52102

@SergeyZhukovsky

Description

@SergeyZhukovsky

I observe that crash in GPS and can't replicate it. It exists on all 3 channels. From what I found out is that a tunnel shutdown execution could block onDestroy() if takes too long(10-20 seconds per docs) and it only happens on Android 14+. The suggestion is to move the tunnel shutdown logic in the background thread to offload onDestroy() method.

Exception android.app.RemoteServiceException$ForegroundServiceDidNotStopInTimeException: A foreground service of type dataSync did not stop within its timeout: ComponentInfo{com.brave.browser/org.chromium.chrome.browser.vpn.wireguard.WireguardService}
  at android.app.ActivityThread.generateForegroundServiceDidNotStopInTimeException (ActivityThread.java:2351)
  at android.app.ActivityThread.throwRemoteServiceException (ActivityThread.java:2313)
  at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException (Unknown Source)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2628)
  at android.os.Handler.dispatchMessage (Handler.java:107)
  at android.os.Looper.loopOnce (Looper.java:267)
  at android.os.Looper.loop (Looper.java:371)
  at android.app.ActivityThread.main (ActivityThread.java:8844)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:620)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:966)

Metadata

Metadata

Labels

OS/AndroidFixes related to Android browser functionalityQA/Nocrashpriority/P2A bad problem. We might uplift this to the next planned release.release-notes/include

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions