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

Screen sharing example crashed on Pixel Android 14 when run with Flutter SDK 3.22 #1783

Open
1 of 5 tasks
littleGnAl opened this issue May 24, 2024 · 1 comment
Open
1 of 5 tasks

Comments

@littleGnAl
Copy link
Collaborator

Version of the agora_rtc_engine

main branch(6.3.1)

Platforms affected

  • Android
  • iOS
  • macOS
  • Windows
  • Web

Steps to reproduce

Run the screen sharing example on Pixel Android 14

Expected results

No crash.

Actual results

Crashed.

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
A Dart VM Service on Pixel 7 is available at: http://127.0.0.1:63210/_56dZ2FOPVE=/
The Flutter DevTools debugger and profiler on Pixel 7 is available at: http://127.0.0.1:9104?uri=http://127.0.0.1:63210/_56dZ2FOPVE=/
I/_rtc_ng_example(25251): Background concurrent copying GC freed 22992(2558KB) AllocSpace objects, 3(60KB) LOS objects, 90% free, 2579KB/26MB, paused 271us,68us total 104.863ms
D/CompatibilityChangeReporter(25251): Compat change id reported: 78294732; UID 10140; state: ENABLED
D/CompatibilityChangeReporter(25251): Compat change id reported: 160794467; UID 10140; state: ENABLED
D/AndroidRuntime(25251): Shutting down VM
E/AndroidRuntime(25251): FATAL EXCEPTION: main
E/AndroidRuntime(25251): Process: io.agora.agora_rtc_ng_example, PID: 25251
E/AndroidRuntime(25251): java.lang.RuntimeException: Unable to start service io.agora.agora_rtc_ng_example.ExampleService@62d8d84 with Intent { act=ACTION_START_FOREGROUND_SERVICE cmp=io.agora.agora_rtc_ng_example/.ExampleService (has extras) }: java.lang.SecurityException: Starting FGS with type microphone callerApp=ProcessRecord{bb5f356 25251:io.agora.agora_rtc_ng_example/u0a140} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_MICROPHONE] any of the permissions allOf=false [android.permission.CAPTURE_AUDIO_HOTWORD, android.permission.CAPTURE_AUDIO_OUTPUT, android.permission.CAPTURE_MEDIA_OUTPUT, android.permission.CAPTURE_TUNER_AUDIO_INPUT, android.permission.CAPTURE_VOICE_COMMUNICATION_OUTPUT, android.permission.RECORD_AUDIO]  and the app must be in the eligible state/exemptions to access the foreground only permission
E/AndroidRuntime(25251): 	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4839)
E/AndroidRuntime(25251): 	at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
E/AndroidRuntime(25251): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2289)
E/AndroidRuntime(25251): 	at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(25251): 	at android.os.Looper.loopOnce(Looper.java:205)
E/AndroidRuntime(25251): 	at android.os.Looper.loop(Looper.java:294)
E/AndroidRuntime(25251): 	at android.app.ActivityThread.main(ActivityThread.java:8177)
E/AndroidRuntime(25251): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(25251): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
E/AndroidRuntime(25251): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
E/AndroidRuntime(25251): Caused by: java.lang.SecurityException: Starting FGS with type microphone callerApp=ProcessRecord{bb5f356 25251:io.agora.agora_rtc_ng_example/u0a140} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_MICROPHONE] any of the permissions allOf=false [android.permission.CAPTURE_AUDIO_HOTWORD, android.permission.CAPTURE_AUDIO_OUTPUT, android.permission.CAPTURE_MEDIA_OUTPUT, android.permission.CAPTURE_TUNER_AUDIO_INPUT, android.permission.CAPTURE_VOICE_COMMUNICATION_OUTPUT, android.permission.RECORD_AUDIO]  and the app must be in the eligible state/exemptions to access the foreground only permission
E/AndroidRuntime(25251): 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
E/AndroidRuntime(25251): 	at android.os.Parcel.createException(Parcel.java:3041)
E/AndroidRuntime(25251): 	at android.os.Parcel.readException(Parcel.java:3024)
E/AndroidRuntime(25251): 	at android.os.Parcel.readException(Parcel.java:2966)
E/AndroidRuntime(25251): 	at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6761)
E/AndroidRuntime(25251): 	at android.app.Service.startForeground(Service.java:775)
E/AndroidRuntime(25251): 	at io.agora.agora_rtc_ng_example.ExampleService.startForegroundService(ExampleService.kt:92)
E/AndroidRuntime(25251): 	at io.agora.agora_rtc_ng_example.ExampleService.onStartCommand(ExampleService.kt:24)
E/AndroidRuntime(25251): 	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4821)
E/AndroidRuntime(25251): 	... 9 more
E/AndroidRuntime(25251): Caused by: android.os.RemoteException: Remote stack trace:
E/AndroidRuntime(25251): 	at com.android.server.am.ActiveServices.validateForegroundServiceType(ActiveServices.java:2611)
E/AndroidRuntime(25251): 	at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:2322)
E/AndroidRuntime(25251): 	at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:1679)
E/AndroidRuntime(25251): 	at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:13265)
E/AndroidRuntime(25251): 	at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3385)
E/AndroidRuntime(25251):
I/Process (25251): Sending signal. PID: 25251 SIG: 9

Flutter Doctor output

Flutter 3.22

@littleGnAl
Copy link
Collaborator Author

Related #1733

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant