Skip to content
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

Error destination path already exists and is not an empty directory when running step 'flutter pub get' #277

Closed
trietfidelia opened this issue Mar 2, 2024 · 3 comments · Fixed by #280

Comments

@trietfidelia
Copy link

Currently I am setting up github action for my flutter project.
My workflows ran successfully several times until today the error below appeared. I have tried many ways to delete data in the ~/pub-cache/ folder but still get bellow error. Does anyone have any solution for this problem? Thank you very much

Error:

Git error. Command: `git clone --mirror https://github.com/******/my-app.git /c/Users/runneradmin/.pub-cache\git\cache\my-app-f653a1ef882151d633962cffcc7c2526653f0bbe`
stdout: 
stderr: fatal: destination path '/c/Users/runneradmin/.pub-cache\git\cache\my-app-f653a1ef882151d633962cffcc7c2526653f0bbe' already exists and is not an empty directory.
exit code: 128
Error: Process completed with exit code 69.

Code workflow:

- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
 with:
   flutter-version: "3.19.0"
   channel: 'stable'
   cache: true 
   cache-key: 'flutter-windows-stable-3.19.0-x64-df832a426eb5e0e80d12333cd7ee7419ab58ff49'
   cache-path: '${{ runner.tool_cache }}/flutter/stable-3.19.0-x64'
   architecture: x64

- name: Setup credentials to access private repositories
 run: git config --global url.https://${{ secrets.ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/

- name: Clean cache
 run: dart pub cache clean --force

- name: Clean and get Flutter packages
 run: flutter clean && flutter pub get
@Zensonaton
Copy link

Zensonaton commented Mar 2, 2024

Same issue here. This problem does not occur on Ubuntu machine, but on Windows it does.

It feels like latest release of flutter-action broke it somehow.

UPD: Yeah, v2.13.0 of flutter-action is broken. Specifying v2.12.0 fixes the issue:

- name: Set up Flutter
  uses: subosito/[email protected]
  with:
    channel: "stable"
    cache: true

@trietfidelia
Copy link
Author

Same issue here. This problem does not occur on Ubuntu machine, but on Windows it does.

It feels like latest release of flutter-action broke it somehow.

UPD: Yeah, v2.13.0 of flutter-action is broken. Specifying v2.12.0 fixes the issue:

- name: Set up Flutter
  uses: subosito/[email protected]
  with:
    channel: "stable"
    cache: true

@Zensonaton
Wow, I didn't notice this, I was just looking at the their latest commit. It's true that when I downgraded the version, everything worked like before, thank you very much.
Hope they will handle this issue soon

@iampopal
Copy link

iampopal commented Mar 2, 2024

Same issue here. This problem does not occur on Ubuntu machine, but on Windows it does.

It feels like latest release of flutter-action broke it somehow.

UPD: Yeah, v2.13.0 of flutter-action is broken. Specifying v2.12.0 fixes the issue:

- name: Set up Flutter
  uses: subosito/[email protected]
  with:
    channel: "stable"
    cache: true

True Life saver. been searching for a solution all day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants