Skip to content
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

ampx sandbox invalid pointer #1804

Closed
p5 opened this issue Jul 31, 2024 · 5 comments
Closed

ampx sandbox invalid pointer #1804

p5 opened this issue Jul 31, 2024 · 5 comments
Labels
dependency Issue related to upstream dependency pending-triage Incoming issues that need categorization

Comments

@p5
Copy link

p5 commented Jul 31, 2024

Environment information

➜  amplify-gen2 git:(main) ✗ npx ampx info   
System:
  OS: Linux 6.8 Fedora Linux 40.20240730.0 (Silverblue)
  CPU: (24) x64 AMD Ryzen 9 7900X 12-Core Processor
  Memory: 23.81 GB / 31.07 GB
  Shell: /usr/bin/zsh
Binaries:
  Node: 22.3.0 - ~/Repos/<redacted>/developer-framework-poc/.devbox/nix/profile/default/bin/node
  Yarn: 1.22.22 - ~/Repos/<redacted>/developer-framework-poc/.devbox/nix/profile/default/bin/yarn
  npm: 10.8.1 - ~/Repos/<redacted>/developer-framework-poc/.devbox/nix/profile/default/bin/npm
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/auth-construct: 1.2.0
  @aws-amplify/backend: 1.0.4
  @aws-amplify/backend-auth: 1.1.0
  @aws-amplify/backend-cli: 1.2.1
  @aws-amplify/backend-data: 1.1.0
  @aws-amplify/backend-deployer: 1.0.2
  @aws-amplify/backend-function: 1.3.0
  @aws-amplify/backend-output-schemas: 1.1.0
  @aws-amplify/backend-output-storage: 1.0.2
  @aws-amplify/backend-secret: 1.0.0
  @aws-amplify/backend-storage: 1.0.4
  @aws-amplify/cli-core: 1.1.1
  @aws-amplify/client-config: 1.1.1
  @aws-amplify/deployed-backend-client: 1.1.0
  @aws-amplify/form-generator: 1.0.0
  @aws-amplify/model-generator: 1.0.2
  @aws-amplify/platform-core: 1.0.3
  @aws-amplify/plugin-types: 1.1.0
  @aws-amplify/sandbox: 1.1.1
  @aws-amplify/schema-generator: 1.2.0
  aws-amplify: 6.4.3
  aws-cdk: 2.150.0
  aws-cdk-lib: 2.150.0
  typescript: 5.5.4
AWS environment variables:
  AWS_DEFAULT_REGION = eu-west-1
  AWS_REGION = eu-west-1
  AWS_CREDENTIAL_EXPIRATION = 2024-07-31T11:21:25Z
  AWS_VAULT = eng-platform-sandbox
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Description

After trying to create the project created through the manual quickstart guide, I receive errors preventing me from deploying to the sandbox. There were no code changes made, and no package versions updated between generating the project and deploying.

I would appreciate it if somebody could assist with this issue. Thank you!

To reproduce, follow instructions in the manual installation quickstart guide:

  • npm create amplify@latest
  • cd <directory>
  • npx ampx sandbox
  • See error

Please find the full log below:

(devbox) ➜  main git:(main) ✗ rm -rf amplify-gen2 
(devbox) ➜  main git:(main) npm create amplify@latest           

> npx
> create-amplify

? Where should we create your project? aws-amplify-gen2

Installing devDependencies:
 - @aws-amplify/backend
 - @aws-amplify/backend-cli
 - aws-cdk@^2
 - aws-cdk-lib@^2
 - constructs@^10.0.0
 - typescript@^5.0.0
 - tsx
 - esbuild

Installing dependencies:
 - aws-amplify

✔ DevDependencies installed
✔ Dependencies installed
✔ Template files created
Successfully created a new project!

Welcome to AWS Amplify!
Navigate to your project directory using cd ./aws-amplify-gen2 and then:
 - Get started by running npx ampx sandbox.
 - Run npx ampx help for a list of available commands.

Amplify collects anonymous telemetry data about general usage of the CLI. Participation is optional, and you may opt-out by using npx ampx configure telemetry disable. To learn more about telemetry, visit https://docs.amplify.aws/react/reference/telemetry

(devbox) ➜  main git:(main) ✗ AWS_PAGER= aws sts get-caller-identity   
{
    "UserId": "AROATODLAWJMRDIGEMBBN:<redacted>@<redacted>",
    "Account": "<redacted>",
    "Arn": "arn:aws:sts::<redacted>:assumed-role/AWSReservedSSO_SandboxUserAccess_5380af32b46e894c/<redacted>@<redacted>"
}
(devbox) ➜  main git:(main) ✗ cd aws-amplify-gen2                      
(devbox) ➜  aws-amplify-gen2 git:(main) ✗ npx ampx sandbox         
Both the legacy 'AWS_DEFAULT_REGION' and preferred 'AWS_REGION' environment variables detected. Using 'AWS_REGION'
  
  Amplify Sandbox
  
  Identifier:   admin
  Stack:        amplify-awsamplifygen2-admin-sandbox-cc54c2a9d2
  
  To specify a different sandbox identifier, use --identifier
free(): invalid pointer
[1]    73430 IOT instruction (core dumped)  npx ampx sandbox

(devbox) ➜  aws-amplify-gen2 git:(main) ✗ npx ampx sandbox --debug
[INFO] 2024-07-31T09:35:47.727Z: Both the legacy 'AWS_DEFAULT_REGION' and preferred 'AWS_REGION' environment variables detected. Using 'AWS_REGION'
[INFO] 2024-07-31T09:35:47.989Z:   
  Amplify Sandbox
  
[INFO] 2024-07-31T09:35:47.989Z:   Identifier:  admin
[INFO] 2024-07-31T09:35:47.989Z:   Stack:       amplify-awsamplifygen2-admin-sandbox-cc54c2a9d2
[INFO] 2024-07-31T09:35:47.989Z:   
  To specify a different sandbox identifier, use --identifier
free(): invalid pointer
[1]    76539 IOT instruction (core dumped)  npx ampx sandbox --debug
@p5 p5 added the pending-triage Incoming issues that need categorization label Jul 31, 2024
@moleCuleFFF
Copy link

+1 on Ubuntu 22.04 running in WSL2

@josefaidt
Copy link
Contributor

Hey @p5 and @moleCuleFFF 👋 thanks for raising this! This is an interesting error, and I found a thread with a similar message in the Node.js repo nodejs/node#21845. In the thread it mentions a relation to OpenSSL, or perhaps an outdated C/C++ lib. @p5 are you also running linux in WSL?

@josefaidt josefaidt added the pending-response Issue is pending response from author label Jul 31, 2024
@p5
Copy link
Author

p5 commented Jul 31, 2024

Hey @p5 and moleCuleFFF 👋 thanks for raising this! This is an interesting error, and I found a thread with a similar message in the Node.js repo nodejs/node#21845. In the thread it mentions a relation to OpenSSL, or perhaps an outdated C/C++ lib. @p5 are you also running linux in WSL?

Thanks for looking into this.
I am not using WSL - I am using the latest available version of Fedora Workstation, with NodeJS being managed via Nix.

Both Fedora and Nix tend to keep their dependencies fairly up-to-date, but will take a look to see which exact versions are being used when I get back to my machine this evening.

@github-actions github-actions bot removed the pending-response Issue is pending response from author label Jul 31, 2024
@josefaidt josefaidt added the dependency Issue related to upstream dependency label Aug 1, 2024
@moleCuleFFF
Copy link

moleCuleFFF commented Aug 1, 2024

We "fixed" this by rolling Node back to v20 from v22, hope that's helpful :)

@p5
Copy link
Author

p5 commented Aug 6, 2024

Thanks! Can confirm this worked for us too.

I guess there should be t least a tracking issue for supporting Node v22, since it will be LTS in about two months. I'm sure more people would be interested as LTS comes closer.

Will close this issue as "Fixed" and create a tracker issue if there's not one already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Issue related to upstream dependency pending-triage Incoming issues that need categorization
Projects
None yet
Development

No branches or pull requests

3 participants