TeamAmaze / TeamAmaze/AmazeFileManager

`ForegroundServiceStartNotAllowedException: startForegroundService() not allowed`

Open
#3,768 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

From-telegram Issue-Bug
Dominant language
Kotlin
Stars
6.4k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
1

Description

Issue explanation (write below this line)

Exception

  • App Name: مدير ملفات Amaze
  • Package: com.amaze.filemanager.debug
  • Version: 3.8.5
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux Android 13 - 33
  • Device: V2205
  • Model: V2205
  • Product: V2205
Crash log

android.app.ForegroundServiceStartNotAllowedException: startForegroundService() not allowed due to mAllowStartForeground false: service com.amaze.filemanager.debug/leakcanary.internal.HeapAnalyzerService
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:4789)
at android.os.Parcel.readParcelable(Parcel.java:4757)
at android.os.Parcel.createExceptionOrNull(Parcel.java:3020)
at android.os.Parcel.createException(Parcel.java:3009)
at android.os.Parcel.readException(Parcel.java:2992)
at android.os.Parcel.readException(Parcel.java:2934)
at android.app.IActivityManager$Stub$Proxy.startService(IActivityManager.java:6258)
at java.lang.reflect.Method.invoke(Native Method)
at leakcanary.ServiceWatcher$install$4$2.invoke(ServiceWatcher.kt:85)
at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
at $Proxy5.startService(Unknown Source)
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1921)
at android.app.ContextImpl.startForegroundService(ContextImpl.java:1892)
at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:822)
at leakcanary.internal.HeapAnalyzerService$Companion.startForegroundService(HeapAnalyzerService.kt:149)
at leakcanary.internal.HeapAnalyzerService$Companion.runAnalysis(HeapAnalyzerService.kt:141)
at leakcanary.internal.HeapDumpTrigger.dumpHeap(HeapDumpTrigger.kt:186)
at leakcanary.internal.HeapDumpTrigger.checkRetainedObjects(HeapDumpTrigger.kt:150)
at leakcanary.internal.HeapDumpTrigger.access$checkRetainedObjects(HeapDumpTrigger.kt:29)
at leakcanary.internal.HeapDumpTrigger$scheduleRetainedObjectCheck$1.run(HeapDumpTrigger.kt:334)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:223)
at android.os.Looper.loop(Looper.java:324)
at android.os.HandlerThread.run(HandlerThread.java:67)


Reporter: None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Android 13 failure through leakcanary.internal.HeapAnalyzerService.kt, HeapDumpTrigger.kt, and leakcanary.ServiceWatcher.kt, focusing on the startForegroundService call shown in the stack trace. Check how the service is triggered when the app is not allowed to start foreground services; done means the reported crash no longer occurs on Android 13.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.