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

Xiaomi - App crashes when open native finder #1608

Open
felipecastrosales opened this issue Oct 8, 2024 · 7 comments
Open

Xiaomi - App crashes when open native finder #1608

felipecastrosales opened this issue Oct 8, 2024 · 7 comments
Labels
new issue An issue that hasn't yet been seen from the maintainer

Comments

@felipecastrosales
Copy link

Hey everyone, how’s it going?

I’ve been facing an issue with the FilePicker on a specific device for a while now: the Xiaomi Redmi Note 9, running MIUI 13.0.2 on Android 12.

The problem is that whenever I open the pickFiles dialog, my app automatically closes. This happens both in my production app, which has millions of users, and in the example app, so it seems unlikely that the issue is specific to the app I’m working on.

I’ve looked into potential causes on Android but haven’t reached any clear conclusion on what might be causing the problem or how to solve it.

A few additional details that may or may not be relevant:

  • The issue didn’t occur 100% of the time in the example app when "multiple files" was set to false.
  • However, the issue did occur when "multiple files" was set to true, as shown in the attached video.

I don’t necessarily think these details are directly related, but they’re something I noticed while testing.


For more details, here’s the logcat output:


Videos

  • When Crash happens
Crash.Happens.mp4
  • When Crash doesn't happens
crashdoesnothappen.mp4

Flutter Version details ``` [✓] Flutter (Channel stable, 3.24.0, on macOS 15.0.1 24A348 darwin-arm64, locale en-BR) • Flutter version 3.24.0 on channel stable at /Users/felipe/fvm/versions/3.24.0 • Upstream repository https://github.com/flutter/flutter.git • Framework revision 80c2e84975 (2 months ago), 2024-07-30 23:06:49 +0700 • Engine revision b8800d88be • Dart version 3.5.0 • DevTools version 2.37.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at /Users/felipe/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
• All Android licenses accepted.

[!] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS and macOS development.
Download at: https://developer.apple.com/xcode/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
• CocoaPods version 1.15.2

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

[✓] Android Studio (version 2024.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.11+0-17.0.11b1207.24-11852314)

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

[✓] Connected device (3 available)
• M2003J15SC (mobile) • 192.168.3.31:5555 • android-arm64 • Android 12 (API 31)
• macOS (desktop) • macos • darwin-arm64 • macOS 15.0.1 24A348 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 129.0.6668.90

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

! Doctor found issues in 1 category.

</details>

Here’s the translation:

---

I’d like the maintainers to take a look or offer suggestions for this issue, as it seems to be something specific to Xiaomi devices (particularly the one mentioned above, which I’ve been using for some time). I’ve tested on other devices from the same brand, and the issue didn’t occur. However, I’m not sure if those devices were running the same Android/Xiaomi versions as mine—or if they were different models. Thanks!
@felipecastrosales felipecastrosales added the new issue An issue that hasn't yet been seen from the maintainer label Oct 8, 2024
@felipecastrosales
Copy link
Author

I tried adding the entire error log here, but GitHub limits the issue size, so it didn’t fit. I had to make some adjustments.

cc @miguelpruivo

@felipecastrosales felipecastrosales changed the title App crashes when open allowing multiple files. Xiaomi - App crashes when open native Oct 8, 2024
@felipecastrosales felipecastrosales changed the title Xiaomi - App crashes when open native Xiaomi - App crashes when open native finder Oct 8, 2024
@felipecastrosales
Copy link
Author

felipecastrosales commented Oct 8, 2024

This looks for me be the reason of error:

2024-10-08 14:37:00.470 20005-20005 MsyncFactory            com...ter.plugin.filepicker.example  E  [static] ClassNotFoundException
java.lang.ClassNotFoundException: com.mediatek.view.impl.MsyncFactoryImpl
	at java.lang.Class.classForName(Native Method)
	at java.lang.Class.forName(Class.java:607)
	at java.lang.Class.forName(Class.java:512)
	at com.mediatek.view.MsyncFactory.<clinit>(MsyncFactory.java:14)
	at android.view.ViewRootImpl.<init>(ViewRootImpl.java:763)
	at android.view.ViewRootImpl.<init>(ViewRootImpl.java:859)
	at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:393)
	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:134)
	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5012)
	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:54)
	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2325)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:210)
	at android.os.Looper.loop(Looper.java:299)
	at android.app.ActivityThread.main(ActivityThread.java:8280)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073)
Caused by: java.lang.ClassNotFoundException: com.mediatek.view.impl.MsyncFactoryImpl
	at java.lang.Class.classForName(Native Method)
	at java.lang.BootClassLoader.findClass(ClassLoader.java:2693)
	at java.lang.BootClassLoader.loadClass(ClassLoader.java:2753)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
	at java.lang.Class.classForName(Native Method) 
	at java.lang.Class.forName(Class.java:607) 
	at java.lang.Class.forName(Class.java:512) 
	at com.mediatek.view.MsyncFactory.<clinit>(MsyncFactory.java:14) 
	at android.view.ViewRootImpl.<init>(ViewRootImpl.java:763) 
	at android.view.ViewRootImpl.<init>(ViewRootImpl.java:859) 
	at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:393) 
	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:134) 
	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5012) 
	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:54) 
	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) 
	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) 
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) 
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2325) 
	at android.os.Handler.dispatchMessage(Handler.java:106) 
	at android.os.Looper.loopOnce(Looper.java:210) 
	at android.os.Looper.loop(Looper.java:299) 
	at android.app.ActivityThread.main(ActivityThread.java:8280) 
	at java.lang.reflect.Method.invoke(Native Method) 
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576) 
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073) 
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

Copy link

This issue is stale because it has been open for 7 days with no activity.

@github-actions github-actions bot added the stale label Oct 16, 2024
@felipecastrosales
Copy link
Author

new activity now

@github-actions github-actions bot removed the stale label Oct 17, 2024
@MarcioHenriqueVS
Copy link

Estou tendo o mesmo problema, se conseguir resolver aviso aqui

@felipecastrosales
Copy link
Author

@miguelpruivo can u see this

@felipecastrosales
Copy link
Author

I opened an pr at #1611

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new issue An issue that hasn't yet been seen from the maintainer
Projects
None yet
Development

No branches or pull requests

2 participants