Questions tagged [google-app-engine-go]
59 questions
102
votes
5 answers
go run: cannot run non-main package
here the simple go application. I am getting "go run: cannot run non-main package" error, if I run following code.
package zsdfsdf
import (
"fmt"
)
func Main() {
fmt.Println("sddddddd")
}
To fix it, I just need to name the package to…

qinking126
- 11,385
- 25
- 74
- 124
10
votes
2 answers
App engine push task always returns 404 in test
I've got a push task queue in a Go App Engine application. When we try to enqueue tasks in testing for whatever reason the tasks always return 404.
Our app.yaml:
runtime: go
api_version: go1.9
handlers:
- url: /worker/.*
script: _go_app
…

Venantius
- 2,471
- 2
- 28
- 36
7
votes
1 answer
How to pass run arguments in app.yaml for Go?
According to Docs:
entrypoint
Optional. Overrides the default startup behavior by executing the entrypoint command when your app starts. For your app to receive HTTP requests, the entrypoint element should contain a command which starts a web…

Arximede
- 371
- 1
- 4
- 17
7
votes
2 answers
Deploying go1.11 on App Engine Standard Build failure: Your app is not on your GOPATH
I have attempted to deploy my Go app to App Engine. I have the following build errors:
Starting Step #1 - "builder"
Step #1 - "builder": Pulling image: gcr.io/gae-runtimes/go111_app_builder:go111_1_11_2_20181111_RC00
Step #1 - "builder":…

daviddavis
- 263
- 1
- 4
- 12
6
votes
1 answer
Why isn't Cloud Endpoints for Golang in GAE Standard Environment?
Hey does anyone know why Google Cloud Endpoints for Go-lang isn't in the standard environment on Google App Engine? It's only seemed to be officially supported/documented for Python / Java.
Is it because
A) Cloud Endpoints is coming to Golang soon /…

Quang Van
- 11,475
- 12
- 57
- 61
4
votes
2 answers
`go build -mod vendor` fails to make use of vendored packages
When deploying my Go services to Google AppEngine (standard), I receive an errors describing a module version not being found, while everything compiles fine.
The modules are on a private Github instance and checked out to vendor/.
A go build -mod…

Niels
- 61
- 1
- 5
4
votes
1 answer
How to change environment variable of a Google App Engine Flex application and restart it, without redeploying
I have a Golang application deployed to Google App Engine Flex which has a lot of environment variables. Now and then, I need to change a couple of these environment variable to test my application. However, I could not find a way in GAE Flex…

Saurav Haloi
- 343
- 1
- 2
- 11
3
votes
1 answer
Bitbucket Pipeline Deploy issue to Google App Engine
I'm trying to deploy a golang app to app engine. Now I'm able to do it via the gcloud CLI on my mac, and this works fine (running gcloud app deploy app.yaml). However, I'm getting the following error on Bitbucket Pipelines:
+ gcloud --quiet…

ephilip
- 1,015
- 1
- 10
- 23
3
votes
2 answers
golang appengine api testing error "appengine: NewContext passed an unknown http.Request"
I'm using appengine and golang to develop simple RESTful APIs. The code works fine when I start service using goapp serve, and I started writing the unit test functions to test the API endpoints, and I'm struck here with the panic error appengine:…

srini
- 1,110
- 3
- 11
- 20
3
votes
2 answers
How to handle 404 Error on GAE using http.FileServer in Golang
I am using Google App Engine to serve my (semi-)static website generated with Hugo. I have a directory "public" where all the HTML files are stored and are to be served. I also have some server-side scripts for the contact form handling for example.…

pascal
- 641
- 4
- 12
2
votes
2 answers
go Unable to get login user information
Hello. I'm using the go language in Google App Engine. I'm having trouble getting the logged-in user's information. Similarly, the login URL and logout URL cannot be obtained. All nil will be returned. user.IsAdmin (c) returns false. please help…

sigma
- 21
- 1
2
votes
1 answer
Unable to deploy AppEngine Go app with runtime 1.12 that uses external libraries
I'm trying to migrate an old Google App Engine (standard environment) project written in Go to runtime 1.12. I haven't touched it since late 2017 and a lot seems to have changed since then. I've been able to sort some things out, but I fail to…

nibarius
- 4,007
- 2
- 38
- 56
2
votes
1 answer
How to make golang gin work with google app engine?
My GOPATH is $HOME/go, I put my project's source code in $HOME/go/src/myproj
and there are two files:
app.yaml:
application: hello
version: 1
runtime: go
api_version: go1
handlers:
- url: /.*
script: _go_app
and hello.go
package hello
import (
…

gacopu
- 594
- 3
- 21
2
votes
2 answers
Change runtime from Python to Go in App Engine standard environment
I have a website on AppEngine that is 99% static. It is running on Python 2.7 runtime. Now the time has come to evolve this webapp, and since I have almost none Python code in it, I'd prefer to write it in Go instead.
Can I change runtime from…

kamituel
- 34,606
- 6
- 81
- 98
1
vote
1 answer
service bridge HTTP failed error when using dev_appserver.py
I have an appengine app that I've upgraded to Go 1.20 and the latest Google Cloud API.
It still works if I deploy it, but when I run it locally using dev_appserver.py I get this error whenever it makes an API call:
2023/04/16 17:27:52 ERROR:…

ghosttie
- 588
- 2
- 8
- 18