Bug report: Issue building flutter on a mac

699 views Asked by At

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.

1

There are 1 answers

0
Eric Seidel On BEST ANSWER

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.