Open mehdi-blanchard opened 1 year ago
Hey @mehdi-blanchard, thank you for reaching out. I was hoping to get some additional information on this behaviour. Does installing a older version of the amplify CLI works as expected? could you run the following commands.
npm uninstall -g @aws-amplify/cli
or amplify uninstall
npm i @aws-amplify/cli@10.0.0
amplify status
or amplify -v
if the commands work, could you then run amplify upgrade
and test the commands. Do let us know if the older CLI works as expected and if doing an upgrade experiences similar behaviour.
Hey @ykethan,
I have uninstalled it and re-installed it using: npm i -g @aws-amplify/cli@10.0.0, then restarted the terminal and still nothing happens when I run the commands 'amplify version', 'amplify status' or 'amplify upgrade':
Do you know if the "install -g" should be run as Administrator, or does everything goes only in the user's %appdata% folder?
As I am not an Admin on my machine if something is supposed to be written in the Program Files folder it will not work.
However if I ran the install as an Admin, then whatever is supposed to go on the %appdata% folder goes into the admin user %appdata%, and not my %appdata% folder, so I need to copy the amplify stuff from Admin to my folder. However I could be missing things in the process, as I don't know the full extent of what I need to copy.
Hey @ykethan
The issue seems to be related to being a non-admin user.
If I run CMD as Administrator, I can install the CLI and I can run "amplify version"
However it doesn't work when I switch back to my non-admin CMD.
I tried copying the Amplify content from the admin user AppData/Roaming into my AppData/Roaming (I am pretty sure that's how I got it to work the first time), I also tried re-installing on top as well in my non admin CMD, but it still doesn't work.
Not sure what else I could try...
Hey @mehdi-blanchard , thank you for the information. could you let us know if NPM was installed as Administrator? If NPM was installed as Administrator and Amplify CLI was installed as non Administrator the Amplify CLI may run into the unexpected behaviour. Could you try reinstalling NPM and Amplify CLI without Administrator privileges and test the Amplify commands?
Hi @ykethan Still not working unfortunately. I have uninstalled Node.js, then downloaded the Node.js binary, copied it in my C:\ProgramData and updated the %PATH%. So no install with admin rights for Node.js now and the latest npm came with it. Reinstalled amplify with: npm i -g @aws-amplify/cli@10.0.0 (also tried latest)
Same result as before. Unless there is something else I could try, is there any ways to get logs or debug this to see where it's failing?
Hey @ykethan,
I navigated to my user folder and found a '.amplify' folder. In this folder there is a 'bin' folder with 'amplify.exe'. I clicked it on it and got a message that this app was blocked (our network uses AppLocker)! So for some reason something in this app triggers AppLocker. When it runs through the amplify scripts the alert message does not show up, so I couldn't know it was blocked. I now have to wait for IT to unlock it, and when it's done I'll post the result.
Hey @mehdi-blanchard, interesting and great callout. I tested this in my windows PC and was able to run amplify.exe
. Please do let us know if this mitigates the issue.
Hey @ykethan Thanks for the support. Everything is working as expected now that the AppLocker authorization has been accepted. Next time I update Amplify I might have the same issue as I am not sure if AppLocker uses the Program Hash or the file location. At least I'll know how to fix it.
Hi @ykethan I just had some feedback from the IT team: "Currently if an application is not signed, we only use the file hash for allowing apps to run. We can take their signature and that one rule will allow anything signed to run. It attaches their cert to the app so it can be verified as legit. We have had quite a few successes with reaching out to the software vendor and requesting them to sign their apps"
This means that as long as the App is not signed, then I can't update unless I don't need to use it for a few days to allow for the re-approval process.
Not sure if other users are having the same issues or if signing the App is an option but I just wanted you to know. You can close this issue as I had to Reopen it to leave the comment.
Before opening, please confirm:
How did you install the Amplify CLI?
npm install -g @aws-amplify/cli
If applicable, what version of Node.js are you using?
v16.14.2
Amplify CLI Version
@newest
What operating system are you using?
Windows 10 Enterprise
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Amplify Categories
auth, function, api, hosting
Amplify Commands
Not applicable
Describe the bug
Everything was working fine prior to the update. Can't remember exactly which version it was but I think it was 2 versions below current. After upgrading, running any amplify command returns nothing (Ex: amplify version, amplify status). This is similar to this issue but on Windows: https://github.com/aws-amplify/amplify-cli/issues/10193
I am not an administrator on my machine. I tried to run the following
npm install -g @aws-amplify/cli
npm install -g @aws-amplify/cli@7 --force (there was a timeout issue and it didn't work)
npm install -g @aws-amplify/cli@8 --force (same issue)
npm install -g @aws-amplify/cli@9 --force (same issue
I got IT to open a CMD as administrator. I ran the same commands with no luck. I was copying the relevant files and folders from %appdata%\npm
Expected behavior
If I type 'amplify version' or 'amplify status', I expect the command to run normally.
After 'upgrade' it returns nothing at all
Reproduction steps
npm install -g @aws-amplify/cli
GraphQL schema(s)
Project Identifier
'amplify diagnose' does not return anything like the other commands
Log output
Additional information
No response