Repository navigation
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: buildBuilding flutter applications with the toolBuilding flutter applications with the toolc: regressionIt was better in the past than it is nowIt was better in the past than it is nowfound in release: 3.25Found to occur in 3.25Found to occur in 3.25fyi-ecosystemFor the attention of Ecosystem teamFor the attention of Ecosystem teamhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: path_providerPlugin that provides resolved paths to some platform directoriesPlugin that provides resolved paths to some platform directoriespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Steps to reproduce
- Clone https://github.com/rajveermalviya/broken_demo
- Checkout Flutter SDK to 1cdff36
- Run the app, and verify tapping on the button prints the path in console (Working correctly).
- Checkout Flutter SDK to b2de4df
- Run the app, and verify tapping on the button results in the following error:
W/FlutterEngineCxnRegstry(14828): Attempted to register plugin (a0.a@29f2957) but it was already registered with this FlutterEngine (d0.c@ca74c44).
E/flutter (14828): [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
E/flutter (14828): #0 PathProviderApi.getApplicationSupportPath (package:path_provider_android/messages.g.dart:65)
E/flutter (14828): <asynchronous suspension>
E/flutter (14828): #1 getApplicationSupportDirectory (package:path_provider/path_provider.dart:78)
E/flutter (14828): <asynchronous suspension>
E/flutter (14828): #2 _BorkenDemoHomePageState.build.<anonymous closure> (package:broken_demo/main.dart:44)
E/flutter (14828): <asynchronous suspension>
E/flutter (14828):
Expected results
There should be no errors, it should print the path.
Actual results
Throws a PlatformException(channel-error, Unable to establish connection on channel., null, null)
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
No response
Flutter Doctor output
Doctor output
[!] Flutter (Channel [user-branch], 3.25.0-1.0.pre.110, on macOS 14.6.1 23G93 darwin-arm64, locale en-IN)
! Flutter version 3.25.0-1.0.pre.110 on channel [user-branch] at /Users/rajveer/sdk/flutter
Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
! Upstream repository unknown source is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
• Framework revision b2de4dfc2b (11 days ago), 2024-08-23 09:44:08 -0700
• Engine revision 41f539f086
• Dart version 3.6.0 (build 3.6.0-172.0.dev)
• DevTools version 2.39.0-dev.15
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at /Users/rajveer/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• ANDROID_HOME = /Users/rajveer/Library/Android/sdk
• 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 15.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15F31d
• 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.92.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.96.0
[✓] Connected device (4 available)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 14 (API 34) (emulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.6.1 23G93 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.6.1 23G93 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 128.0.6613.114
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.Reacted by Greg Price
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: buildBuilding flutter applications with the toolBuilding flutter applications with the toolc: regressionIt was better in the past than it is nowIt was better in the past than it is nowfound in release: 3.25Found to occur in 3.25Found to occur in 3.25fyi-ecosystemFor the attention of Ecosystem teamFor the attention of Ecosystem teamhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: path_providerPlugin that provides resolved paths to some platform directoriesPlugin that provides resolved paths to some platform directoriespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform teamTriaged by Android platform team
Activity
rajveermalviya commentedon Sep 3, 2024
Logs
(Created a gist because Github wouldn't let me post them here because of the character limit.)
https://gist.github.com/rajveermalviya/718ef0b7f09c5afe897762f21cd93295
rajveermalviya commentedon Sep 3, 2024
Also if the app is built with
flutter run --release -Pshrink=falsethere are no exceptions observed, the sample app successfully prints the path.cc @gmackall
huycozy commentedon Sep 4, 2024
Thank you for filing a detailed issue, @rajveermalviya
I see the expected output path on Flutter 3.24.1 whilst the reported error occurs on Flutter master
3.25.0-1.0.pre.248. Also, the issue will not occur without usingdevice_info_plusplugin.The current
path_providerpackage versions:path_provider: ^2.1.4andpath_provider_android: ^2.2.108 remaining items
Add proguard rule to keep the class for all implementations of Flutte…
gmackall commentedon Sep 5, 2024
Should be fixed now - thanks for the original report and clean repro @rajveermalviya!
Let me know if you run in to any new r8 related issues in the wake of #153868
rajveermalviya commentedon Sep 6, 2024
@gmackall Thanks for the prompt response and the PR towards fixing it!
Unfortunately though that PR doesn't fix the issue for me, running broken_demo with release still generates following warning and error:
It seems like the combination of
allowoptimizationandallowshrinkinghere is generating this issue, enabling onlyallowoptimizationor onlyallowshrinkingfixes it, but not with both. I changed that to only enable one of the modifier and that seems to fix the issue in both broken_demo (repro sample) and zulip-flutter:I chose
allowshrinkinghere because that generated the smaller apk for the broken_demo sample compared toallowoptimization. Also just to note, I had to explicitly force snapshot regeneration to test my local changes.rajveermalviya commentedon Sep 6, 2024
Sent PR #154715 making the change mentioned above.
AbdeMohlbi commentedon Sep 6, 2024
i can confirm that #154677 could not resolve the issue , but i got a new error instead :
and from what i see it's shared_preferences and i've seen some issues lately having simular error messages
so the issue is not specific to
path_providerit also occurs inshared_preferencesand possibly other packagesAbdeMohlbi commentedon Sep 6, 2024
can someone reopen this issue ?
Remove allowoptimization modifier from FlutterPlugin proguard rules (#…
gmackall commentedon Sep 6, 2024
I've just merged @rajveermalviya's pr (#154715) which should (combined with my pr) fix the issue for real this time. Please let me know if you still encounter this (or a similar) issue on the latest master
AbdeMohlbi commentedon Sep 6, 2024
thnks man i'll let u know once our roll is out
AbdeMohlbi commentedon Sep 7, 2024
hi @gmackall i can confirm that this pr fix this problem .
now we got new impeller issues 😑 on
Flutter 3.25.0-1.0.pre.299 •any way thanks for u and @rajveermalviya efforts
github-actions commentedon Sep 21, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.