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

Failed to build app: Your app is not on your GOPATH, please move it there and try again. #8

Open
stephaneb20017 opened this issue Dec 10, 2019 · 5 comments

Comments

@stephaneb20017
Copy link

MacBook:cloud stephane$ bash deploy.sh
Unable to find image 'golang:1.11' locally
1.11: Pulling from library/golang
4ae16bd47783: Pull complete
bbab4ec87ac4: Pull complete
2ea1f7804402: Pull complete
96465440c208: Pull complete
16a3d8aca6cd: Pull complete
3a62db25bdbe: Pull complete
8c47c6b16c60: Pull complete
Digest: sha256:e972c78795b22d5cfab02ac410aa2305fcc036319a7af51065d1af583cd3ec04
Status: Downloaded newer image for golang:1.11
Services to deploy:

descriptor: [/Users/stephane/Downloads/Lab-GCP/la-ace-find-seller-master/frontend/app/app.yaml]
source: [/Users/stephane/Downloads/Lab-GCP/la-ace-find-seller-master/frontend/app]
target project: [find-seller-app-dev-stephane]
target service: [default]
target version: [20191210t124827]
target url: [https://find-seller-app-dev-stephane.appspot.com]

Beginning deployment of service [default]...
Created .gcloudignore file. See gcloud topic gcloudignore for details.
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 1186 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: script field for handler '/.*' must be set to 'auto' for runtime go111.
MacBook:cloud stephane$ bash deploy.sh
Services to deploy:

descriptor: [/Users/stephane/Downloads/Lab-GCP/la-ace-find-seller-master/frontend/app/app.yaml]
source: [/Users/stephane/Downloads/Lab-GCP/la-ace-find-seller-master/frontend/app]
target project: [find-seller-app-dev-stephane]
target service: [default]
target version: [20191210t125437]
target url: [https://find-seller-app-dev-stephane.appspot.com]

Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 1 file to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build da0fd6ba-8484-4d1e-8ee0-9349be29c7bd status: FAILURE.
Error ID: A3D934AC.
Error type: BuildError.
Error message: 2019/12/10 03:56:16 Copying /workspace/_gopath/src/cloud.google.com to /tmp/staging646174384/srv/gopath/src/cloud.google.com
2019/12/10 03:56:17 Copying /workspace/_gopath/src/github.com to /tmp/staging646174384/srv/gopath/src/github.com
2019/12/10 03:56:17 Copying /workspace/_gopath/src/go.opencensus.io to /tmp/staging646174384/srv/gopath/src/go.opencensus.io
2019/12/10 03:56:17 Copying /workspace/_gopath/src/golang.org to /tmp/staging646174384/srv/gopath/src/golang.org
2019/12/10 03:56:17 Copying /workspace/_gopath/src/google.golang.org to /tmp/staging646174384/srv/gopath/src/google.golang.org
2019/12/10 03:56:17 Your app is not on your GOPATH, this build may fail.
2019/12/10 03:56:17 Building from Go source in /tmp/staging646174384/srv, with main package at ./...
2019/12/10 03:56:17 Building /tmp/staging646174384/srv, saving to /tmp/staging646174384/usr/local/bin/start
2019/12/10 03:56:19 Wrote build output to /builder/outputs/output
2019/12/10 03:56:19 Failed to build app: Your app is not on your GOPATH, please move it there and try again.
building app with command '[go build -o /tmp/staging646174384/usr/local/bin/start ./...]', env '[PATH=/go/bin:/usr/local/go/bin:/builder/google-cloud-sdk/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=e6a5de90920f HOME=/builder/home BUILDER_OUTPUT=/builder/outputs DEBIAN_FRONTEND=noninteractive GOROOT=/usr/local/go/ GOPATH=/go GOPATH=/tmp/staging646174384/srv/gopath]': err=exit status 1, out=go build: cannot use -o with multiple packages.
MacBook:cloud stephane$ echo $GOPATH

MacBook:cloud stephane$ go env GOPATH
/Users/stephane/go

@stephaneb20017
Copy link
Author

stephaneb20017 commented Dec 10, 2019

app.yaml file is

runtime: go111
#api_version: go1

handlers:

  • url: /public
    static_dir: public

  • url: /images
    static_dir: public/images

  • url: /assets
    static_dir: public/assets

  • url: /.*
    #script: _go_app
    #login: required
    #ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: script field for handler '/.*'
    #must be set to 'auto' for runtime go111.
    script: auto

env_variables:
#modified with the value of gcloud pubsub topics
APP_TOPIC: 'fs-dev-stephane-items'

@cr8ivecodesmith
Copy link

@stephaneb20017 This is happening for me as well. Were you able to fix this?

@cosmin8905
Copy link

Same here. I raise a support ticket with Linux Academy

@mattuLA
Copy link

mattuLA commented Jan 31, 2020

Hi, Matt here from Linux Academy. We have a temporary fix in place to fix the app engine issues you have been experiencing that will update necessary files after they have been cloned from this github repo. Steps below:

  1. Navigate to your la-ace-find-seller folder.
  2. In terminal: run the following command to download and execute a script that will update the necessary files to bring App Engine's deploy files up to current standards. Be sure to run this command only once, or some of the affected files will be 'double pasted' and not correctly formatted:
    gsutil cp https://storage.cloud.google.com/la-gcloud-course-resources/cloud-engineer/gca-fixes.sh . && source gca-fixes.sh
    You should now be able to deploy your app engine application. Please let me know if this works or not. Thanks.

@cosmin8905
Copy link

Thanks Matt,

Got it working with 2 minor adjustments:
gsutil cp https://storage.cloud.google.com/la-gcloud-course-resources/cloud-engineer/gca-fixes.sh . && source gca-fixes.sh
command is invalid. I used VIM to create the gca-fixes.sh file with the contents from the link. Then chmod +x to make it executable , and finally ran sh gca-fixes.sh
The la-ace-find-seller/frontend/app/app.yaml file contained and invalid go runtime “go1111111”
Fixed by changing it to “go111”

Everything else worked fine. Thanks, so much guys! Finally got the fully lab working as expected

Thanks,

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

4 participants