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

PlatformException on Android isn't correctly parsed #2001

Closed
ueman opened this issue Apr 21, 2024 · 1 comment · Fixed by #2033
Closed

PlatformException on Android isn't correctly parsed #2001

ueman opened this issue Apr 21, 2024 · 1 comment · Fixed by #2033
Assignees

Comments

@ueman
Copy link
Collaborator

ueman commented Apr 21, 2024

Platform

Flutter Mobile

Obfuscation

Disabled

Debug Info

Disabled

Doctor

flutter doctor -v
[✓] Flutter (Channel stable, 3.19.3, on macOS 14.3.1 23D60 darwin-arm64, locale en-DE)
    • Flutter version 3.19.3 on channel stable at /Users/ueman/Developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ba39319843 (5 weeks ago), 2024-03-07 15:22:21 -0600
    • Engine revision 2e4ba9c6fb
    • Dart version 3.3.1
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/ueman/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.88.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.86.0

[✓] Connected device (4 available)
    • iPhone-GWTGT1UTPLJQ (mobile) • 00008030-000E4D310CD3402E            • ios            • iOS 17.4.1 21E236
    • iPhone 15 Pro Max (mobile)   • 4E4B3D83-EAA8-490B-B699-90A09831AC06 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
    • macOS (desktop)              • macos                                • darwin-arm64   • macOS 14.3.1 23D60 darwin-arm64
    • Chrome (web)                 • chrome                               • web-javascript • Google Chrome 123.0.6312.107

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Version

7.18.0

Steps to Reproduce

Catch the PlatformException mentioned below

Expected Result

The exception is correctly parsed.

Actual Result

PlatformException: PlatformException(getNotificationChannelsError, Unable to find resource ID #0x7f14000d, android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f14000d
	at android.content.res.ResourcesImpl.getResourceEntryName(ResourcesImpl.java:493)
	at android.content.res.Resources.getResourceEntryName(Resources.java:2441)
	at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.getMappedNotificationChannel(FlutterLocalNotificationsPlugin.java:170)
	at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.getNotificationChannels(FlutterLocalNotificationsPlugin.java:32)
	at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.onMethodCall(FlutterLocalNotificationsPlugin.java:399)
	at be.j$a.a(MethodChannel.java:18)
	at pd.c.l(DartMessenger.java:19)
	at pd.c.m(DartMessenger.java:42)
	at pd.c.h(Unknown Source:0)
	at pd.b.run(Unknown Source:12)
	at android.os.Handler.handleCallback(Handler.java:966)
	at android.os.Handler.dispatchMessage(Handler.java:110)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:293)
	at android.app.ActivityThread.loopProcess(ActivityThread.java:9832)
	at android.app.ActivityThread.main(ActivityThread.java:9821)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1201)
, null)

Screenshot 2024-04-21 at 21 42 53

Are you willing to submit a PR?

None

@ueman
Copy link
Collaborator Author

ueman commented Apr 25, 2024

I have another example for which the parsing doesn't work:

PlatformException(android.os.FileUriExposedException: file:///de/brand/apple/%3FforceDeviceId=-111 exposed beyond app through Intent.getData(), FileUriExposedException, Cause: null, Stacktrace: android.os.FileUriExposedException: file:///de/brand/apple/%3FforceDeviceId=-111 exposed beyond app through Intent.getData()
	at android.os.StrictMode.onFileUriExposed(StrictMode.java:2245)
	at android.net.Uri.checkFileUriExposed(Uri.java:2405)
	at android.content.Intent.prepareToLeaveProcess(Intent.java:12779)
	at android.content.Intent.prepareToLeaveProcess(Intent.java:12728)
	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1872)
	at android.app.Activity.startActivityForResult(Activity.java:5743)
	at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:2)
	at android.app.Activity.startActivityForResult(Activity.java:5701)
	at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:1)
	at android.app.Activity.startActivity(Activity.java:6199)
	at android.app.Activity.startActivity(Activity.java:6166)
	at nf.h.p(UrlLauncher.java:31)
	at nf.a$c.k(Messages.java:22)
	at nf.a$c.n(Unknown Source:0)
	at nf.c.a(Unknown Source:2)
	at ie.a$b.a(BasicMessageChannel.java:18)
	at wd.c.l(DartMessenger.java:19)
	at wd.c.m(DartMessenger.java:42)
	at wd.c.h(Unknown Source:0)
	at wd.b.run(Unknown Source:12)
	at android.os.Handler.handleCallback(Handler.java:958)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:230)
	at android.os.Looper.loop(Looper.java:319)
	at android.app.ActivityThread.main(ActivityThread.java:8893)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
, null)

@buenaflor buenaflor moved this from Needs Discussion to Needs Investigation in Mobile & Cross Platform SDK Apr 25, 2024
@github-project-automation github-project-automation bot moved this from Needs Investigation to Done in Mobile & Cross Platform SDK May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants