Search Unity

Support Git LFS.

Discussion in 'Unity Build Automation' started by techmage, Dec 30, 2015.

  1. David-VoxelAgent

    David-VoxelAgent

    Joined:
    Jan 17, 2017
    Posts:
    1
    We are also getting the smudge filter lfs failed error when using unity cloud. We moved from a non lfs repo to a lfs one, so maybe that has something to do with it?

    Running Prebuild steps
    In quiet period, build will start momentarily...
    Agent pid 1219
    All identities removed.
    Removing bvr
    Successfully uninstalled bvr-1.2.12
    done.
    bvr 1.6.2
    bvr-api 0.3.3
    prebuildstatus finished successfully.
    All identities removed.
    Cloning the remote Git repository
    Cloning repository -----------removed--------------
    Fetching upstream changes from -----------removed--------------
    Fetching upstream changes from -----------removed--------------
    Checking out Revision -----------removed-------------- (-----------removed--------------)
    FATAL: Could not checkout -----------removed--------------
    at sun.reflect.GeneratedMethodAccessor244.invoke(Unknown Source)
    stdout:
    stderr: Downloading -----------removed-------------- (3.28 MB)
    Downloading -----------removed-------------- (18.35 MB)
    Error downloading object: -----------removed-------------- (-----------removed--------------)
    Errors logged to -----------removed--------------
    fatal: -----------removed--------------: smudge filter lfs failed
    git-lfs/1.4.1 (GitHub; darwin amd64; go 1.7; git 2070e4c)
    git version 2.6.6
    Error downloading object: -----------removed--------------
    Smudge error: Error buffering media file: LFS: Repository or object not found: -----------removed--------------
    Check that it exists and that you have proper access to it:
    Build step 'Execute shell' marked build as failure
    postbuildstatus finished successfully.
    Finished: FAILURE
     
  2. jice_nolaroads

    jice_nolaroads

    Joined:
    Oct 2, 2016
    Posts:
    21
    i have exactly some issue since some days.
    please, what can i do ?
    i retried multiple times, but issue remain.
     
  3. Shaun-Peoples

    Shaun-Peoples

    Joined:
    Feb 26, 2013
    Posts:
    24
    PM'd with similar issues.
     
  4. loafer

    loafer

    Joined:
    May 23, 2013
    Posts:
    3
    +1 on Error downloading object" with LFS
     
  5. pfleetwood22

    pfleetwood22

    Joined:
    Jun 6, 2016
    Posts:
    28
    I PM'd SophiaC with Unity, and she changed our project to use an improved LFS pull. It worked much better after that.
     
  6. jice_nolaroads

    jice_nolaroads

    Joined:
    Oct 2, 2016
    Posts:
    21
    yes, same thing more recently.
    thanks :)
     
  7. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    187
    Hey! We have a problem also. For testing purposes we added new file (png tex) to LFS (before that whole project was just in nornal Git repo), since then we are getting an error in Cloud Build that file cannot be read.
     
  8. Don_K

    Don_K

    Joined:
    May 31, 2016
    Posts:
    8
    I am falling into a similar situation.
    I noticed that the beginning of the log changed like this.

    ▼ 6Days Ago SUCSESS
    4: All identities removed.
    5: Removing bvr
    6: Successfully uninstalled bvr-1.2.12

    ▼ Yesterday FAILED
    4: All identities removed.
    5: Removing bvr
    6: Successfully uninstalled bvr-1.5.21

    ▼ 6Days Ago SUCSESS
    20: Calculated Workspace Size: 225.83 MiB
    21: PATH | SIZE
    22: /Assets | 224.28 MiB
    23: /Evacuation | 1.52 MiB
    24: /ProjectSettings | 41.10 kiB

    ▼ Yesterday FAILED
    20: Calculated Workspace Size: 34.66 MiB
    21: PATH | SIZE
    22: /Assets | 33.11 MiB
    23: /Evacuation | 1.52 MiB
    24: /ProjectSettings | 41.11 kiB

    31101: Build step 'Execute shell' marked build as failure
    31102: postbuildstatus finished successfully.
    31103: Finished: FAILURE

    After a clean build, it seems that files managed by LFS can no longer be downloaded.
    Is something working on this subject?
     
  9. SophiaC

    SophiaC

    Joined:
    Sep 6, 2016
    Posts:
    238
  10. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    187
  11. MiraiTunga

    MiraiTunga

    Joined:
    Nov 25, 2012
    Posts:
    8
    @SophiaC are they any know issues with LFS bit-bucket and unity cloud build ? my lfs dont seem to be getting pulled through , any idea what could be causing this ?

    Getting this error in cloud build for all textures and other LFS files

    [Unity] Could not create texture from Assets/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectGrain.png: File could not be read

    Thanks
     
  12. TimHeijden

    TimHeijden

    Joined:
    Mar 5, 2015
    Posts:
    34
    I'm having the same issue!

    update: upon a closer look in my case, the LFS files aren't acutally retrieved... here is a snippet of the log:


    219: [03:42:45] [ INFO] Resolving deltas: 80% (29/36)
    220: [03:42:45] [ INFO] Resolving deltas: 83% (30/36)
    221: [03:42:45] [ INFO] Resolving deltas: 86% (31/36)
    222: [03:42:45] [ INFO] Resolving deltas: 88% (32/36)
    223: [03:42:45] [ INFO] Resolving deltas: 91% (33/36)
    224: [03:42:45] [ INFO] Resolving deltas: 100% (36/36)
    225: [03:42:45] [ INFO] Resolving deltas: 100% (36/36), done.
    226: [03:42:45] [ INFO]
    227: [03:42:47] [ INFO] Git LFS: (0 of 5 files) 0 B / 4.31 MB
    228: [03:42:47] [ INFO] Git LFS: (0 of 5 files) 0 B / 4.31 MB
    229: [03:42:47] [ INFO]
    230: batch response: Post <MY URL>.git/info/lfs/objects/batch: x509: certificate signed by unknown authority
    231: [03:42:47] [ INFO]
    232: Cloned in 4 seconds.
    233: GIT: Checkout operation complete.



    The reason is rather obvious, the certificate on my server isn't being used correctly and it also happens locally. (where I had disabled it) In other words, I have to fix my server first ^^

    I doubt that you have the same issue but who knows :)
     
    Last edited: Jul 1, 2017
  13. k76

    k76

    Joined:
    Oct 12, 2014
    Posts:
    12
  14. sam_ettinger_sm

    sam_ettinger_sm

    Joined:
    Dec 1, 2016
    Posts:
    19
    I just ran into this same issue quite recently! Here's how I got LFS pulling working:
    1. Before anything else, I had to learn that there's a difference between a deploy SSH key (the "read-only access key" in your build log) and a user authorization SSH key. If you use a deploy SSH key to grant Unity Cloud Build access to your repo, it won't pull LFS files. You'll have to generate a new SSH key and use it to authorize a new user.
    2. Create a new Bitbucket user with read-only access to all your repos for Unity Cloud Build. This new Bitbucket account is your machine user. Unity Cloud Build will log in as this machine user and check out your repos that way. (In theory you can let Unity Cloud Build log in as your own account, but that creates all sorts of security compromises)
    3. Refresh your Unity Organization SSH key. The only way to do this is through the Unity Cloud Build API. If you've never used the API before, sorry. And good luck. Remember, this step invalidates your old SSH key, so until your Machine User is up and running, none of your Unity Cloud Build projects will be able to check out code.
    4. While logged in as your Machine User in Bitbucket, go to "User Settings > Security > SSH Keys" and add your new SSH key here. Do not use your new SSH key as a deploy key.
    I think that's all it takes. Next time you start a Cloud Build, the server will use the SSH key to log in as your machine user, check out the latest commit from your repo (LFS files and all!), and build as normal.
     
    coeing, MechEthan and Gwom like this.
  15. developersice

    developersice

    Joined:
    Nov 25, 2016
    Posts:
    36
    This is seriously hampering our cloud build operations also, as builds that were working before suddenly aren't.. such a pain!
     
  16. k76

    k76

    Joined:
    Oct 12, 2014
    Posts:
    12
    Thanks for the tips! I'll probably give this a shot in the next week or two and report my findings.
     
  17. Frinx

    Frinx

    Joined:
    Nov 12, 2012
    Posts:
    2
    How do I connect Unity Cloud Build to a Bitbucket repository using LFS?

    Access and Cloning works, but LFS files are not checked out before the build.
    The build log shows:

    The linked documentation page by atlassian excplicitly states :

    But Unity Cloud build is set up to access the repo with an access key and I don't see an alternative.
    [edit] Or even a way to change this after the fact?

    [2nd edit]
    Ok now I understood the proposed workaround from 3 posts earlier. But unless I want (or even can) add a dummy User to bitbucket for this access I'm stranded...
    That is, until bitbucket get's it together and supports LFS checkout with ssh keys or until Unity Cloud Build can access bitbucket with an App Password.
     
    Last edited: Aug 21, 2017
  18. sam_ettinger_sm

    sam_ettinger_sm

    Joined:
    Dec 1, 2016
    Posts:
    19
    I just answered that three posts up :p Look at post #64 in this thread.
     
  19. aviita

    aviita

    Joined:
    Jun 26, 2017
    Posts:
    4
    Still no workaround to get Visual Studio Online LFS and Unity Cloud Build to work together?