Search Unity

Invalid serialized file header

Discussion in 'Editor & General Support' started by yonson_chappers, Jul 29, 2017.

  1. yonson_chappers

    yonson_chappers

    Joined:
    Feb 6, 2017
    Posts:
    33
    I am working on a project, everything is fine, I close down my computer, having made absolutely no changes to either unity, the installation, the hardware of the computer or windows.

    When relaunching Unity, it spends ages reimporting all the assets again. When complete, the scene no longer opens. Instead I get a series of errors of:-

    "Invalid Serialized file header. File: <Scene File>"

    Steps I've taken to solve the issue:-
    • load scene in a different version of unity
    • install unity on a new computer and try it on there
    • change over the meta in editor from mixed / force binary / force text
    Nothing works. This is the 3rd time this has happened over the past few months. I've backed everything up but its pointless because none of the scenes load.

    I'm on version 5.6.2f1, running on windows 10

    Any help greatly appreciated, As it stands I've lost months of work and have absolutely no idea how this has happened, or how to avoid it happening again in the future

    Any thoughts please?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Thats not a common issue I have heard of. It sounds like the file/s has become corrupted. If they are corrupted then its unlikely you will be able to recover them. Do you have a faulty hard drive? How are you storing the project, Is it being synced by some cloud software? Do you have any editor scripts that could be messing with the files?I have also had issues in the past with cloud syncing breaking projects, albeit many years ago.
    Use some good source control software such as git and make sure your project is set to force text(better for source control). Our collab service is also good for keeping a backup.
    You say you have backed everything up but its pointless as the scenes dont load, did you not backup the scenes?
    Can you share some of the editor logs and corrupted scene files?
     
    chaudharyhamza likes this.
  3. yonson_chappers

    yonson_chappers

    Joined:
    Feb 6, 2017
    Posts:
    33
    Hi Karl
    thanks for the prompt response. No I thought exactly the same thing - must be a hard drive issue. So I swapped over the hard drives the last time this happened and put a brand new one in, exactly the same problem. Also, its only the most recent Unity Scene File which corrupts, absolutely everything else on the hard disk is fine.

    I'm not sync'ing with any cloud software - I did use google drive but this seemed to create more problems so I just backup to a USB drive. I looked at other source control like git and again it just caused far more problems. Maybe the collab service is something I should look at, I'd not looked into it before only because it just seemed anything involving version control actually made things worse.

    I can't seem to upload the log / scene files so have provided links to them below. Many thanks you for your help with this.
    John

    http://www.precentor.co.uk/castle/Castle.unity
    http://www.precentor.co.uk/castle/Castle.unity.meta
    http://www.precentor.co.uk/castle/Editor-prev.log
    http://www.precentor.co.uk/castle/Editor.log
     
  4. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    Same thing happened to me. Did you find a fix?
     
  5. warnoleto

    warnoleto

    Joined:
    Jan 29, 2017
    Posts:
    1
    I am also facing the same issue. I updated my project to the newest unity version last week (2017.1.b3) and worked on it it for some days. Yesterday when I tried to get some updates made by a teammate All the files were corrupted. Even .cs files. Trying to open this files in regular text editors all i can see are weird characters. I tried to revert to previous versions and the problem persists. Also tried to delete the local copy and download it again but no success. I asked my friend to make a backup and reimport to check if the version on the server is ok but I am waiting this answer. There is a way to access the collab files in the cloud?
     
  6. chaudharyhamza

    chaudharyhamza

    Joined:
    Dec 12, 2017
    Posts:
    3
    any solution
     
  7. chaudharyhamza

    chaudharyhamza

    Joined:
    Dec 12, 2017
    Posts:
    3
    did you find any solutions
     
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Do you have a bug report?
     
  9. nagydavid257

    nagydavid257

    Joined:
    Apr 8, 2021
    Posts:
    1
    I was searching for a solution for the same problem. i was working on a game and never shut down my laptop, so everything remained opened (saved instances on the drive) Once Windows update came and installed without my permission. Laptop restarted, every program close (it was all saved before), and when restarting Unity, error poped up. Also new versionof Unity apeared, but i skipped installing it, because i didn't want to risk that some feature won't be compatible anymore. I don't know which of these 2 caused the problem, but it seems easyer to rebuild the single scene that isn't working than finding a solution for this error.
     
  10. Amorindis

    Amorindis

    Joined:
    Apr 9, 2021
    Posts:
    1
    I was able to fix this issue in v2021.1.4 by right-clicking and doing "reimport all".
    I also removed and readded the sprite editor in package manager prior to doing that. Unsure if it did anything.