flutter-intellij: Invalid argument (uri): URI scheme 'c' is not supported
The issue originally filed as https://youtrack.jetbrains.com/issue/IDEA-353930 but it needs to be fixed in the Flutter plugin.
- Dart SDK 3.4.1
- Dart IntelliJ 233.15271
- Android Studio Jellyfish | 2023.3.1 Patch 1
- Windows 10 10.0
Logs show the problem:
1716442455851 => {"id":"6","method":"analysis.setSubscriptions","params":{"subscriptions":{"CLOSING_LABELS":["file:///C:/Users/mitja/src/myproject/myproject_flutter/lib/model/partnership.dart"],"OVERRIDES...
1716442455851 => {"id":"7","method":"flutter.setSubscriptions","params":{"subscriptions":{"OUTLINE":["C:\\Users\\mitja\\src\\myproject\\myproject_flutter\\lib\\model\\partnership.dart"]}}}
1716442455978 <= {"id":"6"}
1716442456000 <= {"id":"7","error":{"code":"SERVER_ERROR","message":"Invalid argument (uri): URI scheme 'c' is not supported. Allowed schemes are 'file', 'dart-macro+file'.: \"c:/Users/mitja/src/myproj...
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 7
- Comments: 23 (6 by maintainers)
Commits related to this issue
- Fix for file path passing to the DAS, i.e. URI protocol for the Flutter outline subscription. This fixes https://github.com/flutter/flutter-intellij/issues/7450 This starts work as well to resolve h... — committed to jwren/flutter-intellij by jwren 2 years ago
- Fix for file path passing to the DAS, i.e. URI protocol for the Flutter outline subscription. Iguana 2023.2.x builds are removed starting with this change as the Dart plugin does not yet have the sup... — committed to jwren/flutter-intellij by jwren 2 years ago
- Fix for file path passing to the DAS, i.e. URI protocol for the Flutter outline subscription (#7462) This fixes https://github.com/flutter/flutter-intellij/issues/7450 This starts work as well to ... — committed to flutter/flutter-intellij by jwren 2 years ago
It is too complex to explain why the solution I will describe works. Just do the following:
I think the bug is in the Dart plugin. For now, we need this workaround.
I have the same error.
This should be resolved with version 80 of the Flutter IJ plugin
Yes @alexander-doroshko is right. It took me 8 hours to solve this but managed to fix it eventually. I have a simple step by step guide on how to do it as well, mostly generated with ChatGPT 4o, but after countless hours of trying everything, it sure feels go to have it fixed.
Depending on the IDE version, it is one of these:
241.15845 233.15123 232.10313
Download the compatible version of the Dart plugin from the JetBrains plugin repository or another trusted source. The official plugin repository link is: Dart Plugin Repository
By following these steps, you should be able to downgrade the Dart plugin to a version that is compatible with your current build of Android Studio. If you encounter any issues during the process, feel free to ask for further assistance.
One of the main issues for me, was the ‘Flutter Outline’ not working, and the cntrl + left click wasn’t working either.
I really hope this helps you as saves you all the time and emotions of not knowing how or what to do.
Dart analysis issue
Invalid argument (uri): URI is not a valid file:// URI: “/Users/ying/work/frontend-expert-app/lib/main_common.dart”
Version information
Details
Invalid argument (uri): URI is not a valid file:// URI: “/Users/ying/work/frontend-expert-app/lib/main_common.dart”
Debug log
I believe this is an issue regarding the custom_lint package or the “analysis_options.yaml” file. After I removed the custom_lint package from my analysis file I no longer received any error messages.
Although I hadn’t configured the custom_lint package. Anyhow this might solve the problem for some people
Same problem here
Try Uninstalling both Flutter and Dart plugin and reinstall latest version then try reindexing project.
Karmokar Surjit Junior Software Developer F10S Mobile Apps Team
On Tue, 9 Jul, 2024 at 8:37 PM, Ortes @.***> wrote:
My friend, I am really happy it worked for you, it took my at least 8 hours of constant struggle before I could make it work, so the fact that you did not have to go through all of that brings me Joy.
Wish you nothing but the best! Peace & Love.
@philitell Try using the fix that worked for me. It is written above.
The issue is not Windows-specific, it happens on Mac/Linux as well: