Just Jason
Just Jason

Reputation: 328

I am not able to use flutter as im getting an error with the dart sdk, only it has been working for weeks until today

I am currently having this issue and can't find any solutions that work. Yesterday It was running fine and this afternoon when I wanted to code I received this message in the terminal.

flutter run... Downloading Dart SDK from Flutter engine <<<<<<< HEAD 07c1eed46b9d9b58df78566e9b8b2e42e80d3380 92ae191c17a53144bf4d62f3863c110be08e3fd3

8f89f6505b941329a864fef1527243a72800bf4d... curl: (3) URL using bad/illegal format or missing URL

Failed to retrieve the Dart SDK from: https://storage.googleapis.com/flutter_infra/flutter/<<<<<<< HEAD 07c1eed46b9d9b58df78566e9b8b2e42e80d3380 92ae191c17a53144bf4d62f3863c110be08e3fd3

8f89f6505b941329a864fef1527243a72800bf4d/dart-sdk-linux-x64.zip If you're located in China, please see this page: https://flutter.dev/community/china

I am not using a VPN, am not from china, and as I said this was running yesterday. I have tried reinstalling the flutter package, tried redirecting to redoing the path in Linux, also tried to just clone the github/flutter repo but nothing. Please help

Upvotes: 7

Views: 2845

Answers (4)

Vaios Christodoulou
Vaios Christodoulou

Reputation: 33

I had the same issue, tried everything I found on the internet but nothing worked... Finally, went to the folder where my flutter installation was, deleted the flutter folder, downloaded the flutter sdk again and named the unzipped folder exactly as the previous one: flutter.

This worked for me, so if all else fails, you can try this one.

Upvotes: 3

Replace the /flutter/bin/internal/engine.version with the one from this https://github.com/flutter/flutter/blob/master/bin/internal/engine.version and then run

flutter doctor

enter image description here

Upvotes: 6

Ben Winding
Ben Winding

Reputation: 11787

I was getting that error too. Fixed by fixing the line-endings using the dos2unix utility:

Install dos2unix with sudo apt install dos2unix

Then run this in terminal:

dos2unix ~/snap/flutter/common/flutter/bin/internal/engine.version

Upvotes: 3

Just Jason
Just Jason

Reputation: 328

Found that there was an issue with a file in flutter/bin/internal called engine.version that had the same text as the "head" issue as mentioned in the error code. I have replaced the file with the one from the flutter GitHub repo and the error has gone. will close the issue.

Upvotes: 9

Related Questions