serverless / serverless-google-cloudfunctions

Serverless Google Cloud Functions Plugin – Adds Google Cloud Functions support to the Serverless Framework
https://www.serverless.com
MIT License
271 stars 127 forks source link

Getting "TypeError: Cannot read property '4' of null" on deploy #228

Open AustinGil opened 4 years ago

AustinGil commented 4 years ago

Im using Serverless to deploy some cloud functions to GCP with this plugin, but I keep getting the following error printed to the consols: TypeError: Cannot read property '4' of null

This error does not prevent the project from being properly deployed, and as a sanity check I even tried running a "hello world" deploy based on the official examples: https://github.com/serverless/examples/tree/master/google-node-simple-http-endpoint

Even with the official example, the error persists.

medikoo commented 4 years ago

@Stegosource can you share full stack trace of error

AustinGil commented 4 years ago

Yes, I supposed that would have been helpful:

  TypeError: Cannot read property '4' of null
      at /home/austin/reveal/note-api/node_modules/serverless-google-cloudfunctions/deploy/lib/cleanupDeploymentBucket.js:27:95
      at /home/austin/reveal/note-api/node_modules/lodash/lodash.js:3727:18
      at arrayMap (/home/austin/reveal/note-api/node_modules/lodash/lodash.js:639:23)
      at /home/austin/reveal/note-api/node_modules/lodash/lodash.js:3726:24
      at /home/austin/reveal/note-api/node_modules/lodash/lodash.js:3543:27
      at /home/austin/reveal/note-api/node_modules/lodash/lodash.js:4881:15
      at baseMap (/home/austin/reveal/note-api/node_modules/lodash/lodash.js:3542:7)
      at baseOrderBy (/home/austin/reveal/note-api/node_modules/lodash/lodash.js:3725:20)
      at Function.orderBy (/home/austin/reveal/note-api/node_modules/lodash/lodash.js:9597:14)
      at /home/austin/reveal/note-api/node_modules/serverless-google-cloudfunctions/deploy/lib/cleanupDeploymentBucket.js:24:32
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
andrx commented 4 years ago

Could be not a proper bugfix as I've seen the code for 10mins but fixed the cleanup issue. need to check why the object without zip showed up.

pethersonmoreno commented 3 years ago

This problem is solved in this Pull Request: