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

Validation failed #192

Open
jay-b opened this issue Nov 21, 2017 · 8 comments
Open

Validation failed #192

jay-b opened this issue Nov 21, 2017 · 8 comments

Comments

@jay-b
Copy link

jay-b commented Nov 21, 2017

I'm working with this example code from Josh Morony.

I realise this has been mentioned in an earlier issue before the code was updated, but I cannot seem to get this past this error using the latest code. Any ideas?

OPTIONS /auth/register 204 0.153 ms - 0 (node:91488) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: {"status":404,"name":"not_found","message":"missing","reason":"missing"} { error: 'Validation failed', validationErrors: Error: {"status":404,"name":"not_found","message":"missing","reason":"missing"} at /cloudo/server/node_modules/superlogin/lib/user.js:71:15 at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7), status: 400 } POST /auth/register 400 6.461 ms - 64

Response {_body: "{"error":"Validation failed","validationErrors":{},"status":400}", status: 400, ok: false, statusText: "Bad Request", headers: Headers, …} headers : Headers _headers : Map(1) {"content-type" => Array(1)} _normalizedNames : Map(1) {"content-type" => "content-type"} __proto__ : Object ok : false status : 400 statusText : "Bad Request" type : 2 url : "http://localhost:3000/auth/register" _body : "{"error":"Validation failed","validationErrors":{},"status":400}" __proto__ : Body

Node : v9.2.0
npm : 5.5.1

@silverbackvasco
Copy link

I've been looking for the past couple days as well for a solution to this. I have the exact same issue from tutorial. No idea how to solve this one but I'll carry on searching for a solution and post something here if I find it.

@silverbackvasco
Copy link

Ok. So for me the issue seemed to be a couple of things. I was using couch db 2 and saw in console it was causing a lot of errors for some reason. Looks like it's because im using a mac. I downgraded to couch 1.6 and the server started giving me the TypeError: The "digest" argument is required and must not be undefined at pbkdf2 (crypto.js:635:11) error which I fixed replacing the pwd file: colinskow/superlogin-demo#12.

@jay-b
Copy link
Author

jay-b commented Nov 30, 2017

Thanks for the update. Interesting that you can get this working using Couch 1.6. I'm using a Mac and Couch 2.1.1 as well but I get no such console errors. I've tried connecting to Cloudant and get the same validation error. Also tried the quick start example using Postman, same problems.

@silverbackvasco
Copy link

silverbackvasco commented Nov 30, 2017

I worked backwards with the superlogin quickstart by using the postman tool like you did. I don't think I made it clear my error wasn't in the app console it was the couch db console log.
screen shot 2017-11-30 at 19 58 56
Did you try replacing the couch-pwd file?

@ZmartifyPKR
Copy link

Any one who solved the issue mentioned in the first post?

@silverbackvasco
Copy link

Sorry if I wasn't clear about how I solved the issue. I replaced the index.js file in couch-pwd folder in node modules for the server. I just copied and pasted the whole contents to index.js file from here: https://github.com/zemirco/couch-pwd/blob/master/index.js

@silverbackdan
Copy link

A more stable way to resolve this is to update your package.json file couch-pwd dependency:
"couch-pwd": "github:zeMirco/couch-pwd"

Or use the current superlogin master branch.

This issue can be closed. Discussions are ongoing about continued support and a new release version for SL
#197

There is also another proposed solution here:
#191

@silverbackdan
Copy link

silverbackdan commented Feb 16, 2018

Original issue:
#64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants