19

When I try to run any Ionic CLI commands that require login I get a 404 error.

Here's the command line....

? Password: [hidden]
Request: POST https://api.ionic.io/login
Response: 404
Body: 
{ link: null,
  message: 'No user found by that email',
  type: 'NotFound' }

I am definitely entering the correct account details, to ensure this I even created several new accounts at https://dashboard.ionicjs.com/signup, ensured I had validated the email address but still the same error.

(I have just lost 8 hours to this problem so am posting Q&A here to help others.)

3
  • Also got a similar issue but with 410: Request: POST https://api.ionic.io/login, Response: 410, Body: {}. Solved with changing to the pro backend as well.
    – edmundo096
    Feb 23, 2018 at 7:19
  • @edmundo096 I have the same issue with the 410. Can you explain better what you mean with changing to the pro backend? Thanks! Mar 21, 2018 at 7:31
  • @MauricioTogneri I mean, using the solution of Martin: ionic config set backend pro -g
    – edmundo096
    Mar 21, 2018 at 23:34

2 Answers 2

58

This error is due to the fact that Ionic are transitioning to "Ionic Pro" and the CLI needs to use the correct API. The fact that it is attempting to post login requests to api.ionic.io/login shows it's trying to use the old legacy system. You configure which system it uses by setting the backend value in the config.

To Fix:

Firstly, make sure your Ionic CLI is bang up-to-date.

Check the version:

ionic cli -v

It should be 3.9.2 at time of writing. If not update it:

npm install -g ionic@latest 

Now you've got the latest CLI you need to tell it to use "pro" not legacy:

ionic config set backend pro -g

NOTE: When I did this on my machine it did not work at first and I still got the same "No user found" error. I actually had to switch the backend to "legacy" first (using that same command) and then back to "pro". I have no idea why this fixed it but it did.

1
  • 5
    Thanks, btw ionic cli -v didn't worked for me, but ionic -v works.
    – Joyal
    Aug 30, 2017 at 7:11
-7

Assuming you have already installed git in windows...

1) Control Panel > System > Edit the system variables

2) System Properties > Advanced (Tab) > Environment Variables (Bottom of tab)

3) System Variables > New

Variable Name: ssh-keygen

Variable Value C:\Program Files\Git\git-cmd

Click ok

4) Close and restart you CMD/Shell Window

4) in the CMD window type ionic login

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.