Skip to content

[Bug] Frequently crashes in the background. #6

Description

@beedell-roke

Problem

FATAL EXCEPTION: main
Process: org.telegram.messenger, PID: 12259
java.lang.RuntimeException: Unable to create service org.telegram.messenger.NotificationsService: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service org.telegram.messenger/.NotificationsService
	at android.app.ActivityThread.handleCreateService(ActivityThread.java:4665)
	at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2265)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:294)
	at android.app.ActivityThread.main(ActivityThread.java:8223)
	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:977)
Caused by: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service org.telegram.messenger/.NotificationsService
	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:4892)
	at android.os.Parcel.readParcelable(Parcel.java:4874)
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3074)
	at android.os.Parcel.createException(Parcel.java:3063)
	at android.os.Parcel.readException(Parcel.java:3046)
	at android.os.Parcel.readException(Parcel.java:2988)
	at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6761)
	at android.app.Service.startForeground(Service.java:775)
	at org.telegram.messenger.NotificationsService.onCreate(NotificationsService.java:44)
	at android.app.ActivityThread.handleCreateService(ActivityThread.java:4652)
	... 9 more

This is similar to TacoTheDank/Scoop#92 (comment).

Environment

  • Application

    versionName=10.14.3
  • OS

    1. Details
      #!/usr/bin/env pwsh
      $Object = [Ordered]@{}
      @(
      	'ro.build.display.id'
      	'ro.build.fingerprint'
      	'ro.build.version.sdk'
      	'ro.build.version.sdk_full'
      ) | ForEach-Object {
      	$Value = (adb shell "getprop $_").Trim()
      	If ($Value) {
      		$Int64 = 0L
      		$Object[$_] =
      			If ([Long]::TryParse($Value, [Ref]$Int64)) {
      				$Int64
      			} Else {
      				$Value
      			}
      	}
      }
      $Object |
      	ConvertTo-Json -Compress |
      	yq -P
    2. ro.build.display.id: FP5.UT2K.B.098.20250109
      ro.build.version.sdk: 34
  • Hardware

    1. Details

      #!/usr/bin/env pwsh
      $Object = [Ordered]@{}
      @(
      	'ro.product.brand'
      	'ro.build.product'
      ) | ForEach-Object {
      	$Value = (adb shell "getprop $_").Trim()
      	If ($Value) {
      		$Int64 = 0L
      		$Object[$_] =
      			If ([Long]::TryParse($Value, [Ref]$Int64)) {
      				$Int64
      			} Else {
      				$Value
      			}
      	}
      }
      $Object |
      	ConvertTo-Json -Compress |
      	yq -P

    2. ro.product.brand: Fairphone
      ro.build.product: FP5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions