Skip to content

LFS: Error 500 when trying to view new LFS files in a PR from a fork #28299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
w23 opened this issue Nov 29, 2023 · 1 comment
Closed

LFS: Error 500 when trying to view new LFS files in a PR from a fork #28299

w23 opened this issue Nov 29, 2023 · 1 comment
Labels
issue/duplicate The issue has already been reported. type/bug

Comments

@w23
Copy link

w23 commented Nov 29, 2023

Description

  1. Have a repo that has LFS enabled.
  2. Make a fork, commit a bunch of new LFS files into the fork.
  3. Make a PR against the original repo.
  4. Click on View File button on any of the new LFS files in the PR.
  5. See error 500 instead of the preview. Logs and the error message say
    ...ers/web/repo/view.go:342:renderFile() [E] getFileReader: LFS Meta object does not exist

More observations:

  • Other than that LFS works fine for both repos.
  • Clicking on the same file when viewing the forked repo works just fine.
  • View file button on both PR and forked repo commit leads to almost the same URL, with the only difference being the repo owner part.
  • After merging the PR the issue disappears, i.e. the view file URL that has upstream repo owner part no longer leads to error 500.

Also, it would be super nice to have the same image comparison/difference preview for LFS files in a PR, as for regular image files.

Gitea Version

1.21.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

gitea/gitea:latest docker image with the most basic setup and essentially default settings.

Database

None

@w23 w23 added the type/bug label Nov 29, 2023
@s-weigand
Copy link

I think this is a duplicate of #17715
The workaround I use is going to the repos LFS settings, click the Find pointers files and after that associating them with the repos. Note that this also needs to be done for forks after it got merged upstream.

@lunny lunny added the issue/duplicate The issue has already been reported. label Mar 12, 2024
@lunny lunny closed this as completed Mar 12, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported. type/bug
Projects
None yet
Development

No branches or pull requests

3 participants