question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App crashes when activating it as an Always-on VPN on Shelter's work profile

See original GitHub issue

Hi!

Description

After updating to version v0.5.3k, Rethink crashes (it doesn’t even open) on my work profile (created by Shelter) whenever it’s enabled as an (always-on) VPN. This, however, does not happen on version v0.5.3j, where the work profile always-on VPN works as expected.

(On both versions Rethink works as expected on my main profile.

Device

Pixel 4, Android 13

Steps to reproduce

Prerequisites:

  • Shelter, a work profile created by it and Rethink DNS installed on the main profile

Steps to reproduce:

  • Clone the app to the work profile through Shelter
  • Open the app and give it VPN permissions
  • The app crashes

Logs

type: crash
osVersion: google/flame/flame:13/TP1A.221005.002/2022102800:user/release-keys
package: com.celzero.bravedns:22
process: com.celzero.bravedns

java.lang.IllegalArgumentException: User 10 is not the current user.
 at android.os.Parcel.createExceptionOrNull(Parcel.java:3025)
 at android.os.Parcel.createException(Parcel.java:3005)
 at android.os.Parcel.readException(Parcel.java:2981)
 at android.os.Parcel.readException(Parcel.java:2923)
 at com.android.internal.statusbar.IStatusBarService$Stub$Proxy.requestTileServiceListeningState(IStatusBarService.java:2363)
 at android.app.StatusBarManager.requestTileServiceListeningState(StatusBarManager.java:883)
 at android.service.quicksettings.TileService.requestListeningState(TileService.java:503)
 at com.celzero.bravedns.service.BraveVPNService.updateQuickSettingsTile(BraveVPNService.kt:1364)
 at com.celzero.bravedns.service.BraveVPNService.access$updateQuickSettingsTile(BraveVPNService.kt:88)
 at com.celzero.bravedns.service.BraveVPNService$onStartCommand$1.invokeSuspend(BraveVPNService.kt:1130)
 at com.celzero.bravedns.service.BraveVPNService$onStartCommand$1.invoke(Unknown Source:8)
 at com.celzero.bravedns.service.BraveVPNService$onStartCommand$1.invoke(Unknown Source:2)
 at com.celzero.bravedns.service.BraveVPNService$ui$1$1.invokeSuspend(BraveVPNService.kt:1779)
 at com.celzero.bravedns.service.BraveVPNService$ui$1$1.invoke(Unknown Source:8)
 at com.celzero.bravedns.service.BraveVPNService$ui$1$1.invoke(Unknown Source:4)
 at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
 at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
 at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
 at com.celzero.bravedns.service.BraveVPNService$ui$1.invokeSuspend(BraveVPNService.kt:1778)
 at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
 at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
 at android.os.Handler.handleCallback(Handler.java:942)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loopOnce(Looper.java:201)
 at android.os.Looper.loop(Looper.java:288)
 at android.app.ActivityThread.main(ActivityThread.java:7904)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
 at com.android.internal.os.ExecInit.main(ExecInit.java:49)
 at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
 at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)
 Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@7976e65, Dispatchers.Main]
Caused by: android.os.RemoteException: Remote stack trace:
 at com.android.server.statusbar.StatusBarManagerService.requestTileServiceListeningState(StatusBarManagerService.java:1814)
 at com.android.internal.statusbar.IStatusBarService$Stub.onTransact(IStatusBarService.java:1241)
 at android.os.Binder.execTransactInternal(Binder.java:1302)
 at android.os.Binder.execTransact(Binder.java:1265)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:16

github_iconTop GitHub Comments

2reactions
An-dzcommented, Nov 16, 2022

While I was on F-droid I found this app called InviZible, and under setting -> common settings there’s an option enabled by default called Multi-user support with a description explaining that it adds support for Island, Shelter and work profile. Maybe you can check with them what they’ve done.

1reaction
ignoramouscommented, Dec 5, 2022

Must handle IllegalArgumentException in:

https://github.com/celzero/rethink-app/blob/0543666a3130247ae757cdea3a273b3674fe0d5a/app/src/main/java/com/celzero/bravedns/service/BraveVPNService.kt#L1480


@An-dz Thanks. It seems like InviZible doesn’t do much other than detect presence of root and grant itself interact-across-users permission (which isn’t available to installed apps, otherwise) (code).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Always On VPN | Microsoft Learn
Possible cause. This error occurs when the VPN tunnel type is Automatic and the connection attempt fails for all VPN tunnels.
Read more >
Some apps keep crashing in my Work Profile (Shelter) - Reddit
Hi, I like to install proprietary apps in my Shelter's work profile with auto freeze. It was working flawlessly until a couple month...
Read more >
Always On VPN – Troubleshooting - Jon's Notes
This error is usually caused when using a device tunnel connection and the machine certificate is missing on either the client or server...
Read more >
Always On VPN Connection Issues After Sleep or Hibernate
To help address issues with Always On VPN connections failing after sleep or hibernate, open the group policy management console and navigate to ......
Read more >
Settings crash when trying to connect to VPN - XDA Forums
I noticed that sometimes this option will be available but then the app crashes. Not sure why it showes up, I think from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found