amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

` amplify diagnose --send-report` fails to send zip on windows

Open PeteDuncanson opened this issue 2 years ago • 8 comments

Before opening, please confirm:

  • [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • [X] I have searched for duplicate or closed issues.
  • [X] I have read the guide for submitting bug reports.
  • [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • [X] I have removed any sensitive information from my code snippets and submission.

How did you install the Amplify CLI?

No response

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

No response

Amplify CLI Version

v10.0.0

What operating system are you using?

Windows

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

No

Amplify Categories

Not applicable

Amplify Commands

Not applicable

Describe the bug

Tried the new way to send debug data to you but it seems to report that it failed to send the Zip so I don't get a Project Identifier to add to issues.

image

Expected behavior

Zip sends and it displays my Project Identifier or it reports why it can't so I can fix it.

Reproduction steps

Simply ran amplify diagnose --send-report in the root of my application within a Windows Terminal run as admin.

GraphQL schema(s)

# Put schemas below this line


Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

PeteDuncanson avatar Sep 07 '22 12:09 PeteDuncanson

hey @PeteDuncanson, thank you for reaching out. I tested the flow in my windows PC by created a new folder named Franchise-Manager and then initialized a new amplify app. I tried using the CMD and powershell with both admin and without admin privileges but was unable to replicate the issue by running the amplify diagnose --send-report command.

could you provide us the logs after running the amplify diagnose --send-report command on your terminal? the logs for amplify can found at C:\Users\<username>\.amplify\logs. could you also confirm the windows version and terminal being used(example: CMD, powershell)

ykethan avatar Sep 07 '22 15:09 ykethan

Hey @ykethan,

I'm using Windows Terminal (https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-gb&gl=gb) run under admin rights.

Log today is pretty sparse though after re-running it just now:

2022-09-08T09:14:37.883Z|info : amplify diagnose core  {"send-report":true,"yes":false}
2022-09-08T09:14:37.953Z|info : amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}

Let me know if there is anything else I can do/share with you to help work this one out. Up for a screenshare if needed.

PeteDuncanson avatar Sep 08 '22 09:09 PeteDuncanson

Hey @PeteDuncanson, thank you for the information. I tested this in a windows terminal(environment: windows 11) but was unable to replicate the issue.

image image

Additionally, windows now allows users to add different terminals in one window. image

Could you test the command in a different terminal such as powershell or command prompt? Additionally, I wanted to confirm if this occurs in a specific project. For a quick test could you create a sample amplify application in a new directory and run amplify diagnose --send-report

ykethan avatar Sep 08 '22 14:09 ykethan

@ykethan ive not created a new amplify project in over a year. Is there a cheat sheet somewhere or a quick how to for spinning one up for testing like this?

PeteDuncanson avatar Sep 08 '22 14:09 PeteDuncanson

Hey @PeteDuncanson, I would glad in assisting you.

  1. change the directory to a new folder different from your present Amplify project folder.
  2. run amplify init
  3. run amplify diagnose --send-report

ykethan avatar Sep 08 '22 14:09 ykethan

@ykethan thanks for that :)

As suspected, it worked as it should!

image

So what to try next? Personally I'm not all that bothered about it being broken but the developer in me doesn't like that its broken and not reporting why.

PeteDuncanson avatar Sep 08 '22 15:09 PeteDuncanson

Hey @PeteDuncanson, thank you for your patience. On testing multiple scenarios in my Amplify application, I was able to replicate the diagnose failure by removing the backend-config.json and then run the diagnose command. But the diagnose command does throw an error providing information on the missing file.

image

For a quick test, could you copy the amplify folder to a different directory. Then delete the amplify folder and pull the backend using the amplify pull command. Could you then run the diagnose command to test if there may be any failures. If the command does not fail, we could check the difference between the amplify folders and check for missing files or attributes.

ykethan avatar Sep 12 '22 18:09 ykethan

hey @PeteDuncanson, following up on this. Please do let us know if you require any assistance.

ykethan avatar Sep 19 '22 14:09 ykethan

closing the issue due to inactivity

ykethan avatar Oct 05 '22 20:10 ykethan