venf2k / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

Error deploying sample 2-structured-data #496

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Issue running command [gcloud preview app deploy].

What steps will reproduce the problem?

deploying project 2-structured-data (Getting started with Node.js):
gcloud preview app deploy app.yaml --promote

What is the expected output? What do you see instead?

ERROR: gcloud crashed (WindowsError): [Error 3] The system cannot find the path 
specified: 
'C:\\Users\\miguel\\AppData\\Local\\Google\\Cloud-SDK\\nodejs-getting-started\\2
-structured-data\\node_modules\\gcloud\\node_modules\\gce-images\\node_modules\\
google-auto-auth\\node_modules\\google-auth-library\\node_modules\\gtoken\\node_
modules\\google-p12-pem\\node_modules\\node-forge'

Please provide any additional information below.

Traceback (most recent call last):
  File "lib\googlecloudsdk\gcloud_main.py", line 169, in main
    gcloud_cli.Execute()
  File "lib\googlecloudsdk\calliope\cli.py", line 643, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "lib\googlecloudsdk\calliope\backend.py", line 1401, in Run
    resources = command_instance.Run(args)
  File "lib\surface\preview\app\deploy.py", line 369, in Run
    config_cleanup)
  File "lib\googlecloudsdk\api_lib\app\deploy_command_util.py", line 204, in BuildAndPushDockerImages
    info.file, docker_client, image_name)
  File "lib\googlecloudsdk\api_lib\app\deploy_command_util.py", line 278, in BuildAndPushDockerImage
    image.Build(docker_client)
  File "lib\googlecloudsdk\api_lib\app\docker_image.py", line 110, in Build
    nocache=self._nocache, rm=self._rm, pull=False)
  File "bin\..\./lib\third_party\docker\docker\api\build.py", line 49, in build
    context = utils.tar(path, exclude=exclude, dockerfile=dockerfile)
  File "bin\..\./lib\third_party\docker\docker\utils\utils.py", line 86, in tar
    t.add(os.path.join(root, path), arcname=path, recursive=False)
  File "C:\python27\lib\tarfile.py", line 2006, in add
    tarinfo = self.gettarinfo(name, arcname)
  File "C:\python27\lib\tarfile.py", line 1878, in gettarinfo
    statres = os.lstat(name)
[output truncated]

Original issue reported on code.google.com by mikeribe...@gmail.com on 25 Jan 2016 at 4:29

GoogleCodeExporter commented 8 years ago
Greetings!  This looks like it may be caused by the maxpath limitation on 
Windows - this happens sometimes with NPM modules that have a lot of nested 
dependencies.  

One fix might be to install NPM 3, which flattens dependencies:

  npm install -g npm@3

Hopefully this fixes things up for you.  Let us know how it goes!

Original comment by beckw...@google.com on 25 Jan 2016 at 6:04

GoogleCodeExporter commented 8 years ago
Thanks for yr prompt reply.

Installed npm3, same error.
Changed project location to c:\, and I was able to deploy.

Thanks again.
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=s
ig-email&utm_content=webmail>
This
email has been sent from a virus-free computer protected by Avast.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=s
ig-email&utm_content=webmail>
<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Original comment by mikeribe...@gmail.com on 26 Jan 2016 at 2:01

GoogleCodeExporter commented 8 years ago
Internal issue filed for the c:\ workaround. Thanks

Original comment by gsfow...@google.com on 27 Jan 2016 at 1:39

GoogleCodeExporter commented 8 years ago
Issue 527 has been merged into this issue.

Original comment by z...@google.com on 16 Feb 2016 at 11:11

GoogleCodeExporter commented 8 years ago
Having the same issue, did npm install -g npm@3 and move directory to c:/, 
still doesnt work

Original comment by jamesw...@amuzedesign.com on 2 Mar 2016 at 4:56

GoogleCodeExporter commented 8 years ago
If you're still seeing this problem - can you please share the console output?  
Could you also just do a quick `npm -v` to make sure we're seeing the same 
thing?

Original comment by beckw...@google.com on 2 Mar 2016 at 4:28

GoogleCodeExporter commented 8 years ago
Issue 634 has been merged into this issue.

Original comment by z...@google.com on 8 Mar 2016 at 5:00

GoogleCodeExporter commented 8 years ago
Hello, thank you for the quick response to my issue (634). 

I installed npm 3 (npm -v returns 3.8.0)

I first tried moving the 2-structured-data (containing app.js, package.json, 
app.yaml, etc.) to C:\ but that didn't work, here was the console output:

******
ERROR: gcloud crashed (WindowsError): [Error 3] The system cannot find the path 
specified: 
'C:\\2-structured-data\\node_modules\\gcloud\\node_modules\\gce-images\\node_mod
ules\\google-auto-auth\\node_modules\\google-auth-library\\node_modules\\jws\\no
de_modules\\base64url\\node_modules\\concat-stream\\node_modules\\readable-strea
m\\node_modules\\core-util-is\\float.patch'
******

I then tried emptying the 2-structured-data file and moving the contents 
themselves to C:\, at which point I was prompted to grant administrator 
permissions to the files. This seemed like a step in the right direction, 
though gcloud preview app deploy still didn't work, here was the console output 
leading upto and including the error:

*******
Verifying that Managed VMs are enabled and ready.
Provisioning remote build service.
Copying certificates for secure access. You may be prompted to create an SSH 
keypair.
Building and pushing image for module [default]
Beginning teardown of remote build environment (this may take a few seconds).
ERROR: gcloud crashed (IOError): [Errno 13] Permission denied: u'C:\\Dockerfile'
*******

Searching for a "Dockerfile" in C: doesn't return any results. Any thoughts? 
Thanks again!

Original comment by daniel.c...@gmail.com on 8 Mar 2016 at 6:22

GoogleCodeExporter commented 8 years ago
We're still investigating workarounds for this issue–it's due to a Windows 
MAX_PATH limitation.

Thank you for sharing your command output; it should help us diagnose.

Original comment by z...@google.com on 8 Mar 2016 at 6:25

GoogleCodeExporter commented 8 years ago
Thank you! I'll continue to try my own workarounds and share my command output 
if it helps....Btw, I did find a "Dockerfile" in my Google Cloud SDK folder. I 
tried moving it to C: and deploying again. I got this error:

ERROR: (gcloud.preview.app.deploy) There is a Dockerfile in the current 
directory, and the runtime field in C:\app.yaml is currently set to [runtime: 
nodejs]. To use your Dockerfile to build a custom runtime, set the runtime 
field in C:\app.yaml to [runtime: custom]. To continue using the [nodejs] 
runtime, please omit the Dockerfile from this directory.

I tried setting runtime:custom in the yaml file, and when I tried gcloud 
preview app deploy again, I got this error:

ERROR: gcloud crashed (IOError): [Errno 13] Permission denied: 'C:\\Program 
Files (x86)\\InstallShield Installation 
Information\\{40BF1E83-20EB-11D8-97C5-0009C5020658}\\setup.ilg'

Hopefully, this helps!

Original comment by daniel.c...@gmail.com on 8 Mar 2016 at 7:23

GoogleCodeExporter commented 8 years ago
Issue 641 has been merged into this issue.

Original comment by z...@google.com on 11 Mar 2016 at 1:35

GoogleCodeExporter commented 8 years ago
Issue 674 has been merged into this issue.

Original comment by z...@google.com on 22 Mar 2016 at 2:13

GoogleCodeExporter commented 8 years ago
Issue 679 has been merged into this issue.

Original comment by z...@google.com on 23 Mar 2016 at 12:58

GoogleCodeExporter commented 8 years ago
Any news on the issue? I can't deploy from Windows...

Original comment by daniele....@delonghigroup.com on 1 Apr 2016 at 12:12

GoogleCodeExporter commented 8 years ago
Issue 697 has been merged into this issue.

Original comment by z...@google.com on 1 Apr 2016 at 3:13

GoogleCodeExporter commented 8 years ago
I updated NPM. It's working.This issue can be closed

Original comment by raf...@gmail.com on 1 Apr 2016 at 3:16

GoogleCodeExporter commented 8 years ago
The NPM upgrade mitigates the issue in some cases, but doesn't fix the core 
problem, unfortunately. 

Original comment by z...@google.com on 1 Apr 2016 at 3:18

GoogleCodeExporter commented 8 years ago

Original comment by abdull...@google.com on 1 Apr 2016 at 5:42

GoogleCodeExporter commented 8 years ago
Issue 716 has been merged into this issue.

Original comment by z...@google.com on 11 Apr 2016 at 1:50

GoogleCodeExporter commented 8 years ago
Issue 750 has been merged into this issue.

Original comment by z...@google.com on 19 Apr 2016 at 2:04

GoogleCodeExporter commented 8 years ago
Issue 758 has been merged into this issue.

Original comment by z...@google.com on 19 Apr 2016 at 5:35

GoogleCodeExporter commented 8 years ago
Issue 764 has been merged into this issue.

Original comment by vil...@google.com on 21 Apr 2016 at 5:29

GoogleCodeExporter commented 8 years ago
Issue 777 has been merged into this issue.

Original comment by vil...@google.com on 22 Apr 2016 at 7:31

GoogleCodeExporter commented 8 years ago
Issue 779 has been merged into this issue.

Original comment by vil...@google.com on 25 Apr 2016 at 7:57

GoogleCodeExporter commented 8 years ago
Issue 781 has been merged into this issue.

Original comment by vil...@google.com on 25 Apr 2016 at 9:43

GoogleCodeExporter commented 8 years ago
Issue 786 has been merged into this issue.

Original comment by vil...@google.com on 25 Apr 2016 at 10:03

Methodician commented 5 years ago

So this could be a Windows MAX_PATH problem but I'm on a Windows machine so why would this only happen after a seemingly successful deployment crashes? And further, my app was deploying fine until this latest update and I didn't change my dependencies or file location, so it's odd that this would suddenly start happening.

VikramVasudevan commented 3 years ago

It is 2021 and the issue is still prevalent. For me, it occurs when I run the following command. gcloud components update

The installer is trying to open cmd.exe and running a python script (which is actually present in the exact location it is looking for) but then it says file not found.