Comments (3)
Thanks for opening this issue, just want to confirm, is the SAM CLI being used the one that is provided in the runner, or is it a manual installation that you are using? Additionally, would it be possible to post more of the logs of the function that failed to build using the --debug
flag? It might be difficult to capture this since as you mentioned, it's not consistent behaviour.
Just to poke at the command/template a bit, would it be possible to build within a container environment (ie. --use-container
)?
from aws-sam-cli.
I encountered the same issue:
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](https://github.com/CloudBoltSoftware/mira-deployment-orchestration/actions/runs/9757836085/job/26931087142#step:32:422), 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.
This unexpected error occurred while executing the sam build.
Here's the command we are using in the GitHub action workflow:
sam build --template template.yaml --use-container
from aws-sam-cli.
also encountered same issue today.
from aws-sam-cli.
Related Issues (20)
- Bug: Docker 4.33 + Provided.al2 Image error HOT 9
- Bug: SAM Deployment Issue: Bootstrap File Not Found Despite Successful Build and Upload HOT 1
- Bug: sam pipeline init - ResourceNotFoundException HOT 1
- Bug: Official example for CDK is not working HOT 1
- Bug: Runtime.ImportModuleError for Typescript Lambda function defined using CDK HOT 2
- Feature request: Run Node tests as part of sam build HOT 2
- Bug: sam build --container-env-var is not working HOT 3
- Thumbprint of the AWS SAM Windows MSI installer does not match the documentation HOT 3
- Bug: ResourceDetailedStatus never returns as part of a cloudformation event HOT 3
- Bug: sam build -u stuck on mounting HOT 9
- Bug: sam local invoke HelloWorld lambda times out on Apple M1 Pro after Sonoma upgrade HOT 2
- Bug: sam validate fails for template using 1.122.0 or 1.223.0 HOT 4
- Feature request: Prune Old Versions HOT 2
- Bug: `sam build` Ignores Files in dist/ Directory When Specified in .gitignore HOT 2
- Bug: DBProxyTargetGroup Creation is very slow when using SAM deploy HOT 3
- Bug: sam build - JSONDecodeError HOT 1
- Bug: `sam init` error: "could not clone repo" (non-zero exit status 128) HOT 10
- Bug: parsing Ref in template.json is incorrect HOT 3
- Bug: sam validate - UnexpectedRuleException HOT 5
- Bug: Numpy In Lambda Layer HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sam-cli.