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

bug: crash on Android 14 when try to start FGS #1854

Open
4 tasks done
Howard20181 opened this issue Apr 5, 2024 · 4 comments · May be fixed by #1856
Open
4 tasks done

bug: crash on Android 14 when try to start FGS #1854

Howard20181 opened this issue Apr 5, 2024 · 4 comments · May be fixed by #1856
Assignees
Labels
Bug report Something isn't working

Comments

@Howard20181
Copy link

Bug description

Patch any app on Android 14 can reproduce

Version of ReVanced Manager and version & name of app you are patching

1.20.0-dev.1
YouTube 19.09.37

Installation method

Regular

ReVanced Manager logs

Generated by AppErrorsTracking 1.3(6)
Project URL: https://github.com/KitsunePie/AppErrorsTracking
===============
[Device Brand]: Xiaomi
[Device Model]: 23127PN0CC
[Display]: UKQ1.230804.001 release-keys
[Android Version]: 14
[Android API Level]: 34
[System Locale]: zh_CN
[Process ID]: 24983
[User ID]: 0
[CPU ABI]: arm64-v8a
[Package Name]: app.revanced.manager.flutter
[Version Name]: 1.20.0-dev.1
[Version Code]: 101800014
[Target SDK]: 34
[Min SDK]: 26
[Error Type]: JVM
[Crash Time]: 2024-04-05T09:53:16.462
[Stack Trace]:
java.lang.RuntimeException: Unable to start service de.julianassmann.flutter_background.IsolateHolderService@243de with Intent { act=START cmp=app.revanced.manager.flutter/de.julianassmann.flutter_background.IsolateHolderService }: android.app.MissingForegroundServiceTypeException: Starting FGS without a type  callerApp=ProcessRecord{45d88a8 24983:app.revanced.manager.flutter/u0a483} targetSDK=34
	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5046)
	at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2418)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:224)
	at android.os.Looper.loop(Looper.java:318)
	at android.app.ActivityThread.main(ActivityThread.java:8677)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
Caused by: android.app.MissingForegroundServiceTypeException: Starting FGS without a type  callerApp=ProcessRecord{45d88a8 24983:app.revanced.manager.flutter/u0a483} targetSDK=34
	at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:53)
	at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:49)
	at android.os.Parcel.readParcelableInternal(Parcel.java:4870)
	at android.os.Parcel.readParcelable(Parcel.java:4852)
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3052)
	at android.os.Parcel.createException(Parcel.java:3041)
	at android.os.Parcel.readException(Parcel.java:3024)
	at android.os.Parcel.readException(Parcel.java:2966)
	at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7270)
	at android.app.Service.startForeground(Service.java:775)
	at de.julianassmann.flutter_background.IsolateHolderService.startService(Unknown Source:200)
	at de.julianassmann.flutter_background.IsolateHolderService.onStartCommand(Unknown Source:38)
	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5028)
	... 9 more

Patch logs

No response

Acknowledgements

  • This issue is not a duplicate of an existing bug report.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • The bug is only related to ReVanced Manager
@Howard20181 Howard20181 added the Bug report Something isn't working label Apr 5, 2024
@Howard20181
Copy link
Author

Cause by 7833a0d

@oSumAtrIX
Copy link
Member

This commit only switches repos. The previous repo branch was merged into the new repo, so that commit should not make a difference.

@Ushie
Copy link
Member

Ushie commented Apr 5, 2024

Looking into it, hopefully hotfix tonight

@Ushie
Copy link
Member

Ushie commented Apr 5, 2024

I reverted 7833a0d in the meantime, this is not a permanent fix as this means that notifications on Android 14 are broken

Notifications weren't working on Android 14, which was fixed upstream by JulianAssmann/flutter_background@65cf0ec but they failed to address the required notification types, causing the app to crash. Previously, the absence of necessary foreground service permission prevented the app from reaching the notification creation stage, thus avoiding the crash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants