-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON decode error #7216
Comments
Hey @cmyers009, can you provide some more details to help us reproduce the issue? I tried reproducing using the Python3.11 Hello World template but was unable to. It would be helpful if you could provide
|
The error is not entirely reproducable. It happened one time, when there were no changes to the template or deployment file. We ran the same deployment again, and it built and deployed successfully. Unfortunately, I can not share the template with you. It is not reproducable on my end, it just happens very rarely.
|
Apologies, but to be able to help determine the root cause/fix the issue, we need to be able to reproduce the error on our machines, if there is no example/steps to reproduce we can't help debug this issue. For now Ill close this issue, but if you are able to have an example that consistently fails, feel free to open another ticket |
|
Error: Expecting value: line 1 column 1 (char 0)
Traceback:
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/cli/cli_config_file.py", line 347, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/click/decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/telemetry/metric.py", line 185, in wrapped
raise exception # pylint: disable=raising-bad-type
^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/telemetry/metric.py", line 150, in wrapped
return_value = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/utils/version_checker.py", line 43, in wrapped
actual_result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/cli/main.py", line 95, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/commands/build/command.py", line 169, in cli
do_cli(
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/commands/build/command.py", line 258, in do_cli
ctx.run()
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/commands/build/build_context.py", line 284, in run
self._build_result = builder.build()
^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/build/app_builder.py", line 226, in build
return ApplicationBuildResult(build_graph, build_strategy.build())
^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/build/build_strategy.py", line 416, in build
return super().build()
^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/build/build_strategy.py", line 83, in build
result.update(self._build_functions(self._build_graph))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/build/build_strategy.py", line 422, in _build_functions
return self._run_builds_async(
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/build/build_strategy.py", line 438, in _run_builds_async
async_results = async_context.run_async()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/utils/async_utils.py", line 137, in run_async
return run_given_tasks_async(self._async_tasks, event_loop)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/utils/async_utils.py", line 96, in run_given_tasks_async
return event_loop.run_until_complete(_run_given_tasks_async(tasks, event_loop, executor))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/utils/async_utils.py", line 62, in _run_given_tasks_async
raise result
File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/build/build_strategy.py", line 449, in build_single_function_definition
return self._delegate_build_strategy.build_single_function_definition(build_definition)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/build/build_strategy.py", line 595, in build_single_function_definition
return self._cached_build_strategy.build_single_function_definition(build_definition)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/build/build_strategy.py", line 303, in build_single_function_definition
build_result = self._delegate_build_strategy.build_single_function_definition(build_definition)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/build/build_strategy.py", line 168, in build_single_function_definition
result = self._build_function(
^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/build/app_builder.py", line 723, in _build_function
return self._build_function_on_container(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/build/app_builder.py", line 982, in _build_function_on_container
response = self._parse_builder_response(stdout_data, container.image)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/setup-sam-Nes3v1/.venv/lib/python3.11/site-packages/samcli/lib/build/app_builder.py", line 1003, in _parse_builder_response
response = json.loads(stdout_data)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
An unexpected error was encountered while executing "sam build".
Search for an existing issue:
https://github.com/aws/aws-sam-cli/issues?q=is%3Aissue+is%3Aopen+Bug%3A%20sam%20build%20-%20JSONDecodeError
Or create a bug report:
https://github.com/aws/aws-sam-cli/issues/new?template=Bug_report.md&title=Bug%3A%20sam%20build%20-%20JSONDecodeError
Error: Expecting value: line 1 column 1 (char 0)
Traceback:
File "click/core.py", line 1078, in main
File "click/core.py", line 1688, in invoke
File "click/core.py", line 1434, in invoke
File "click/core.py", line 783, in invoke
File "samcli/cli/cli_config_file.py", line 347, in wrapper
File "click/decorators.py", line 92, in new_func
File "click/core.py", line 783, in invoke
File "samcli/lib/telemetry/metric.py", line 185, in wrapped
File "samcli/lib/telemetry/metric.py", line 150, in wrapped
File "samcli/lib/utils/version_checker.py", line 43, in wrapped
File "samcli/cli/main.py", line 95, in wrapper
File "samcli/commands/build/command.py", line 169, in cli
File "samcli/commands/build/command.py", line 258, in do_cli
File "samcli/commands/build/build_context.py", line 284, in run
File "samcli/lib/build/app_builder.py", line 226, in build
File "samcli/lib/build/build_strategy.py", line 416, in build
File "samcli/lib/build/build_strategy.py", line 83, in build
File "samcli/lib/build/build_strategy.py", line 422, in _build_functions
File "samcli/lib/build/build_strategy.py", line 438, in _run_builds_async
File "samcli/lib/utils/async_utils.py", line 137, in run_async
File "samcli/lib/utils/async_utils.py", line 96, in run_given_tasks_async
File "asyncio/base_events.py", line 654, in run_until_complete
File "samcli/lib/utils/async_utils.py", line 62, in _run_given_tasks_async
File "concurrent/futures/thread.py", line 58, in run
File "samcli/lib/build/build_strategy.py", line 449, in build_single_function_definition
File "samcli/lib/build/build_strategy.py", line 595, in build_single_function_definition
File "samcli/lib/build/build_strategy.py", line 303, in build_single_function_definition
File "samcli/lib/build/build_strategy.py", line 168, in build_single_function_definition
File "samcli/lib/build/app_builder.py", line 723, in _build_function
File "samcli/lib/build/app_builder.py", line 982, in _build_function_on_container
File "samcli/lib/build/app_builder.py", line 1003, in _parse_builder_response
File "json/init.py", line 346, in loads
File "json/decoder.py", line 337, in decode
File "json/decoder.py", line 355, in raw_decode
An unexpected error was encountered while executing "sam build".
Search for an existing issue:
https://github.com/aws/aws-sam-cli/issues?q=is%3Aissue+is%3Aopen+Bug%3A%20sam%20build%20-%20JSONDecodeError
Or create a bug report:
https://github.com/aws/aws-sam-cli/issues/new?template=Bug_report.md&title=Bug%3A%20sam%20build%20-%20JSONDecodeError
Error: Process completed with exit code 1.
The text was updated successfully, but these errors were encountered: