vsts-flutter-tasks
vsts-flutter-tasks copied to clipboard
Flutter Install Failed on Ubuntu
On ubuntu-latest agent, I got this error when executing Flutter Install.
Starting: FlutterInstall
==============================================================================
Task : Flutter Install
Description : Install the Flutter environment.
Version : 0.2.35
Author : Aloïs Deniel
Help : For more information, take a look at the Flutter [documentation](https://flutter.io)
==============================================================================
Downloading: https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_1.17.1-stable.tar.xz
Extracting archive
/usr/bin/unzip /home/vsts/work/_temp/e606a105-28f8-4b64-9a04-8421883bf27c
Archive: /home/vsts/work/_temp/e606a105-28f8-4b64-9a04-8421883bf27c
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /home/vsts/work/_temp/e606a105-28f8-4b64-9a04-8421883bf27c or
/home/vsts/work/_temp/e606a105-28f8-4b64-9a04-8421883bf27c.zip, and cannot find /home/vsts/work/_temp/e606a105-28f8-4b64-9a04-8421883bf27c.ZIP, period.
##[error]Error: The process '/usr/bin/unzip' failed with exit code 9
Finishing: FlutterInstall
It runs normally on macos-latest. Not sure whether the linux package itself is broken or what, but I thought I should ask here first.
same issue here
Same issue :(
Is there any workaround for this? Using different ubuntu version or flutter version?
@aloisdeniel I think I found the problem.
Flutter uses ZIP files for Mac and Windows releases and Tar files for linux.
This has to be changed to use tool.extractTar() for Linux builds.
This will enable the extension to be used on Linux build runners.
So I opened pull request #57 that should fix the issue. I did not test it though.
Fixed it on mine I do not have a linux pipeline. You could test and let me know. Credit to @Max-Might
Thanks, @hey24sheep . Unfortunately, for some strange reason, my pipeline keep using version 0.2.34 even though I have installed latest (0.2.35) and it still failed.
However, looking at your code, seems like you still use the zip path. Maybe you should refer to flutter json like the one used in alois' fix of path issue back then ( http://storage.googleapis.com/flutter_infra/releases/releases_$(arch).json )
By the way, I couldn't find issue tab on your repo, so do we just report yours here as well? It'd be better if you could become a maintainer here too so we don't have multiple extension.
@Vayth You couldn't update your pipeline maybe b'cuz you are using Alois's extension.
Flutter json have the same zip path. Alois does that same path too. I don't think it is the reason of failing. PS: I have updated my code, PRs are welcomed. Test and let me know :)
By the way, I couldn't find issue tab on your repo, so do we just report yours here as well? It'd be better if you could become a maintainer here too so we don't have multiple extension.
I have my own extension, there are a few reasons. Alois is busy, and I have seen issues pending for months here. Also, We use this extension in our builds and my boss said to have our own for future sake. So, best way to keep our builds successful is to have our own extension which if even fails we can fix asap. Also, I do not want to throw my updates on existing users and break their builds.
I have intentionally forked this repo to keep credits to people and transparency. I know there is no issue page but PRs are always welcome :) and I don't think I can be a maintainer here, because I opened an issue here months ago and I said the same thing. But, it was stale and then closed by owner after I created mine. Like your own issue is May 14 and its been a month. In production environment it's difficult to depend on 3rd party. I hope you understand my view.
No, I was using your fork in my test org and verified it to be 0.2.35, yet the one in pipeline run log showed 0.2.34. I think pipeline need some time to adjust the version. Now it's correctly state 0.2.35.
However, I still have problem extracting it.
Starting: FlutterInstall
==============================================================================
Task : Flutter Install Task
Description : Install the Flutter environment.
Version : 0.2.35
Author : Hey24sheep
Help : For more information, take a look at the Flutter [documentation](https://flutter.io)
==============================================================================
(node:3656) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:3656) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:3656) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:3656) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:3656) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:3656) Warning: Use Cipheriv for counter mode of aes-256-ctr
Downloading: https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_1.17.3-stable.tar.xz
Extracting archive
/bin/tar xzC /home/vsts/work/_temp/25177519-c871-42ee-9a0b-bb68d8475311 -f /home/vsts/work/_temp/1c6e50c0-2e07-43ca-b748-8f7a3de5f6bd
gzip: stdin: not in gzip format
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now
##[error]Error: /bin/tar failed with return code: 2
Finishing: FlutterInstall
I believe it should use tar -xf instead of tar -xzf like in the log.
@Vayth I don't think we can change those args, there is no option. Here is the code for extractZip
@Vayth I have updated my extension, let me know if it works now. I have changed extract to 7z as per wiki it supports .xz and tar. So, it should work now.
From the extract7z() implementation:
if (process.platform != 'win32') {
throw new Error('extract7z() not supported on current OS');
}
So this will work only on windows hosts, unfortunately (if it works, I can't test it).
@hey24sheep @Vayth OK, it looks like someone just removed the z flag from the tool lib function so extractTar() should work now with the tar.xz file.
Hi, @Max-Might I see. But, they haven't released the update on npm yet
@hey24sheep We have now released the lib.
@stephenmichaelf Yayy, Thanks 👍
@Vayth Try now its fixed pushed.
Alright, it's installed and built successfully. Thanks a lot, @hey24sheep , @Max-Might , @stephenmichaelf !
Now I wonder if this issue should be closed or not, since alois' version here is not fixed yet. I think we should close this once the fix got merged.
@Vayth Yep, I updated my PR to use the new version of the azure pipelines tool lib. Now it is up to @aloisdeniel to review it when he has some spare time. Thanks for testing the changes.
Thanks everyone
On Fri, Jun 19, 2020, 4:28 PM Костадин Дамянов [email protected] wrote:
@Vayth https://github.com/Vayth Yep, I updated my PR to use the new version of the azure pipelines tool lib. Now it is up to @aloisdeniel https://github.com/aloisdeniel to review it when he has some spare time. Thanks for testing the changes.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aloisdeniel/vsts-flutter-tasks/issues/56#issuecomment-646573325, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHQCT5SUCA5HKLJNSKNP2MLRXNAEJANCNFSM4NAVGEFA .
This appears to still be occurring. Encountered while trying to install the latest dev version.
Error:
unzip: cannot find zipfile directory in one of /home/vsts/work/_temp/02249d3f-cd47-4be0-a418-7064fbfe6e92 or
/home/vsts/work/_temp/02249d3f-cd47-4be0-a418-7064fbfe6e92.zip, and cannot find /home/vsts/work/_temp/02249d3f-cd47-4be0-a418-7064fbfe6e92.ZIP, period
@Nash0x7E2 There is a pending PR #57 that fixes the issue. We need @aloisdeniel (or someone else who has the permission) to merge it and upload it to Azure.
@Nash0x7E2 you could use my ext for the time being if you want. I do not know when it will be fixed here. If the issue exists on my fork as well, let me know.
Thanks @hey24sheep! Is it possible to add support for master on your fork? Building for web is currently not supported on dev :/
@Nash0x7E2 I have master on my fork. There is no dev branch.
Building for web is currently not supported on dev :/
What do you mean by this?
If you are looking for extension here is the link
@hey24sheep I mean installing Flutter from the master channel and building Flutter web
But you could just download the extension on your azure account and it will work. @Nash0x7E2 and I already have master channel and it works. I don't understand what you want to do
Any update on the "official vsts task"? or I'm not understanding which version is the "official" between @hey24sheep 's and @aloisdeniel 's ?
@elpablete this one is original but not maintained repository. I have the fork which I maintain. I have been asked to make my fork into a separate repository but I have not done it because of different reasons it's been discussed on my fork issues section