Skip to content
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

Request repository subdir result in [Macaron] PANIC: Value not found for type *repo.HTTPContext #6314

Closed
monoflash opened this issue Sep 7, 2020 · 5 comments · Fixed by #6318
Assignees
Labels
💊 bug Something isn't working
Milestone

Comments

@monoflash
Copy link

monoflash commented Sep 7, 2020

Describe the bug
All request https://domain.name/path/repo?go-get=1 ends with error 500

Gogs version and commit
Error beginning from version 0.12.0.
In version 0.12.1 also error presented.

Git version
git version 2.28.0

Operating system

# cat /etc/os-release 
NAME="openSUSE Tumbleweed"
# VERSION="20200823"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20200823"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20200823"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
LOGO="distributor-logo"

Database
mysql

To Reproduce
Steps to reproduce the behavior:

  1. upgrade goggs from version 0.11.91 to version 0.12.0 or 0.12.1
  2. git pull any repository
@unknwon
Copy link
Member

unknwon commented Sep 7, 2020

Hi, are you sure you're running 0.12? There is no such file routes/repo/http.go (from your error log): https://github.com/gogs/gogs/tree/release/0.12/internal/routes/repo/http.go

@unknwon unknwon added the status: needs feedback Tell me more about it label Sep 7, 2020
@monoflash
Copy link
Author

monoflash commented Sep 7, 2020

Hi, are you sure you're running 0.12? There is no such file routes/repo/http.go (from your error log): https://github.com/gogs/gogs/tree/release/0.12/internal/routes/repo/http.go

Yes, of course.

./gogs --version
Gogs version 0.12.1

shasum --binary -a 512 ./gogs
76bbaab2738f9208d53f7ce5301e0158dac60b76cbef96d6b05f818501bfe0495cdd9d4c301e41f4550dfe0e70c55b7e2130125b53188105a678bbe9378848a8 *./gogs

shasum --binary -a 256 ./gogs
f33a3d36c7ea10f723ec4c787559362d7e5989c275b5797ceaf8df00f637eafe *./gogs

I deleted all logs and re-tested it.
It turned out that the entries in the log were old. When a request is made, a 500 error is returned to the client, but nothing is written to the logs at all.

cannot find module providing package git.webdesk.ru/wd/kit/models/auth: unrecognized import path "git.webdesk.ru/wd/kit/models/auth": reading https://git.webdesk.ru/wd/kit/models/auth?go-get=1: 500 Internal Server Error

gogs-error

If gogs go back to version 0.11.91, then the requests go through and the repository is successfully cloned.

goggs-ok

@monoflash
Copy link
Author

Errors from console:

[Macaron] 2020-09-07 23:45:44: Completed GET /wd/kit/models/grpc/msg?go-get=1 500 Internal Server Error in 1.94382ms
[Macaron] PANIC: Value not found for type *repo.HTTPContext
gopkg.in/macaron.v1@v1.3.9/context.go:123 (0x866d34)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x879e25)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x879e18)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x86a777)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x833e34)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x833bd9)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x866bbc)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x879129)
gopkg.in/macaron.v1@v1.3.9/logger.go:52 (0x879114)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x86a777)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x833e34)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x833bd9)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x866bbc)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x87b070)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8731e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x86baed)
net/http/server.go:2843 (0x7cef82)
net/http/server.go:1925 (0x7ca78c)
runtime/asm_amd64.s:1374 (0x47c560)
[Macaron] 2020-09-07 23:45:44: Completed GET /wd/kit/middleware/retrycheck?go-get=1 500 Internal Server Error in 1.485438ms
[Macaron] PANIC: Value not found for type *repo.HTTPContext
gopkg.in/macaron.v1@v1.3.9/context.go:123 (0x866d34)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x879e25)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x879e18)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x86a777)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x833e34)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x833bd9)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x866bbc)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x879129)
gopkg.in/macaron.v1@v1.3.9/logger.go:52 (0x879114)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x86a777)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x833e34)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x833bd9)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x866bbc)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x87b070)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8731e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x86baed)
net/http/server.go:2843 (0x7cef82)
net/http/server.go:1925 (0x7ca78c)
runtime/asm_amd64.s:1374 (0x47c560)
[Macaron] 2020-09-07 23:45:44: Completed GET /wd/kit/models/grpc?go-get=1 500 Internal Server Error in 1.998532ms

@monoflash monoflash changed the title Request ?go-get=1 ends with error 500 and serviceRPC()] HTTP.serviceRPC: fail to serve RPC Request ?go-get=1 ends with error 500 and [Macaron] PANIC: Value not found for type *repo.HTTPContext Sep 7, 2020
@unknwon
Copy link
Member

unknwon commented Sep 8, 2020

Thanks for the follow up! It is a bug, I'll investigate.

@unknwon unknwon changed the title Request ?go-get=1 ends with error 500 and [Macaron] PANIC: Value not found for type *repo.HTTPContext Request repository subdir result in [Macaron] PANIC: Value not found for type *repo.HTTPContext Sep 8, 2020
@unknwon unknwon added 💊 bug Something isn't working and removed status: needs feedback Tell me more about it labels Sep 8, 2020
@unknwon unknwon added this to the 0.13 milestone Sep 8, 2020
@unknwon unknwon self-assigned this Sep 9, 2020
@unknwon
Copy link
Member

unknwon commented Sep 9, 2020

The patch to fix this issue will be back ported to 0.12 when next time cut a release branch (scheduled this Saturday, Sept 12, 2020).

Thanks again for reporting!

@unknwon unknwon modified the milestones: 0.13, 0.12.2 Sep 18, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💊 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy