Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice
Unity's version control component has been upgraded to Plastic SCM.

Error after downloading files from Collaborate

Discussion in 'Unity Collaborate' started by Gamrek, Oct 28, 2016.

  1. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    Hi

    I have a project that uses two plugins: EasyTouch 5 and Grids.

    I created the project in Windows and enable Collaborate then uploaded (Got the green click)

    I use my Mac and downloaded the project. But I got the following error. See attached screenshot

    Do you know what happens?

    Derek
     

    Attached Files:

  2. hasbeen

    hasbeen

    Joined:
    Jul 1, 2016
    Posts:
    2
    I am having the exact same issue, but only with a single c# script. The error happens consistently on 3 different pcs, I tried updating to 4.4.2f, which didnt fix the issue.

    When the file is downloaded from collab, Unity decides to clear the entire content of the file, resulting in these compiler errors.
    I tried downloading the file through the collab web interface, and the contents are there, so it can be copied into the project manually.
     
  3. hasbeen

    hasbeen

    Joined:
    Jul 1, 2016
    Posts:
    2
    I think I fixed it by converting line endings to unix (LF)
     
  4. KepleriansTeam

    KepleriansTeam

    Joined:
    Mar 14, 2014
    Posts:
    31
    Hi! It's finally fixed with that trick? I am having same issue last days (empty scripts and lost references). Thanks!
     
  5. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    @hasbeen That is wonderful to hear!! I'm going to try to repro more around mis-matched line endings and see if I can consistently reproduce. The editor does warn against mismatched line endings, but a warning shouldn't stop/lose work. If I can repro consistently, we should handle that MUCH better. Thank you so much for the info/update!!
     
  6. UDN_caa4f4d3-fecb-4373-bf79-3ea1f27242e7

    UDN_caa4f4d3-fecb-4373-bf79-3ea1f27242e7

    Joined:
    Oct 29, 2016
    Posts:
    3
    Hello! same issue here, but it seems that files are missing randomly, not only scripts, but files like sprites and textures are also broken. The solution with file endings seems to be working/

    UPD: No, It's not really working, but files that have UNIX line endings by themselfs are fine.
     
    Last edited: Oct 31, 2016
  7. KepleriansTeam

    KepleriansTeam

    Joined:
    Mar 14, 2014
    Posts:
    31
    We have changed the endings, but neither solves. We wait for some other more secure solution, since we are using collab in a serious project.

    We have been using Collab from 2-3 months ago without problems, and has begun to these problems just 3 days ago ... I do not know if that helps anything. A greeting.
     
  8. unity-tuesday

    unity-tuesday

    Unity Technologies

    Joined:
    Aug 2, 2016
    Posts:
    42
    Thanks for the information, @Etorki-Games. I received your ticket on my end, so I'll shoot you a note there.
     
  9. davetakahashi

    davetakahashi

    Joined:
    Sep 4, 2014
    Posts:
    2
    Hi all,

    We were able to track down this issue and fix it. To fix it on your project:
    1. In the Collab History window, use the "Go back to..." button to go back to some revision before you started receiving empty files.
    2. In the Collab Toolbar or Collab History window, use the Update button to go to the latest revision.
    3. Your files should be repaired now.
    Please let us know if this doesn't work for you. Thanks!

    P.S. Some details if you're interested: this was caused by an issue with our caching server where it ended up receiving an HTTP Content-Length header with a value of 0 and allowed files to be cached as 0 byte files. To fix it, we cleared all of those files out of the cache and deployed a code change to block it from happening again. Thank you for bringing the issue to our attention!
     
  10. dtakahas

    dtakahas

    Joined:
    Oct 22, 2015
    Posts:
    83
    Posted that message with my non-Unity account, but davetakahashi = me :D
     
  11. UDN_caa4f4d3-fecb-4373-bf79-3ea1f27242e7

    UDN_caa4f4d3-fecb-4373-bf79-3ea1f27242e7

    Joined:
    Oct 29, 2016
    Posts:
    3
    I got to 13 days ago, and still I am receiving empty files.
    a) Should I update to the latest version possible?
    b) Should my team download their files again after this action, and only after that my team will be able to work normally?
     
    Last edited: Nov 1, 2016
  12. fletcherhaynes

    fletcherhaynes

    Unity Technologies

    Joined:
    Mar 11, 2016
    Posts:
    6
  13. fletcherhaynes

    fletcherhaynes

    Unity Technologies

    Joined:
    Mar 11, 2016
    Posts:
    6
    Actually, I got it from your ticket. Taking a look through our logs, I'll post again in a bit.
     
  14. fletcherhaynes

    fletcherhaynes

    Unity Technologies

    Joined:
    Mar 11, 2016
    Posts:
    6
    I don't see any evidence of you encountering this issue, and you don't have any zero-byte files stored with us. I suspect there's something on the client side that needs to be cleaned up, but that's a bit outside my area of expertise. Tomorrow morning (we're in PST) I'll update the rest of the team on what I found and find someone more knowledgable on the client side to and see if they can help.
     
  15. dtakahas

    dtakahas

    Joined:
    Oct 22, 2015
    Posts:
    83
    @UDN_caa4f4d3-fecb-4373-bf79-3ea1f27242e7

    An additional step you could try for this would be to delete this directory in your project folder: Library/Collab/Download

    So the whole process would be:
    1. In the Collab History window, use the "Go back to..." button to go back to some revision before you started receiving empty files.
    2. Delete this directory in your project folder: Library/Collab/Download
    3. In the Collab Toolbar or Collab History window, use the Update button to go to the latest, most recent revision.
    4. Your files should be repaired now.
    To answer your 2 questions:
    a) Yes, you should go all the way to the latest, most recent version.
    b) Everyone on the team who has empty files should try the fix.

    Another last resort workaround would be for those affected to re-download the project by opening it from the "In The Cloud" section of the Unity launcher.
     
  16. KepleriansTeam

    KepleriansTeam

    Joined:
    Mar 14, 2014
    Posts:
    31
    Hi again, we are having troubles again... this time some scripts are cut when downloading all the project from Collab.

    Thanks for your support.
     

    Attached Files:

  17. senritsu

    senritsu

    Joined:
    Dec 12, 2012
    Posts:
    37
    I noticed that my problem with broken links as mentioned in another thread was actually this issue as well, since the meta files were downloaded as empty files.

    It was possible to fix it by painstakingly re-creating everything that was broken via redownloading things, changing file endings from CRLF to LF, change something else for unity to pick up the changes, and recommit it, but it took a long time. The interesting thing was that in multiple attempts at fixing the broken files, different files were suddenly broken that were fine before.

    This bug should definitely be maximum priority, when it is not possible to reliably download files from a VCS it is pretty useless.

    As a separate issue, .meta file download from the web UI does not work, making the fix for this issue even more tedious. When downloading a file via the web UI it downloads 2 files, the regular file and a .meta file, but they are identical in content, both have the content of the main file. Due to this it is not possible to restore broken .meta files from the cloud backup, and they have to be fixed manually.

    PS: Collaborate is git based, right? Is there anything preventing Unity from using the default git settings to automatically handle CRLF -> LF conversions on commit?
     
    Last edited: Nov 13, 2016
    ludwan likes this.
  18. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    Hi folks!
    We had a relapse of this issue over the weekend. Please use the recovery steps below to update your local repositories with the correct files again. Thank you so much!
    1. In the Collab History window, use the "Go back to..." button to go back to some revision before you started receiving empty files.
    2. Delete this directory in your project folder: Library/Collab/Download
    3. In the Collab Toolbar or Collab History window, use the Update button to go to the latest, most recent revision.
    4. Your files should be repaired now.
     
    KepleriansTeam likes this.
  19. senritsu

    senritsu

    Joined:
    Dec 12, 2012
    Posts:
    37
    I saw this steps in this thread, but it didn't work for me unfortunately. Only the described manual fixing did. I went back as far as the initial commit of the repo, to no avail.
     
  20. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    @senritsu the manual fix? Do you mean re-downloading from In The Cloud?
     
  21. senritsu

    senritsu

    Joined:
    Dec 12, 2012
    Posts:
    37
    Somewhat, i mean downloading all empty files from the Web UI and overwriting the local files, as well as manually fixing all missing meta files by lots of tedious inspector work. And after that, replacing CRLF with LF project-wide in the respective filetypes using any editor with a decent Search-and-replace-in-folders function.
     
  22. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    wow. that is horrible.

    At that point, I would have suggested deleting the whole project off of your local disc and redownloading it from "In The Cloud"
     
  23. senritsu

    senritsu

    Joined:
    Dec 12, 2012
    Posts:
    37
    Unfortunately that did not work, as the files were pulled in their corrupted state from the cloud by the Unity Editor, no matter if by switching to a certain commit or checking out the repo from scratch. The problematic line-endings were making it impossible to fix it using the Unity Editor itself, so external tools and manual work were required. And yes, it sucked :D Switched to another VCS after that for the moment, until Collaborate becomes a bit more stable. Which i hope it does quickly, the integration is pretty good and it is easy enough to use that my artist does not complain about it.
     
    holliebuckets likes this.
  24. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    Totally understandable.
    Thank you so much for all your feedback, troubleshooting, and bug info @senritsu!
     
  25. thedarcsage

    thedarcsage

    Joined:
    Nov 2, 2016
    Posts:
    23
    Thanks for the solution. I'm using Unity 5.6.0f3, and this fix worked for me.

    I was working primarily on the Windows version, then I updated the project on Unity for Mac OS X but I encountered several errors including unassigned gameObjects that were assigned on Windows.

    When I looked at the Library/Collab/Download folder, it included files that were from the previous Update weeks ago.
    I deleted it and followed the rest of the instructions, and in Collab History, I hit Restore to update, and it worked!