Flutter build fails if cache used and pub has custom git repository dependencies

flutter
#1

Description of the issue

When

  • using default cache pull and cache push steps
  • having dependencies that are stored in git repository instead of pub.dev package repository
    e.g. pubspec.yaml has:
  leancode_logging:
    git:
      url: git@bitbucket.name-team/corelibrary-flutter.git
      path: packages/logging
      ref: 838e54d

Build crashes with error:

Running "flutter pub get" in mobile...                          
Cannot open file, path = '/usr/local/flutter/.pub-cache/git/corelibrary-flutter-3c4e423ff318ca0411059e0db3bae806146cab8d/.git/pub-packages' (OS Error: No such file or directory, errno = 2)
---- Log transcript ----
FINE: Pub 2.4.0

When disabling cache the build succeeds.

Environment:

Sample build that crashed second time in a row:
28c34e317c3c93b5 - https://app.bitrise.io/build/28c34e317c3c93b5#?tab=log

Stack:
Visual Studio for Mac, stable

0 Likes

#2

Sorry for the delay here @dominik.roszkowski, we have created a task for the team to investigate this. Can you please enable Support Access on this app?

1 Like

#3

Thanks, support enabled for https://app.bitrise.io/app/c47126b04acd7b26#/settings

You need to add cache steps again, because I removed them after the described incident.

0 Likes

#4

The same problem can be seen here https://app.bitrise.io/build/7b78f40c91d2f8a5#?tab=log

1 Like

#5

Again similar situation here https://app.bitrise.io/build/399355aa59025c1a#?tab=log

0 Likes