hey24sheep / azure-flutter-tasks

Easily build and deploy with latest Flutter build tasks for Azure DevOps Pipelines Tasks
https://marketplace.visualstudio.com/items?itemName=Hey24sheep.flutter
MIT License
89 stars 22 forks source link

Error with 0.4.0 FlutterInstall Task on macos-14 #126

Closed tghamm closed 2 months ago

tghamm commented 2 months ago

Same build worked yesterday, it looks like an update to the task is causing a failure during the flutter install step on macos-14 in Azure DevOps:

Starting: FlutterInstall
==============================================================================
Task         : Flutter Install Task
Description  : Install the Flutter environment.
Version      : 0.4.0
Author       : Hey24sheep
Help         : For more information, take a look at the Flutter [documentation](https://flutter.io/)
==============================================================================
##[error]The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell.
Finishing: FlutterInstall
hey24sheep commented 2 months ago

https://github.com/hey24sheep/azure-flutter-tasks/issues/124

Created in latest release, let me push another update and see if it fixes it

hey24sheep commented 2 months ago

Released new version 0.4.1. Can you validate once, thanks

tghamm commented 2 months ago

Different error now:

##[error]StatusCodeError: 404 - "<?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Details>No such object: flutter_infra_release/releases/releases_undefined.json</Details></Error>"
hey24sheep commented 2 months ago

I see, the issue is with os.platform() in "install task"

tghamm commented 2 months ago

Appreciate you jumping on this so quickly :)

hey24sheep commented 2 months ago

They changed something internally. I am pushing a check first to find the platform. You will need to give me the initial log saying [INFO] Found architecture xxxxxx. Then only I will be able to push another version which will fix it.

hey24sheep commented 2 months ago

New version 0.4.2 will be available in about 6-7 minutes, please re-run after that and give me the arch type name there. I will then push a fix after that

eljorgit commented 2 months ago

Hi @hey24sheep this also happens to me in Ubuntu Server 22.04.3 LTS

hey24sheep commented 2 months ago

@eljorgit so the code that is failing is this

function findArchitecture() {
    if (os.platform() === 'darwin')
        return "macos";
    else if (os.platform() === 'linux')
        return "linux";
    return "windows";
}

Which gives "arch" type for the url https://storage.googleapis.com/flutter_infra_release/releases/releases_${arch}.json The error shows "undefined" as the URL

hey24sheep commented 2 months ago

So paste your VM platform names here. I will check. Azure has messed it up. I have just updated the Node to 20 to fix #124

eljorgit commented 2 months ago

You mean this? (run hostnamectl)

Static hostname: xxxxxx
       Icon name: computer-container
         Chassis: container
      Machine ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
         Boot ID: xxxxxxxxxxxxxxxxxxxxxxxxxx
  Virtualization: lxc
Operating System: Ubuntu 22.04.3 LTS              
          Kernel: Linux 6.2.16-3-pve
    Architecture: x86-64
eljorgit commented 2 months ago

On the pipeline task I get this:

Starting: FlutterInstall
==============================================================================
Task         : Flutter Install Task
Description  : Install the Flutter environment.
Version      : 0.4.2
Author       : Hey24sheep
Help         : For more information, take a look at the Flutter [documentation](https://flutter.io/)
==============================================================================
[INFO] Found architecture  linux
##[error]StatusCodeError: 404 - "<?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Details>No such object: flutter_infra_release/releases/releases_undefined.json</Details></Error>"
Finishing: FlutterInstall

I think there is an extra white space just before linux, dont know if could be this

hey24sheep commented 2 months ago

@eljorgit @tghamm Please check, it should be working now. New version 0.4.3

eljorgit commented 2 months ago

It is working for me, thanks for this very quick fix ❤️

hey24sheep commented 2 months ago

@eljorgit Great, thanks for confirming

tghamm commented 2 months ago

Running now on a mac agent, will report shortly :)

tghamm commented 2 months ago

@hey24sheep everything seems to be working now! Thanks for the quick fix!

hey24sheep commented 2 months ago

Nice, thanks for confirming