Ionic无法登录请求:POST https://api.ionic.io/login该电子邮件未找到任何用户

时间:2017-08-25 16:05:34

标签: ionic-framework ionic-cli

当我尝试运行任何需要登录的Ionic CLI命令时,我收到404错误。

这是命令行......

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

我肯定会输入正确的帐户详细信息,以确保我甚至在https://dashboard.ionicjs.com/signup创建了几个新帐户,确保我已验证了电子邮件地址但仍然出现同样的错误。

(我刚刚在这个问题上失去了8个小时,所以我在这里发布Q& A来帮助其他人。)

2 个答案:

答案 0 :(得分:56)

此错误是由于Ionic正在转换为“Ionic Pro”并且CLI需要使用正确的API。它试图向renderContent(source) { let content; switch (source) { case 'bbc': case 'cnn': case 'reuters': content = <Guide key={source} source={source}/>; break; case 'medium': content=null; break; default: content = null; break; } return content; } render() { let {source} = this.props; return this.renderContent(source); } 发布登录请求的事实表明它正在尝试使用旧的遗留系统。您可以通过在配置中设置#include <iostream> #include <vector> #include <fstream> #include <SDL.h> #include <glad/glad.h> using namespace std; // the application will close after this amount of time const float MILISECONDS_TO_CLOSE = 10 * 1000; int main(int argc, char** argv) { SDL_Init(SDL_INIT_EVERYTHING); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); SDL_Window* window = SDL_CreateWindow( "tracer", 100, 100, 800, 600, SDL_WINDOW_OPENGL ); SDL_GLContext context = SDL_GL_CreateContext(window); // SDL_GL_SetSwapInterval(1); // this line mitigates the problem but just slightly if (!gladLoadGL()) { cout << "gladLoadGL failed" << endl; } const GLubyte *oglVersion = glGetString(GL_VERSION); std::cout << "This system supports OpenGL Version: " << oglVersion << std::endl; const GLubyte *gpuVendor = glGetString(GL_VENDOR); std::cout << "Graphics card: " << gpuVendor << std::endl; glClearColor(0.15f, 0.15f, 0.15f, 1.0f); vector<unsigned> deltas; deltas.reserve(10 * MILISECONDS_TO_CLOSE); static unsigned firstTime, prevTime, curTime; firstTime = prevTime = curTime = SDL_GetTicks(); while (true) { // compute delta time curTime = SDL_GetTicks(); unsigned dt = curTime - prevTime; prevTime = curTime; deltas.push_back(dt); // close the application after some time if (curTime - firstTime > MILISECONDS_TO_CLOSE) break; // handle closing events SDL_Event event; if (SDL_PollEvent(&event)) { if (event.type == SDL_KEYDOWN && event.key.keysym.sym == SDLK_ESCAPE || event.type == SDL_QUIT) break; } glClear(GL_COLOR_BUFFER_BIT); SDL_GL_SwapWindow(window); } // save recorded deltas to a file fstream f("out.txt", ios::out | ios::trunc); for (unsigned dt : deltas) f << dt << endl; f << flush; f.close(); return 0; } 值来配置它使用的系统。

修复:

首先,确保您的Ionic CLI是最新的。

检查版本:

api.ionic.io/login

撰写本文时应为3.9.2。如果没有更新它:

backend

现在您已经获得了最新的CLI,告诉它使用“pro”而不是遗产:

ionic cli -v

注意:当我在我的计算机上执行此操作时,它首先无法正常工作,但我仍然遇到“No user found”错误。我实际上必须首先将后端切换为“legacy”(使用相同的命令),然后再返回“pro”。我不知道为什么要修复它,但确实如此。

答案 1 :(得分:-7)

假设你已经在windows中安装了git ......

1)控制面板&gt;系统&gt;编辑系统变量

2)系统属性&gt;高级(Tab)&gt;环境变量(标签底部)

3)系统变量&gt;新

变量名称:ssh-keygen

变量值C:\ Program Files \ Git \ git-cmd

点击确定

4)关闭并重新启动CMD / Shell窗口

4)在CMD窗口中键入ionic login