gcloud app deploy omitting subdirectories? (Google Cloud SDK 261.0.0) / NodeJS

36 views
Skip to first unread message

Matti Dahlbom

unread,
Sep 9, 2019, 9:33:53 AM9/9/19
to Google App Engine
Hi, I am trying to deploy a NodeJS app (runtime: nodejs10) to GAE and apparently the gcloud app deploy command is omitting my subdirectories -- from the logs I see lines such as: 

2019-09-09 14:47:50,990 DEBUG root Skipping upload of [routes/myroute.js]

I did some source diving into gcloud tool and it looks like it is from this line:

lib/googlecloudsdk/api_lib/app/deploy_app_command_util.py 212: 
 log.debug('Skipping upload of [{f}]'.format(f=rel_path))

.. where it is checking a SHA1 checksum for existence. Ok, but then that should mean the file has already been uploaded, which is not the case for me. I can tell since my app code's require('./routes/myroute.js') is failing..

I have previously used AppEngine (for almost 10 years on and off, I might add) with Python and Go with no similar problems. Is there something wrong with the current SDK version of the uploader or am I just doing something horribly wrong?

FYI, my .gcloudignore does not include these subdirectories etc.

- M

George (Cloud Platform Support)

unread,
Sep 9, 2019, 11:13:23 AM9/9/19
to Google App Engine
How did you run your command, exactly? 

What is the output from the following commands?

gcloud components update
gcloud info
gcloud app deploy --verbosity debug

You should edit out all private information, such as project numbers, from the copied output. 

This error is displayed usually when not all your files and directories under the app directory are ASCII-only, or when "app.yaml" contains some non-ASCII characters. All these need to be ASCII, as well as all gcloud command parameters.  

To facilitate communication, and set proper privacy levels, you are encouraged to open a similar issue in the Public Issue Tracker

Matti Dahlbom

unread,
Sep 10, 2019, 8:17:39 AM9/10/19
to Google App Engine

Well. It turned out I was indeed doing something wrong and this was in no way GCP tools'  fault. After a more thorough study, what was happening was:

- All the files *had* been uploaded properly; dug through the staging GCS bucket and there it was
- The error I was getting was not due to a file not being uploaded, instead it was a silly case (sic) of require()'in the file in question with improper character case
- The reason it worked locally was due to OSX's *FUN* feature of being case ignorant; I was able to do require('foo/Bar.js') even if that one file was really called foo/bar.js

Case closed, sorry for wasting your time. Should have known better than to question my beloved AppEngine. As a long time Linux user this "feature" of OSX never came to my mind before a colleague pointed it out.

- M

George (Cloud Platform Support)

unread,
Sep 10, 2019, 9:29:51 AM9/10/19
to Google App Engine
Grateful for the detailed explanation of the solution. You are welcome opening separate issues in this Public Issue Tracker, if you are faced with other problems. 
Reply all
Reply to author
Forward
0 new messages