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



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.


Pixel 4, Android 13

Steps to reproduce


  • 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


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(
 at android.os.Parcel.createException(
 at android.os.Parcel.readException(
 at android.os.Parcel.readException(
 at android.service.quicksettings.TileService.requestListeningState(
 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 android.os.Handler.handleCallback(
 at android.os.Handler.dispatchMessage(
 at android.os.Looper.loopOnce(
 at android.os.Looper.loop(
 at java.lang.reflect.Method.invoke(Native Method)
 at Method)
 Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@7976e65, Dispatchers.Main]
Caused by: android.os.RemoteException: Remote stack trace:
 at android.os.Binder.execTransactInternal(
 at android.os.Binder.execTransact(

Issue Analytics

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

github_iconTop GitHub Comments

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.

ignoramouscommented, Dec 5, 2022

Must handle IllegalArgumentException in:

@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 Post

No results found

github_iconTop Related Hashnode Post

No results found