1
votes

After updating the Google App Engine SDK last night... Both go env and goapp env have the correct GOPATH and GOROOT, go build and goapp build both work, but appcfg.py update ... returns that every third-party package is missing.

Even if I run goapp get ... or go get ... again for each package, it makes no difference since they're already in the GOPATH anyway. That alone should be confirmed by the fact that both commands build the project.

What could be wrong? :(


EDIT: It produces different errors each time I run appcfg.py update . ...

main.go:4: can't find import: "github.com/gin-gonic/gin" github.com/gin-gonic/gin/binding/default_validator.go:7: can't find import: "gopkg.in/go-playground/validator.v8" github.com/gin-gonic/gin/context.go:17: can't find import: "github.com/gin-gonic/gin/binding"

... Ran goapp get ... on all of these, even though they're already there.

main.go:4: can't find import: "github.com/gin-gonic/gin" github.com/gin-gonic/contrib/gzip/gzip.go:9: can't find import: "github.com/gin-gonic/gin" github.com/gin-gonic/gin/render/yaml.go:10: can't find import: "gopkg.in/yaml.v2"

... Repeat, run goapp get ... on all of these again.

main.go:4: can't find import: "github.com/gin-gonic/gin" github.com/gin-gonic/gin/render/yaml.go:10: can't find import: "gopkg.in/yaml.v2"

Makes no sense. The libraries are already there. I can do goapp build and it works, but I can't deploy.

All of this is inside the "--- begin server output ---" and "--- end server output ---" wrappings... is this a server-side issue?

2
Is the path to go_appengine/appcfg.py in your GOPATH ? If you can run appcfg.py using its whole path w/o errors then it's probably not in GOPATH or GOROOT.Sridhar
No, it's not. Should it be? Adding it doesn't seem to make a difference.Ben Guild
Also, I just spun up a Compute Engine instance and have the same exact problem there... even on a fresh install.Ben Guild
Added console output above.Ben Guild
I think you're supposed to use goapp deploy instead of appcfg.py for golang deployments. Does that work?Justin Beckwith

2 Answers

1
votes

This was a known issue with the App Engine SDK for Go caught during rollout and addressed. It was tracker in public Issue 13230. This should no longer be in effect.

One important note that, as stated in the documentation, one should not implement a main() function in a Go GAE application as the behavior is unspecified.

Should anyone still be encountering this issue, please file a new defect report on the App Engine public issue tracker linking back to Issue 13230 for context.

0
votes

https://groups.google.com/forum/#!topic/google-appengine-go/rVHZXlSfC7E ... As noted here by another user, this is a temporary issue with Google App Engine.

It can be solved by commenting out the main() method in the main package of your project. Normally, init() is used, so this does not currently cause any other issue except a minor inconvenience when deploying to other platforms simultaneously or building locally for non-App Engine execution.