Skip to content

ERROR: Extra data: line 1 column 1253 (char 1252) when running az functionapp deploy with --type zip #32443

@ashleysommer

Description

@ashleysommer

Describe the bug

Error when running az functionapp deploy with --type zip

ERROR: Extra data: line 1 column 1253 (char 1252)

The CLI tool is getting unexpected content in one the JSON payloads it gets back from one of the deploy endpoints.
I suspect it is related to #30960

Related command

az functionapp deploy --subscription $SUBSCRIPTION_URL --name my-fn-app --resource-group my-real-rg --type zip --src-url $APP_URL --async false

Errors

WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
WARNING: Initiating deployment
WARNING: Deploying from URL: https://mycontainer.blob.core.windows.net/app-package-my-fn-a3f36a2/released-package.zip?se=2025-11-22T04%3A43%3A51Z&sp=r&sv=2022-11-02&sr=b&skoid=***&sktid=***&skt=2025-11-21T04%3A43%3A58Z&ske=2025-11-22T04%3A43%3A51Z&sks=b&skv=2022-11-02&sig=***

ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: Extra data: line 1 column 1253 (char 1252)

Traceback (most recent call last):
  File "/opt/az/lib/python3.13/site-packages/requests/models.py", line 976, in json
    return complexjson.loads(self.text, **kwargs)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.13/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "/opt/az/lib/python3.13/json/decoder.py", line 348, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 1253 (char 1252)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.13/site-packages/azure/cli/command_modules/appservice/custom.py", line 8441, in perform_onedeploy_functionapp
    return _perform_onedeploy_internal(params)
  File "/opt/az/lib/python3.13/site-packages/azure/cli/command_modules/appservice/custom.py", line 8850, in _perform_onedeploy_internal
    response = _make_onedeploy_request(params)
  File "/opt/az/lib/python3.13/site-packages/azure/cli/command_modules/appservice/custom.py", line 8813, in _make_onedeploy_request
    state = response.json().get("properties", {}).get("provisioningState")
            ~~~~~~~~~~~~~^^
  File "/opt/az/lib/python3.13/site-packages/requests/models.py", line 980, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Extra data: line 1 column 1253 (char 1252)
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

Issue script & Debug output

Full debug log showing exact cause is here:

https://gist.github.com/ashleysommer/976b1d90d0e10396bcc4487eea5c9f4a

Expected behavior

I expect the zip file will be deployed to the functionapp.

Environment Summary

az built-in CLI tool in Github Actions

Additional context

This is a similar, related bug: #30960
It shows there is extra HTML being delivered along with the JSON payload from the deploy REST endpoint. I suspect that is the bug that is triggering this CLI error.

Metadata

Metadata

Labels

Auto-AssignAuto assign by botFunctionsaz functionappPossible-SolutionService AttentionThis issue is responsible by Azure service team.Similar-Issueact-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions