Closed mxbi closed 7 years ago
AFAIK, this is a problem with your GOPATH. Take a look at Go documentation: https://github.com/golang/go/wiki/GOPATH
I don't think that's the reason. gcloud
might have changed some configurations (I didn't really check that. The error message suggested it though). I just restructured the project as below and it worked just fine.
go-beacon/
static/
app.yaml
go-beacon.go
page.html
@kshitijb interesting. If that's the case, can you make a PR so we can land this here too?
@kshitijb I tried that, however when I deploy I am simply getting an HTTP 500 error when I try visiting the page, see https://mxbi-beacon.appspot.com/
EDIT: Looking at the app engine logs I see the error in go is:
panic: open ga-beacon/page.html: no such file or directory
I've tried copying the stuff from inside the ga-beacon subdirectory to the root directory instead of simply moving it, so that the original page.html file still exists. However, I still get the same error.
Oh yeah! @mxbi You need to change pageTemplate
value on line 26
to page.html
instead of ga-beacon/page.html
as the folder structure has changed.
Let me know if it works (It should :) ).
@kshitijb Okay, by changing the pageTemplate
value as suggested and then deleting the original files (only keeping the files in the root directory and not in the subfolder - without doing this I still got the error as it was using both go files for some reason) I was able to get the service to deploy without any errors! Thanks for the help,
I'll put the changes into a quick pull request (once I test that the beacon functionality actually reports to google analytics)
Hi,
I'm trying to deploy this beacon on my own GCP app engine. The repo says:
But this doesn't seem to work for me. After modifying the app name, I get the following error when doing
gcloud app deploy
:The same error appears about the version field. If I comment both fields out at the top of the yaml and specifying the project with --project I no longer get this error, however, I get the following error:
It seems to be a problem with the fact that the go files are in a subdirectory but gcloud is only looking in the directory where the app.yaml is. I'm not familiar with app engine so I feel like this is an easy fix but I'm not sure what to do.
I've tried moving all the files from the
ga-beacon
subdirectory into the main directory, and while this does deploy, I simply get a internal error occured page when I try to go to the page.I'm running Google Cloud SDK 164.0.0 on Ubuntu 14.04.
Thanks