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

Why does the v1.7.5 version report an error when it is running and the field definition is missing? #2948

Closed
p9966 opened this issue Nov 21, 2021 · 16 comments

Comments

@p9966
Copy link

p9966 commented Nov 21, 2021

Description

v1.7.5 Runtime error reporting missing fields
image

Expectations

Missing fields can be defined

When I manually define the missing fields, the program can run normally

image

Environment

  • gin version: v1.7.5
@wyxogo
Copy link

wyxogo commented Nov 21, 2021

I have the same problem as you,and define the missing fields from your description, but the problem still exists.

@duyetpt
Copy link

duyetpt commented Nov 21, 2021

I have the same problem as you, but when i use v1.7.2 everything worked well.

@neoo726
Copy link

neoo726 commented Nov 21, 2021

I have got the same problem as you,it takes me several hours ,and finally i decided to give up trying fix it.

@Clivern
Copy link
Contributor

Clivern commented Nov 21, 2021

I see the same issue

# github.com/gin-gonic/gin
Error: ../../../go/pkg/mod/github.com/gin-gonic/gin@v1.7.5/context.go:735:13: c.engine.AppEngine undefined (type *Engine has no field or method AppEngine)
Error: ../../../go/pkg/mod/github.com/gin-gonic/gin@v1.7.5/gin.go:154:3: unknown field 'UseRawPath' in struct literal of type Engine
Error: ../../../go/pkg/mod/github.com/gin-gonic/gin@v1.7.5/gin.go:156:3: unknown field 'UnescapePathValues' in struct literal of type Engine
Error: ../../../go/pkg/mod/github.com/gin-gonic/gin@v1.7.5/gin.go:508:11: engine.UseRawPath undefined (type *Engine has no field or method UseRawPath)
Error: ../../../go/pkg/mod/github.com/gin-gonic/gin@v1.7.5/gin.go:510:20: engine.UnescapePathValues undefined (type *Engine has no field or method UnescapePathValues)
Error: Process completed with exit code 2.

@thinkerou
Copy link
Member

thinkerou commented Nov 21, 2021

@p9966 v1.7.5 don't release, it's an branch of git. I create the branch for release v1.7.5 but it have still error...

@neoo726
Copy link

neoo726 commented Nov 21, 2021

@p9966 v1.7.5 don't release, it's an branch of git. I create the branch for release v1.7.5 but it have still error.

v1.7.2 works well.So you can delete the installed package of v 1.7.5,and reduce the version to v1.7.2.

@thinkerou
Copy link
Member

v1.7.5 branch removed, thanks!

@Bisstocuz
Copy link
Contributor

Bisstocuz commented Nov 21, 2021

v1.7.5 branch removed, thanks!

It may take some time to compare commits, because some commits with v1.7.5 label are based on some commits with v1.8.0 label or older commits.

@burik666
Copy link

@thinkerou, you should retract v1.7.5 in go.mod file.

https://golang.org/ref/mod#go-mod-file-retract

@thinkerou
Copy link
Member

@thinkerou, you should retract v1.7.5 in go.mod file.

https://golang.org/ref/mod#go-mod-file-retract

thanks! please see #2951

@gozeon
Copy link

gozeon commented Nov 22, 2021

image

@dineshnagarajandev
Copy link

Experienced similar issue with v1.7.5.

Downgrading the version to github.com/gin-gonic/gin v1.7.2 resolves the issue.

@FahsaRwatit
Copy link

FahsaRwatit commented Nov 23, 2021

I see the same issue
go version go1.17.3 linux/amd64

# github.com/gin-gonic/gin /usr/local/gocode/pkg/mod/github.com/gin-gonic/gin@v1.7.5/context.go:735:13: c.engine.AppEngine undefined (type *Engine has no field or method AppEngine) /usr/local/gocode/pkg/mod/github.com/gin-gonic/gin@v1.7.5/gin.go:154:3: unknown field 'UseRawPath' in struct literal of type Engine /usr/local/gocode/pkg/mod/github.com/gin-gonic/gin@v1.7.5/gin.go:156:3: unknown field 'UnescapePathValues' in struct literal of type Engine /usr/local/gocode/pkg/mod/github.com/gin-gonic/gin@v1.7.5/gin.go:508:11: engine.UseRawPath undefined (type *Engine has no field or method UseRawPath) /usr/local/gocode/pkg/mod/github.com/gin-gonic/gin@v1.7.5/gin.go:510:20: engine.UnescapePathValues undefined (type *Engine has no field or method Unescape

go get -u github.com/gin-gonic/gin@v1.7.2

@Zandut
Copy link

Zandut commented Nov 23, 2021

downgrade with github.com/gin-gonic/gin@v1.7.4 everything worked well

@thinkerou
Copy link
Member

Released v1.7.6 using the code of v1.7.4 version to fix the error at first, please see https://github.com/gin-gonic/gin/releases/tag/v1.7.6, thanks!

@thinkerou
Copy link
Member

v1.7.7 have released, thanks! https://github.com/gin-gonic/gin/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests