7
3
Fork
You've already forked android
4

3.5.1 crash: android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException #49

Open
opened 2025年12月17日 10:04:09 +01:00 by efef · 0 comments
Member
Copy link

With the 3.5.1 app we see 44% crashes with this detail. Looks like mostly Android 16 devices trigger this crash.
According to Gemini:
"Summary The crash, identified as an android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException, indicates that your application attempted to start a foreground service but failed to call startForeground() within a strict time limit enforced by the Android system. This typically occurs on newer Android versions (Android 12 and above) to prevent applications from running long-running background tasks without providing a visible notification to the user. The system initiates the service but then terminates it because the startForeground() method was not invoked promptly, usually within 5-10 seconds of the service starting."

Exception android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException:
at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException (ActivityThread.java:2675)
at android.app.ActivityThread.throwRemoteServiceException (ActivityThread.java:2643)
at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:3068)
at android.os.Handler.dispatchMessage (Handler.java:110)
at android.os.Looper.loopOnce (Looper.java:273)
at android.os.Looper.loop (Looper.java:363)
at android.app.ActivityThread.main (ActivityThread.java:10060)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:632)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:975)

With the 3.5.1 app we see 44% crashes with this detail. Looks like mostly Android 16 devices trigger this crash. According to Gemini: "Summary The crash, identified as an android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException, indicates that your application attempted to start a foreground service but failed to call startForeground() within a strict time limit enforced by the Android system. This typically occurs on newer Android versions (Android 12 and above) to prevent applications from running long-running background tasks without providing a visible notification to the user. The system initiates the service but then terminates it because the startForeground() method was not invoked promptly, usually within 5-10 seconds of the service starting." Exception android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException (ActivityThread.java:2675) at android.app.ActivityThread.throwRemoteServiceException (ActivityThread.java:2643) at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException (Unknown Source) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:3068) at android.os.Handler.dispatchMessage (Handler.java:110) at android.os.Looper.loopOnce (Looper.java:273) at android.os.Looper.loop (Looper.java:363) at android.app.ActivityThread.main (ActivityThread.java:10060) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:632) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:975)
Sign in to join this conversation.
No Branch/Tag specified
master
feature/bugfixes
feature/tile_service
feature/mte_crash
feature/update-ics
feature/proxyguard_via_wireguard
feature/include_list
feature/threading_fix
3.5.2
3.5.1
3.5.0
3.4.0
3.3.4
3.3.3
3.3.2
3.3.1
3.3.0
3.2.2
3.2.1
3.2.0
3.1.1
3.1.0
3.0.1
3.0.0
2.99.0
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.3.2
1.3.1
1.3.0
1.2.3
1.2.2
1.2.1
1.2.0
1.1.1
1.0.1
1.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
eduVPN/android#49
Reference in a new issue
eduVPN/android
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?