Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to determine Flutter version for channel: stable version: any architecture: x64 #188

Closed
simc opened this issue Sep 18, 2022 · 7 comments

Comments

@simc
Copy link

simc commented Sep 18, 2022

I get this issue a lot recently. Rerunning the CI often fixes it. I did not change the workflow recently.

Issue

@pjung-bosch
Copy link

pjung-bosch commented Sep 29, 2022

Had a similar problem lately. Most likely, flutter-action isn't able to get the list of flutter releases. The error is not reported because curl is called with the --silent option.
In order to debug this, I suggest you add a step in your workflow before the flutter action which downloads that file. If it fails you may be able to see what exactly causes the problem in your case (for me it was an ssl issue)

steps:
    - name: Test connection
      run: curl "https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json"

@ddikman
Copy link

ddikman commented Nov 25, 2022

I got around this by addressing the flutter doctor warning about the tmp folder for the SDK being unsafe. Before running the subosito/flutter-action@v2 action I added the following:

- name: Fix flutter SDK folder permission
   run: git config --global --add safe.directory /tmp/flutter/--

@followthemoney1
Copy link

followthemoney1 commented Nov 28, 2022

+1 The same error here

image

@x-yurii-uvarov
Copy link

x-yurii-uvarov commented Dec 8, 2022

The problem is here.

If the runner is a MacOS, $RUNNER_OS returns darwin instead of macos, and the following return error:
curl "https://storage.googleapis.com/flutter_infra_release/releases/releases_darwin.json":

<?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_darwin.json</Details></Error>

It should be: https://storage.googleapis.com/flutter_infra_release/releases/releases_macos.json then it returns the correct list.

@subosito
Copy link
Owner

subosito commented Dec 8, 2022

@x-yurii-uvarov is it returns darwin? according to the https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables it will returns macOS.

RUNNER_OS The operating system of the runner executing the job. Possible values are Linux, Windows, or macOS. For example, Windows

@kuhnroyal
Copy link
Contributor

It should return macOS on official runners and on private runners you can set it to return the same.

@Lock128
Copy link

Lock128 commented Dec 13, 2022

I'm facing a similar issue when using this Github action within Amazon CodeCatalyst

2022-12-13T19:55:51.2943031Z env:
2022-12-13T19:55:51.2943073Z   AWS_REGION: us-west-2
2022-12-13T19:55:51.2943094Z   FLUTTER_ROOT: /codeaws/output/src2356/src/s3/05/_layout/_work/_temp/flutter/--
2022-12-13T19:55:51.2943115Z   PUB_CACHE: /codeaws/output/src2356/src/s3/05/_layout/_work/_temp/flutter/--/.pub-cache
2022-12-13T19:55:51.3087868Z fatal: detected dubious ownership in repository at '/codeaws/output/src2356/src/s3/05/_layout/_work/_temp/flutter/--'
2022-12-13T19:55:51.3088522Z To add an exception for this directory, call:
2022-12-13T19:55:51.3088810Z
2022-12-13T19:55:51.3088881Z 	git config --global --add safe.directory /codeaws/output/src2356/src/s3/05/_layout/_work/_temp/flutter/--
2022-12-13T19:55:51.9631995Z Failed to find the latest git commit date: VersionCheckError: Command exited with code 128: git -c log.showSignature=false log HEAD -n 1 --pretty=format:%ad --date=iso
2022-12-13T19:55:51.9632479Z Standard out:
2022-12-13T19:55:51.9633781Z Standard error: fatal: detected dubious ownership in repository at '/codeaws/output/src2356/src/s3/05/_layout/_work/_temp/flutter/--'
2022-12-13T19:55:51.9634441Z To add an exception for this directory, call:
2022-12-13T19:55:51.9634674Z
2022-12-13T19:55:51.9635024Z 	git config --global --add safe.directory /codeaws/output/src2356/src/s3/05/_layout/_work/_temp/flutter/--
2022-12-13T19:55:51.9635239Z
2022-12-13T19:55:51.9635521Z Returning 1970-01-01 00:00:00.000 instead.
2022-12-13T19:55:52.0255284Z [!] Flutter (Channel unknown, 0.0.0-unknown, on Amazon Linux 2 4.14.294-220.533.amzn2.x86_64, locale en_US)
2022-12-13T19:55:52.0262282Z     ! Flutter version 0.0.0-unknown on channel unknown at /codeaws/output/src2356/src/s3/05/_layout/_work/_temp/flutter/--
2022-12-13T19:55:52.0263711Z     ! Upstream repository unknown
2022-12-13T19:55:52.0272038Z     • Framework revision  (), 1970-01-01 00:00:00.000
2022-12-13T19:55:52.0273025Z     • Engine revision 8f2221fbef
2022-12-13T19:55:52.0273982Z     • Dart version 2.18.5
2022-12-13T19:55:52.0274896Z     • DevTools version 2.15.0
2022-12-13T19:55:52.0275490Z
2022-12-13T19:55:52.0291951Z [✗] Android toolchain - develop for Android devices
2022-12-13T19:55:52.0295949Z     ✗ Unable to locate Android SDK.
2022-12-13T19:55:52.0296547Z       Install Android Studio from: https://developer.android.com/studio/index.html
2022-12-13T19:55:52.0297317Z       On first launch it will assist you in installing the Android SDK components.
2022-12-13T19:55:52.0298010Z       (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
2022-12-13T19:55:52.0298636Z       If the Android SDK has been installed to a custom location, please use
2022-12-13T19:55:52.0299272Z       `flutter config --android-sdk` to update to that location.
2022-12-13T19:55:52.0299716Z
2022-12-13T19:55:52.0300192Z
2022-12-13T19:55:52.0327126Z [✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
2022-12-13T19:55:52.0327643Z     ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
2022-12-13T19:55:52.0328100Z
2022-12-13T19:55:52.1012254Z [✗] Linux toolchain - develop for Linux desktop
2022-12-13T19:55:52.1013391Z     ✗ clang++ is required for Linux development.
2022-12-13T19:55:52.1014431Z       It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from https://releases.llvm.org/
2022-12-13T19:55:52.1015669Z     ✗ CMake is required for Linux development.
2022-12-13T19:55:52.1016614Z       It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
2022-12-13T19:55:52.1017618Z     ✗ ninja is required for Linux development.
2022-12-13T19:55:52.1018413Z       It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from https://github.com/ninja-build/ninja/releases
2022-12-13T19:55:52.1019533Z     • pkg-config version 0.27.1
2022-12-13T19:55:52.1020516Z     ✗ pkg-config 0.29.0 or later is required.
2022-12-13T19:55:52.1021627Z     ✗ GTK 3.0 development libraries are required for Linux development.
2022-12-13T19:55:52.1022362Z       They are likely available from your distribution (e.g.: apt install libgtk-3-dev)
2022-12-13T19:55:52.1022839Z
2022-12-13T19:55:52.1028477Z [!] Android Studio (not installed)
2022-12-13T19:55:52.1029381Z     • Android Studio not found; download from https://developer.android.com/studio/index.html
2022-12-13T19:55:52.1030183Z       (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
2022-12-13T19:55:52.1030678Z
2022-12-13T19:55:52.1032909Z [✓] Connected device (1 available)
2022-12-13T19:55:52.1034090Z     • Linux (desktop) • linux • linux-x64 • Amazon Linux 2 4.14.294-220.533.amzn2.x86_64
2022-12-13T19:55:52.1034517Z
2022-12-13T19:55:55.2303519Z [✓] HTTP Host Availability
2022-12-13T19:55:55.2304500Z     • All required HTTP hosts are available
2022-12-13T19:55:55.2304928Z
2022-12-13T19:55:55.2305900Z ! Doctor found issues in 5 categories.```

I am using
```        - name: Flutter Build Web
          uses: subosito/flutter-action@v2.8.0
          with:
            flutter-version: '3.3.9'
            channel: 'stable'
        - run: flutter --version
        - run: flutter doctor -v```

Anyone got an idea on what could be the root cause?

Repository owner locked and limited conversation to collaborators Dec 16, 2022
@subosito subosito converted this issue into discussion #197 Dec 16, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants