Skip to content

java.lang.SecurityException: Permission Denial crash at launch #88767

Description

@markusaksli-nc

I was trying to confirm if #35734 is still reproducible on master and ran into this crash. Didn't even need to change the default flutter create app as it turns out. Just running flutter create and flutter run is enough to crash on my SM G950F.

flutter doctor -v
[√] Flutter (Channel master, 2.5.0-7.0.pre.211, on Microsoft Windows [Version 10.0.19043.1165], locale en-GB)
    • Flutter version 2.5.0-7.0.pre.211 at C:\Development\flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 56b681247d (6 hours ago), 2021-08-23 20:44:05 -0400
    • Engine revision 926ce0d855
    • Dart version 2.15.0 (build 2.15.0-43.0.dev)

[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\marku\AppData\Local\Android\sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\203.7621141\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 2020.3)
    • Android Studio at C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\203.7621141
    • Flutter plugin version 59.0.2
    • Dart plugin version 203.8292
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[√] Connected device (3 available)
    • SM G950F (mobile) • ce12171c51cc001c03 • android-arm64  • Android 9 (API 28)
    • Chrome (web)      • chrome             • web-javascript • Google Chrome 92.0.4515.131
    • Edge (web)        • edge               • web-javascript • Microsoft Edge 92.0.902.78

• No issues found!
Logs
Syncing files to device SM G950F...
D/vndksupport( 8582): Loading /vendor/lib64/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace.
E/flutter ( 8582): [ERROR:flutter/fml/platform/android/jni_util.cc(182)] java.lang.SecurityException: Permission Denial: broadcast from android asks to run as user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL or android.permission.INTERACT_ACROSS_USERS
E/flutter ( 8582): 	at android.os.Parcel.createException(Parcel.java:1966)
E/flutter ( 8582): 	at android.os.Parcel.readException(Parcel.java:1934)
E/flutter ( 8582): 	at android.os.Parcel.readException(Parcel.java:1884)
E/flutter ( 8582): 	at android.app.IActivityManager$Stub$Proxy.reportActivityFullyDrawn(IActivityManager.java:7318)
E/flutter ( 8582): 	at android.app.Activity.reportFullyDrawn(Activity.java:2092)
E/flutter ( 8582): 	at io.flutter.embedding.android.FlutterActivity.onFlutterUiDisplayed(FlutterActivity.java:1100)
E/flutter ( 8582): 	at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$1.onFlutterUiDisplayed(FlutterActivityAndFragmentDelegate.java:88)
E/flutter ( 8582): 	at io.flutter.embedding.android.FlutterView$2.onFlutterUiDisplayed(FlutterView.java:133)
E/flutter ( 8582): 	at io.flutter.embedding.engine.FlutterJNI.onFirstFrame(FlutterJNI.java:462)
E/flutter ( 8582): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter ( 8582): 	at android.os.MessageQueue.next(MessageQueue.java:326)
E/flutter ( 8582): 	at android.os.Looper.loop(Looper.java:181)
E/flutter ( 8582): 	at android.app.ActivityThread.main(ActivityThread.java:7050)
E/flutter ( 8582): 	at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 8582): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
E/flutter ( 8582): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
E/flutter ( 8582): Caused by: android.os.RemoteException: Remote stack trace:
E/flutter ( 8582): 	at com.android.server.am.UserController.handleIncomingUser(UserController.java:1818)
E/flutter ( 8582): 	at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:25752)
E/flutter ( 8582): 	at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:25683)
E/flutter ( 8582): 	at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:26553)
E/flutter ( 8582): 	at android.app.ContextImpl.sendBroadcastAsUser(ContextImpl.java:1264)
E/flutter ( 8582): 
E/flutter ( 8582): 
F/flutter ( 8582): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1220)] Check failed: fml::jni::CheckException(env). 
F/libc    ( 8582): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 8582 (.example.master), pid 8582 (.example.master)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/dreamltexx/dreamlte:9/PPR1.180610.011/G950FXXUCDUD1:user/release-keys'
Revision: '10'
ABI: 'arm64'
pid: 8582, tid: 8582, name: .example.master  >>> com.example.master <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1220)] Check failed: fml::jni::CheckException(env). 
'
    x0  0000000000000000  x1  0000000000002186  x2  0000000000000006  x3  0000000000000008
    x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  0000000000000080
    x8  0000000000000083  x9  0000007e66b38838  x10 fffffff87ffffbdf  x11 0000000000000001
    x12 0000007dbe0b2080  x13 0000000000000003  x14 ffffffffffffffff  x15 0000000000000000
    x16 0000007e66b6f2a0  x17 0000007e66aae920  x18 0000007fe7576b6a  x19 0000000000002186
    x20 0000000000002186  x21 0000000000000083  x22 0000000000000033  x23 0000007ddb019e30
    x24 0000007ddb019e18  x25 0000000000000000  x26 0000007e685d55f8  x27 0000000000000033
    x28 0000000000000001  x29 0000007fe7577420
    sp  0000007fe75773e0  lr  0000007e66aa1d68  pc  0000007e66aa1d94
backtrace:
    #00 pc 0000000000021d94  /system/lib64/libc.so (abort+124)
    #01 pc 000000000146c35c  /data/app/com.example.master-lN5-K3x1G7AcykrCx1DHGA==/lib/arm64/libflutter.so (offset 0x146a000)
    #02 pc 0000000001497ce4  /data/app/com.example.master-lN5-K3x1G7AcykrCx1DHGA==/lib/arm64/libflutter.so (offset 0x146a000)
    #03 pc 0000000001474d44  /data/app/com.example.master-lN5-K3x1G7AcykrCx1DHGA==/lib/arm64/libflutter.so (offset 0x146a000)
    #04 pc 0000000000000020  <unknown>
Lost connection to device.

Only found one related issue but it got closed due to timeout #71638.

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressionc: crashStack traces logged to the consolec: regressionIt was better in the past than it is nowe: device-specificOnly manifests on certain devicesplatform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versiontoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions