Expected oid xxx, got yyy

Hello everyone,
When I was using git lfs for project management, I ran into the problem of “expected oid xxx, got yyy”, which caused a few files to fail to pull when the project was pulled or cloned.
Let me describe what happened.
On the night of July 2nd, I was pushing 7558 lfs files, and when I pushed to 78%, I found that there was no response for a long time. I tried to open the repository from the web page, but I found that the repository URL could not be opened. Contact the webmaster, and the webmaster says that the gitlab server is faulty. Since the console hadn’t progressed, I was worried that there would be a problem with the shutdown, so I left it on overnight.
On July 3rd, I saw that there was an output in the console, to the effect that the push failed. So I flipped through the command and continued to push. As soon as it was pushed, the progress reached 78% in 2 seconds. It seems to be a continuation from 78%. The final output of this upload was successful.
But when other colleagues clone or pull this push, they all get “Smudge error: Error downloading xxxxxx/UnrealEditor-AndroidDeviceProfileCommandlets.pdb ( f45486b43f26cf3be8e36a138bdf54cfe8cd46ec4566cd9927e62f76a67958ac): expected OID f45486b43f26cf3be8e36a138bdf54cfe8cd46ec4566cd9927e62f76a67958ac, got 921c2272e1b2c57215f8f5c32291a0d87e8c9f02526aa89416534743e6c2bf04 after 46137344 bytes written”.
I did some testing and now locate the problem to our gitlab server is down.
The problem file “UnrealEditor-AndroidDeviceProfileCommandlets.pdb” I used 3 different versions of git and git lfs to push. Whether I’m re-pushing in the original repository, using “git lfs push --object-id origin f45486b43f26cf3be8e36a138bdf54cfe8cd46ec4566cd9927e62f76a67958ac”, creating a new repository, and only pushing the problem files. As soon as it is pushed to our gitlab server, the same error occurs. Pushing to the official gitlab and github repositories is no problem.
I searched online and someone mentioned that the file could be replaced. Through the repository web page, I replaced the problem file and successfully solved the problem, but the file is no longer an LFS managed file. This result was not what I wanted; Using the “git lfs push --object-id origin f45486b43f26cf3be8e36a138bdf54cfe8cd46ec4566cd9927e62f76a67958ac” directive, nothing changes. Then I want to try to find the corresponding file from the server and replace it with the file in the local .git directory. But I can’t find the lfs file directory for gitlab on the server, nor can I find “f45486b43f26cf3be8e36a138bdf54cfe8cd46ec4566cd9927e62f76a67958ac” or “921c2272e1b2c57215f8f5c32291a0d87e8c9f02526aa89416534743e6c2bf04”.
I’m not familiar with gitlab’s server file structure and would love someone to guide me through.
Whether it is feasible to manually replace the problem file on a gitlab server is also unknown, and hopefully someone will be able to answer it.

I found the problem file on the server through the gitlab documentation, deleted it, and then pushed the file again to fix the error.

1 Like