Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bug report: Issue building flutter on a mac

Tags:

flutter

dart

Flutter was working just fine a few weeks ago, however it appears to be broken on my system. I cleaned my existing install and re-cloned and installed flutter, but it seems to fail with the following problem:

    Akshays-MacBook-Pro-2:~ akshaydashrath$ flutter doctor
    Downloading Dart SDK 1.21.0...
    #################################################################100.0%
    Building flutter tool...
    vm-service: Error: Unhandled exception:
    Unsupported operation: Cannot extract a non-Windows file path from a 
    file URI with an authority
    #0      _SimpleUri._toFilePath (dart:core/uri.dart:4423)
    #1      _SimpleUri.toFilePath (dart:core/uri.dart:4417)
    #2      _loadFile (loader.dart:407:26)
    #3      _handleResourceRequest (loader.dart:510:5)
    #4      _processLoadRequest (loader.dart:941:7)
    #5      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

I've recently updated MacOS to 10.12.2 apart from that I can't identify any other changes I've made that could affect the system.

like image 684
akshaydashrath Avatar asked Dec 21 '25 23:12

akshaydashrath


1 Answers

This turned out to be an issue with akshaydashrath's $PATH having an extra leading // in the path to FLUTTER_SDK/bin directory. Unclear yet if it's a Dart bug or Flutter bug or both, the fix is being tracked by https://github.com/flutter/flutter/issues/7279.

If anyone were to hit this again, the resolution is to check your PATH and make sure it doesn't have an extra leading / in your //path/to/flutter/bin.

like image 176
Eric Seidel Avatar answered Dec 24 '25 22:12

Eric Seidel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!