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

[BUG] - Problem with app #215

Closed
gabriel20xx opened this issue May 15, 2024 · 11 comments · Fixed by #298
Closed

[BUG] - Problem with app #215

gabriel20xx opened this issue May 15, 2024 · 11 comments · Fixed by #298
Assignees
Labels
bug Something isn't working

Comments

@gabriel20xx
Copy link
Contributor

gabriel20xx commented May 15, 2024

Describe the bug
[Device Brand]: POCO
[Device Model]: M2012K11AG
[Display]: AP1A.240405.002.A1
[Android Version]: 14
[Android API Level]: 34
[System Locale]: en_US
[Process ID]: 3593
[User ID]: 0
[CPU ABI]: arm64-v8a
[Package Name]: com.zaneschepke.wireguardautotunnel
[Version Name]: 3.4.4
[Version Code]: 34400
[Target SDK]: 34
[Min SDK]: 26
[Error Type]: JVM
[Crash Time]: 2024-05-14T11:03:08.890
[Stack Trace]:
android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{8577692 u0 com.zaneschepke.wireguardautotunnel/.service.foreground.WireGuardTunnelService c:com.zaneschepke.wireguardautotunnel}
at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2204)
at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2175)
at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2470)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8498)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
Caused by: android.app.StackTrace: Last startServiceCommon() call for this service was made here
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1954)
at android.app.ContextImpl.startForegroundService(ContextImpl.java:1908)
at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:831)
at n4.f.a(Unknown Source:73)
at n4.f.b(Unknown Source:4)
at n4.f.g(Unknown Source:116)
at n4.j.t(Unknown Source:572)
at a5.a.p(Unknown Source:8)
at s5.E.run(Unknown Source:114)
at I2.e.run(Unknown Source:12)
at z5.i.run(Unknown Source:2)
at z5.a.run(Unknown Source:91)

Smartphone (please complete the following information):

  • Device: Poco F3
  • Android Version: Android 14
  • App Version: 3.4.4

To Reproduce
Steps to reproduce the behavior:

Didn't do anything in particular, just switching from a trusted wifi network to cellular. I use kernel mode for the vpn connection.

Expected behavior
There shouldn't be an error.

Screenshots (Only if necessary)

Additional context
Add any other context about the problem here.

@gabriel20xx gabriel20xx added the bug Something isn't working label May 15, 2024
@zaneschepke
Copy link
Owner

zaneschepke commented May 15, 2024

Hello! Does this happen often? Also, do you happen to know if your battery was low?

On Android, when launching a foreground service while the app is closed, we have a 5 second window to also launch a notification to keep this service running or else this android will kill the service with this error.

It seems like the notification (for whatever reason) did not launch. Sometimes android won't launch the notification because of a resource constraint.

@GrumpyGiuseppe
Copy link

GrumpyGiuseppe commented May 19, 2024

Even with battery optimizations deactivated you have to set wg tunnel as always on vpn in android settings.
This setting will keep wg tunnel alive.

I use tasker now because I can suppress every notification or icon from both tasker and wg tunnel. Tasker can auto revive itself and relaunch wg tunnel.

@zaneschepke zaneschepke linked a pull request Aug 3, 2024 that will close this issue
@zaneschepke
Copy link
Owner

Please try this prerelease build that I'm hoping fixes this issue: https://github.com/zaneschepke/wgtunnel/releases/tag/auto-tunnel-reliability-testing

@gabriel20xx
Copy link
Contributor Author

Please try this prerelease build that I'm hoping fixes this issue: https://github.com/zaneschepke/wgtunnel/releases/tag/auto-tunnel-reliability-testing

I will try it for a few days and give you feedback then :)

@zaneschepke
Copy link
Owner

Please try this prerelease build that I'm hoping fixes this issue: https://github.com/zaneschepke/wgtunnel/releases/tag/auto-tunnel-reliability-testing

I will try it for a few days and give you feedback then :)

Thank you! If I remember right I think you are a kernel user.

There are a few issues with kernel mode if you're not using auto tunneling with it where the UI will lose track of the state of the kernel tunnel after close. When you reopen the app it will show as down even though the tunnel is still active. I have a solution to this, but it is still in the works. It should be done soon.

@zaneschepke
Copy link
Owner

Updated version that has kernel fixes as well as support for pre/post up/down scripts: https://github.com/zaneschepke/wgtunnel/releases/tag/auto-tunnel-reliability-testingv2

@gabriel20xx
Copy link
Contributor Author

I tried the updated version v2 and i have the problem with closing the connection. After some use, i disable the vpn switch but i'm still connected to it.

@zaneschepke
Copy link
Owner

I tried the updated version v2 and i have the problem with closing the connection. After some use, i disable the vpn switch but i'm still connected to it.

Hmm. Are there any logs you could share on this or any more details on steps to reproduce? Thanks for testing the new version!

@gabriel20xx
Copy link
Contributor Author

wg_tunnel_logs-1723012501.txt
wg_tunnel_logs-1723072049.txt

Here are the logs. On both of these I had the problem of disconnecting to the vpn.
Maybe they help. And they were made with the auto-tunnel-reliability-testingv2

@gabriel20xx
Copy link
Contributor Author

I'm starting with testing the v3 version now :)

@zaneschepke
Copy link
Owner

I'm starting with testing the v3 version now :)

v4 release now available with improvements for kernel mode and quick tile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants