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

Cannot read property 'name' of undefined when amplify publish #12495

Closed
2 tasks done
xalepo4 opened this issue Apr 18, 2023 · 9 comments
Closed
2 tasks done

Cannot read property 'name' of undefined when amplify publish #12495

xalepo4 opened this issue Apr 18, 2023 · 9 comments
Assignees
Labels
hosting Issues tied to hosting category investigating This issue is being investigated pending-triage Issue is pending triage

Comments

@xalepo4
Copy link

xalepo4 commented Apr 18, 2023

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

16.15.0

Amplify CLI Version

11.0.5

What operating system are you using?

Ubuntu 22.04

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No

Describe the bug

When run amplify publish after a long time appears the error Cannot read property 'name' of undefined.

Expected behavior

Publish the application to development/production site.

Reproduction steps

  1. Run amplify publish
  2. Wait for frontend compilation (Angular).
  3. After a long time appears the error: Cannot read property 'name' of undefined.

Project Identifier

94fea9fa9c2ef410fc180035881a9e8d

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@xalepo4 xalepo4 added the pending-triage Issue is pending triage label Apr 18, 2023
@ykethan ykethan added the hosting Issues tied to hosting category label Apr 18, 2023
@josefaidt
Copy link
Contributor

Hey @xalepo4 👋 thanks for raising this! As we begin to look at this in more depth would you mind re-running this command with --debug and post the stack trace output?

@josefaidt josefaidt added the pending-response Issue is pending response from the issue author label Apr 18, 2023
@xalepo4
Copy link
Author

xalepo4 commented Apr 18, 2023

Hello @josefaidt , I attach here the debug logs.
debug.txt

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Apr 18, 2023
@josefaidt
Copy link
Contributor

Hey @xalepo4 thanks for posting that! Copying here for reference

✔ Zipping artifacts completed.
⠋ Deploying build artifacts to the Amplify Console..Job Timeout before succeeded
✖ Deployment failed! Please report an issue on the Amplify Console GitHub issue tracker at https://github.com/aws-amplify/amplify-console/issues.
🛑 Cannot read property 'name' of undefined

Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report'
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

UnknownFault: Cannot read property 'name' of undefined
    at genericErrorToAmplifyException (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/amplify-exception-handler.js:125:49)
    at handleException (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/amplify-exception-handler.js:26:28)
    at process.<anonymous> (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:48:93)
    at process.emit (events.js:400:28)
    at processEmit [as emit] (/snapshot/repo/build/node_modules/signal-exit/index.js:199:34)
    at process._fatalException (internal/process/execution.js:167:25)

Cannot read property 'name' of undefined
TypeError: Cannot read property 'name' of undefined
    at Object.publish (/snapshot/repo/build/node_modules/@aws-amplify/amplify-console-hosting/lib/index.js:46:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/amplify-frontend-javascript/lib/publisher.js:41:5)
    at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/commands/publish.js:39:9)
    at async Object.executeAmplifyCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:189:9)
    at async executePluginModuleCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:135:5)
    at async executeCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:33:9)
    at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:117:5)

Session Identifier: 7b4f486e-66dd-4d93-ab9b-280f7835a242

This appears to be erroring here https://github.com/aws-amplify/amplify-cli/blob/dev/packages/amplify-console-hosting/src/index.js#L39

Taking a further look at this one

@josefaidt josefaidt self-assigned this Apr 18, 2023
@josefaidt josefaidt added the investigating This issue is being investigated label Apr 18, 2023
@xalepo4
Copy link
Author

xalepo4 commented Apr 19, 2023

Hello @josefaidt, I try to upload manually the zip to the Amplify web interface and it stucks at 70% always so it's possible that the problem are not on the cli.

@josefaidt
Copy link
Contributor

Hey @xalepo4 apologies for the delay here. How large is the build artifact for your site?

@josefaidt josefaidt added the pending-response Issue is pending response from the issue author label May 1, 2023
@josefaidt
Copy link
Contributor

Hey @xalepo4 are you still experiencing this?

@xalepo4
Copy link
Author

xalepo4 commented May 9, 2023

Hello, after receive support AWS team the problem with my account was solved. Thanks.

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label May 9, 2023
@josefaidt
Copy link
Contributor

Glad to hear you're back up and running! I'll close this issue for now but in the event this resurfaces please do not hesitate to reach out!

@github-actions
Copy link

github-actions bot commented May 9, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hosting Issues tied to hosting category investigating This issue is being investigated pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

3 participants