TrackerControl / tracker-control-android

TrackerControl Android: monitor and control trackers and ads.
https://trackercontrol.org/
GNU General Public License v3.0
1.86k stars 82 forks source link

Airplane mode makes the app silently crash, VPN stays connected #389

Open DefectInsect opened 10 months ago

DefectInsect commented 10 months ago

Do you use TrackerControl from Google Play/F-Droid/other? Current release from GitHub. Bug exhibited in every version and on multiple phones.

Describe the bug In general, when switching airplane mode on or off the phone stays connected to the local VPN. Upon switching airplane mode off or when having airplane mode turned on for too long, there is a good chance for TC to silently crash in the background. The phone still stays connected to the VPN, but Apps will be unable to access the internet until TC is restarted. TC crashes when opened.

To Reproduce Steps to reproduce the behavior:

  1. Turn on airplane mode.
  2. Wait some time (e.g. overnight)
  3. Turn off airplane mode.
  4. Apps won't work anymore.

To Resolve

  1. Open TC-App
  2. Crash message appears
  3. Send bug report/dismiss
  4. TC restarts and works again
kasnder commented 10 months ago

Sorry to hear about this. I went into my emails and didn't find that you sent me the bug report. Could you please do that? You'll need an email app on your phone for this. Otherwise, it'll nearly be impossible for me to fix this issue.

DefectInsect commented 9 months ago

Hey there, it just happened again and I sent a bug report. Thanks for caring!

kasnder commented 9 months ago

Thanks. This seems to be the error:

java.lang.RuntimeException: Unable to create service eu.faircode.netguard.ServiceSinkhole: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service net.kollnig.missioncontrol/eu.faircode.netguard.ServiceSinkhole
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:5086)
    at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2428)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:226)
    at android.os.Looper.loop(Looper.java:313)
    at android.app.ActivityThread.main(ActivityThread.java:8757)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service net.kollnig.missioncontrol/eu.faircode.netguard.ServiceSinkhole
    at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
    at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
    at android.os.Parcel.readParcelableInternal(Parcel.java:4787)
    at android.os.Parcel.readParcelable(Parcel.java:4755)
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3018)
    at android.os.Parcel.createException(Parcel.java:3007)
    at android.os.Parcel.readException(Parcel.java:2990)
    at android.os.Parcel.readException(Parcel.java:2932)
    at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6991)
    at android.app.Service.startForeground(Service.java:743)
    at eu.faircode.netguard.ServiceSinkhole.onCreate(ServiceSinkhole.java:2546)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:5073)
    ... 9 more
kasnder commented 9 months ago

So, I further had a look at the bug report and it seems that you're using a TC version that's more than a year old. Could you please try updating to the latest version first? I might also be looking at the wrong bug report, so it would be helpful to mention this GitHub discussion in your bug report.

DefectInsect commented 9 months ago

Hey ksander, thanks again for looking into it. I'm using 2023.08.09 and included my Username in the bug-report, which I sent minutes before making my last comment. By bug-report you mean the window, that pops up, when the app crashes, correct?

kasnder commented 9 months ago

yes, exactly. sending the bug report only works though if you have an email programme installed. if you could indicate in the subject line of that email that you're referring to this issue, that'd be fantastic. i still can't identify it. sorry!

DefectInsect commented 9 months ago

Hmm.. I have the GMail App, as well as FairEmail set up. However, whenever TC crashes, I am given a small message box with a textbox + the option to "Send" its contents. No Mail-App opens and no subject can be chosen. Also no corresponding mail within my sent items.

DefectInsect commented 9 months ago

Screenshot_20230917-070322

Here's another one.

kasnder commented 9 months ago

I don't receive these bug reports sadly. Alternatively, you could try to run adb logcat on your device and send me the output, but it's a little tricky to run. If you get it to work, then send the report to hello@trackercontrol.org