Flutter Github action fails to get Flutter version due to problem with git module

1

Hey

this is a follow up to this questions in regards to this flutter github action.

I was able to get the action to start but unfortunately I have problems when trying to execute the action itself - also "flutter doctor -v" already shows some problems:

2022-12-13T19:15:23.9710291Z flutter doctor -v
2022-12-13T19:15:23.9725521Z env:
2022-12-13T19:15:23.9725758Z   AWS_REGION: us-west-2
2022-12-13T19:15:23.9725785Z   FLUTTER_ROOT: /codeaws/output/src2962/src/s3/05/_layout/_work/_temp/flutter/--
2022-12-13T19:15:23.9725829Z   PUB_CACHE: /codeaws/output/src2962/src/s3/05/_layout/_work/_temp/flutter/--/.pub-cache
2022-12-13T19:15:23.9866833Z fatal: detected dubious ownership in repository at '/codeaws/output/src2962/src/s3/05/_layout/_work/_temp/flutter/--'
2022-12-13T19:15:23.9867401Z To add an exception for this directory, call:
2022-12-13T19:15:23.9867629Z
2022-12-13T19:15:23.9867746Z 	git config --global --add safe.directory /codeaws/output/src2962/src/s3/05/_layout/_work/_temp/flutter/--
2022-12-13T19:15:24.6222666Z 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:15:24.6223375Z Standard out:
2022-12-13T19:15:24.6223600Z Standard error: fatal: detected dubious ownership in repository at '/codeaws/output/src2962/src/s3/05/_layout/_work/_temp/flutter/--'
2022-12-13T19:15:24.6223925Z To add an exception for this directory, call:
2022-12-13T19:15:24.6223950Z
2022-12-13T19:15:24.6225927Z 	git config --global --add safe.directory /codeaws/output/src2962/src/s3/05/_layout/_work/_temp/flutter/--
2022-12-13T19:15:24.6226125Z
2022-12-13T19:15:24.6234942Z Returning 1970-01-01 00:00:00.000 instead.
2022-12-13T19:15:24.6853166Z [!] 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:15:24.6860063Z     ! Flutter version 0.0.0-unknown on channel unknown at /codeaws/output/src2962/src/s3/05/_layout/_work/_temp/flutter/--
2022-12-13T19:15:24.6861636Z     ! Upstream repository unknown
2022-12-13T19:15:24.6870761Z     • Framework revision  (), 1970-01-01 00:00:00.000
2022-12-13T19:15:24.6871789Z     • Engine revision 8f2221fbef
2022-12-13T19:15:24.6872793Z     • Dart version 2.18.5
2022-12-13T19:15:24.6873838Z     • DevTools version 2.15.0
2022-12-13T19:15:24.6881196Z
2022-12-13T19:15:24.6898511Z [✗] Android toolchain - develop for Android devices
2022-12-13T19:15:24.6902322Z     ✗ Unable to locate Android SDK.
2022-12-13T19:15:24.6903028Z       Install Android Studio from: https://developer.android.com/studio/index.html
2022-12-13T19:15:24.6903751Z       On first launch it will assist you in installing the Android SDK components.
2022-12-13T19:15:24.6904443Z       (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
2022-12-13T19:15:24.6905084Z       If the Android SDK has been installed to a custom location, please use
2022-12-13T19:15:24.6905725Z       `flutter config --android-sdk` to update to that location.
2022-12-13T19:15:24.6906232Z
2022-12-13T19:15:24.6906679Z
2022-12-13T19:15:24.6935664Z [✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
2022-12-13T19:15:24.6936228Z     ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
2022-12-13T19:15:24.6945638Z
2022-12-13T19:15:24.9954237Z [✗] Linux toolchain - develop for Linux desktop
2022-12-13T19:15:24.9957487Z     ✗ clang++ is required for Linux development.
2022-12-13T19:15:24.9960160Z       It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from https://releases.llvm.org/
2022-12-13T19:15:24.9962794Z     ✗ CMake is required for Linux development.
2022-12-13T19:15:24.9964979Z       It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
2022-12-13T19:15:24.9967433Z     ✗ ninja is required for Linux development.
2022-12-13T19:15:24.9969730Z       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:15:24.9972053Z     • pkg-config version 0.27.1
2022-12-13T19:15:24.9974380Z     ✗ pkg-config 0.29.0 or later is required.
2022-12-13T19:15:24.9977005Z     ✗ GTK 3.0 development libraries are required for Linux development.
2022-12-13T19:15:24.9979171Z       They are likely available from your distribution (e.g.: apt install libgtk-3-dev)
2022-12-13T19:15:24.9981203Z
2022-12-13T19:15:24.9986727Z [!] Android Studio (not installed)
2022-12-13T19:15:24.9989611Z     • Android Studio not found; download from https://developer.android.com/studio/index.html
2022-12-13T19:15:24.9991805Z       (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
2022-12-13T19:15:24.9993670Z
2022-12-13T19:15:24.9997047Z [✓] Connected device (1 available)
2022-12-13T19:15:24.9999607Z     • Linux (desktop) • linux • linux-x64 • Amazon Linux 2 4.14.294-220.533.amzn2.x86_64
2022-12-13T19:15:25.0001489Z
2022-12-13T19:15:26.5702082Z [✓] HTTP Host Availability
2022-12-13T19:15:26.5705018Z     • All required HTTP hosts are available
2022-12-13T19:15:26.5707412Z
2022-12-13T19:15:26.5708789Z ! Doctor found issues in 5 categories.

The biggest problem here is Failed to find the latest git commit date: VersionCheckError: Command exited with code 128 which actually then results in inresolvable dependencies during "flutter pub get".

Anyone got an idea on how to workaround this problem?

Regards Johannes

  • I tried the workaround in this github issues but that does not resolve the problem as the tmp directory changes with each of the executions of the workflow :-(

profile picture
gefragt vor einem Jahr816 Aufrufe
1 Antwort
3
Akzeptierte Antwort

I don't know much about the GitHub Flutter action, but I was able to reproduce the error. Adding the following command in the GH actions runner seemed to have fixed the git error. Can you give this a try?

- run: git config --global --add safe.directory '*'
profile pictureAWS
EXPERTE
Ranjith
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen