vscode-azurefunctions: Deploy to Function App Script Failed on (intermediate value).parsedBody.map is not a function

Using AZ function deploy (1.12.1) deploy: image

Crashes on final step: (intermediate value).parsedBody.map is not a function

Reverting to 1.10.4 solved this problem.

Windows, current VS code, current

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 13
  • Comments: 20 (4 by maintainers)

Most upvoted comments

@dfuchs-hitachi, thanks for providing the logs. We’ve fixed this in https://github.com/microsoft/vscode-azuretools/pull/1545 and hope to release it soon.

Restarting VS Code is not working for me.

for me the error occurs at

3:39:14 PM func-myfunc-dev-we-001: Preparing output...
3:39:14 PM func-myfunc-dev-we-001: Copying files to destination directory '/tmp/build/expressbuild'...
3:39:25 PM func-myfunc-dev-we-001: Done in 11 sec(s).
3:39:25 PM func-myfunc-dev-we-001: Removing existing manifest file
3:39:25 PM func-myfunc-dev-we-001: Creating a manifest file...
3:39:25 PM func-myfunc-dev-we-001: Manifest file created.
3:39:25 PM func-myfunc-dev-we-001: Copying .ostype to manifest output directory.
3:39:25 PM func-myfunc-dev-we-001: Done in 178 sec(s).
3:39:37 PM: Error: (intermediate value).parsedBody.map is not a function

and reverting to v1.11.0 worked

@thecury, revert to a previous extension version, it’s a simple click away:

image

I have started seeing this error at random when deploying to Azure App Service.

This error started in the past couple weeks or so. I’d never seen it before, and in general never had problems with Azure App Service deployments from VS Code.

Thus far if I re-run the deployment after getting the error, it works, but I find it unsettling to see random errors in a deployment procedure.

Thanks!

10:06:26 AM: Failed to get latest templates: Cannot read properties of undefined (reading 'resources')
10:07:04 AM mycompany-dev-integrations-func: Starting deployment...
10:07:05 AM mycompany-dev-integrations-func: Creating zip package...
10:07:14 AM mycompany-dev-integrations-func: Zip package size: 25.2 MB
10:07:18 AM: Error: (intermediate value).parsedBody.map is not a function

And after reverting, as another commenter stated, to v1.10.4 (no restart of VS Code or anything, just an immediate deploy):

10:09:25 AM mycompany-dev-integrations-func: Starting deployment...
10:09:25 AM mycompany-dev-integrations-func: Creating zip package...
10:09:32 AM mycompany-dev-integrations-func: Zip package size: 25.2 MB
10:09:34 AM mycompany-dev-integrations-func: Updating submodules.
10:09:35 AM mycompany-dev-integrations-func: Preparing deployment for commit id '0d25c01201'.
10:09:35 AM mycompany-dev-integrations-func: Skipping build. Project type: Run-From-Zip
10:09:36 AM mycompany-dev-integrations-func: Skipping post build. Project type: Run-From-Zip
10:09:36 AM mycompany-dev-integrations-func: Triggering recycle (preview mode disabled).
10:09:36 AM mycompany-dev-integrations-func: Deployment successful.

Same here 😐

just restart VS code and it will work 😃

Happens to me as well, but randomly. Sometimes restarting the deployment process helps, but not reliably