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

(Solved) Randomly force closing on Android 15 #1175

Closed
timkgh opened this issue Nov 3, 2024 · 18 comments
Closed

(Solved) Randomly force closing on Android 15 #1175

timkgh opened this issue Nov 3, 2024 · 18 comments
Labels
android-restriction Caused by a recently introduced android restriction

Comments

@timkgh
Copy link

timkgh commented Nov 3, 2024

Solution: #1175 (comment)

Description of the issue

After the latest update from the Play Store, it keeps randomly force closing. It used to be stable on Android 14, it seems that the app has issues on Android 15 (Pixel phone).

Reproduction Steps

It's random, I get the notification from Android 15 that the app keeps closing and I have to restart it. It could be related to networking switching from mobile to wifi or trying to detect the wifi SSID. I have the app configured to only sync every 1h and only if it's connected to my home wifi (as it can only sync on my LAN).

Version Information

  • App Version: 1.28.0.0 (installed from the Google Play Store)
@igoose1
Copy link

igoose1 commented Nov 4, 2024

Just got this after switching from wifi to mobile data.

@Taewan-P
Copy link

Taewan-P commented Nov 4, 2024

It happened to me too. But in my case I was just at my house and it just crashed suddenly on background, with system dialog popping up that the app has crashed.

@benjamingray123
Copy link

benjamingray123 commented Nov 5, 2024

i also have this issue, running grapheneOS (android version 15), syncthing and silent notification seem to persist for 24-36hours but then crash and I get a "syncthing-fork keeps stopping" message.

FYI i have battery management settings disabled for syncthing-fork so it does have permissions to run permanently in the background

crash message pasted below:

type: crash
osVersion: google/komodo/komodo:15/AP3A.241005.015/2024103100:user/release-keys
package: com.github.catfriend1.syncthingandroid:1280000, targetSdk 35
process: com.github.catfriend1.syncthingandroid
processUptime: 418 + 370 ms
installer: com.android.vending

java.lang.RuntimeException: Unable to start service com.nutomic.syncthingandroid.service.SyncthingService@633b6a9 with null: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.github.catfriend1.syncthingandroid/com.nutomic.syncthingandroid.service.SyncthingService
	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5199)
	at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2478)
	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:8744)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
	at com.android.internal.os.ExecInit.main(ExecInit.java:50)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
Caused by: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.github.catfriend1.syncthingandroid/com.nutomic.syncthingandroid.service.SyncthingService
	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:5095)
	at android.os.Parcel.readParcelable(Parcel.java:5077)
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3246)
	at android.os.Parcel.createException(Parcel.java:3235)
	at android.os.Parcel.readException(Parcel.java:3211)
	at android.os.Parcel.readException(Parcel.java:3153)
	at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7231)
	at android.app.Service.startForeground(Service.java:879)
	at com.nutomic.syncthingandroid.util.Util$$ExternalSyntheticApiModelOutline0.m(D8$$SyntheticClass:0)
	at com.nutomic.syncthingandroid.service.NotificationHandler.updatePersistentNotification(NotificationHandler.java:216)
	at com.nutomic.syncthingandroid.service.NotificationHandler.updatePersistentNotification(NotificationHandler.java:109)
	at com.nutomic.syncthingandroid.service.SyncthingService.onStartCommand(SyncthingService.java:306)
	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5181)
	... 11 more

@daveschroeter
Copy link

The last version that works without issue for me on Android 15 is v1.27.7.0.

@Catfriend1
Copy link
Owner

Catfriend1 commented Nov 7, 2024

Please try switching to the github or fdroid release. Gplay is restricted. I won't look at gplay stuff anymore.

@mes85
Copy link

mes85 commented Nov 8, 2024

I have version 1.28.0.0 installed from one of the APK files.
I am also affected by the issue.

@makew0rld
Copy link

Also seeing very common crashing on Graphene OS.

@timkgh
Copy link
Author

timkgh commented Nov 9, 2024

Please try switching to the github or fdroid release. Gplay is restricted. I won't look at gplay stuff anymore.

@Catfriend1 I do not think it is a Google Play issue in this case. I tried the apk installed via Obtainium and I still get the same crashes.

@benjamingray123
Copy link

Following your advice @Catfriend1 I uninstalled my google playstore version and reinstalled from fdroid and the same problem persists.

FYI i'm on grapheneOS also

@arcegabriel
Copy link

It happens to me everyday. The app will close. Sometimes silently, sometimes Android will complain about the app crashing

@Catfriend1
Copy link
Owner

Gplay Version: uses data_sync permission > will close due to Android restricition
Github/fdroid version: uses other_foreground permission > should not close , but did not test - followed advice from user feedback.

PR welcome for fdroid code

@timkgh
Copy link
Author

timkgh commented Nov 15, 2024

Why does it close? I have other apps that have a permanent notification and keep on running.

@arcegabriel
Copy link

Gplay Version: uses data_sync permission > will close due to Android restricition Github/fdroid version: uses other_foreground permission > should not close , but did not test - followed advice from user feedback.

PR welcome for fdroid code

Thanks I swapped what I had for fdroid one. I will report in 24 h.

@Catfriend1
Copy link
Owner

Why does it close? I have other apps that have a permanent notification and keep on running.

It's an Android 15 restriction.

@timkgh
Copy link
Author

timkgh commented Nov 16, 2024

I understand that, but I have other apps running on Android 15, they keep a permanent notification and don't close. So it's possible to do it. Or is there something different when apps need access to files/network?

@Catfriend1
Copy link
Owner

I understand that, but I have other apps running on Android 15, they keep a permanent notification and don't close. So it's possible to do it. Or is there something different when apps need access to files/network?

The new a15 permission for "dont close" must be approved by gplay store review team. I won't go for that fight. This, the old non sufficient permission stays in place for gplay releases.

@wilriker
Copy link

I did not expect it to work but switch from GPlay to F-Droid version seems to have solved it for me. I haven't seen any force-closes more since I switched.

@Catfriend1 Catfriend1 pinned this issue Nov 18, 2024
@Catfriend1 Catfriend1 changed the title Randomly force closing on Android 15 (Solved) Randomly force closing on Android 15 Nov 18, 2024
Repository owner locked as resolved and limited conversation to collaborators Nov 18, 2024
@Catfriend1 Catfriend1 added the android-restriction Caused by a recently introduced android restriction label Nov 25, 2024
@Catfriend1
Copy link
Owner

If you still find problems related to Android 15, feel free to submit a fix PR. Changes to the permissions can only be implemented for the github and fdroid release flavors. (Gplay stays "as is" until the store entry dies...)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
android-restriction Caused by a recently introduced android restriction
Projects
None yet
Development

No branches or pull requests

10 participants