Skip to content

Failure on user creation #3160

Description

@kostiag

The following code results in:

Error generating response. ParseError { code: 101, message: 'Invalid username/password.' } code=101, message=Invalid username/password. - This is expected.

this I cannot figure out. it is almost as if the reason for 2nd failure is that it occurs right after first?
Removing the first failure allows creation to succeed.

[object Object]
/opt/bitnami/apps/parse/htdocs/node_modules/parse-server/lib/ParseServer.js:401
throw err;
^

Error: EACCES: permission denied, open '/opt/bitnami/apps/parse/htdocs/logs/parse-server.err.2016-12-02'
at Error (native)
error: Forever detected script exited with code: 7
error: Script restart attempt #1

` request.get({
url: SERVER_NAME + '/parse/login',
qs: {
username: username,
password: PARSE_USER_PASSWORD
},
headers: {
'X-Parse-Application-Id': PARSE_APP_ID,
'X-Parse-REST-API-Key': PARSE_API_KEY
}
},
function (err, response, body) {
if (err) return callback(err);
// user was found, add sessionToken to user profile
if (response.statusCode === 200) {
user.parse_session_token = JSON.parse(body).sessionToken;
return callback(null, user, context);
}

// Not found. Likely the user doesn’t exist, we provision one
if(response.statusCode === 404) {
//DOING THIS BY ITSELF WORKS
request.post({
url: SERVER_NAME + '/parse/users',
json: {
username: username,
password: PARSE_USER_PASSWORD,
email: email,
emailVerified: true
},
headers: {
'X-Parse-Application-Id': PARSE_APP_ID,
'X-Parse-REST-API-Key': PARSE_API_KEY,
'Content-Type': 'application/json'
}

},`

Activity

  1. flovilmart commented on Dec 2, 2016

    @flovilmart
    Contributor

    That seems to be a problem with the logger that doesn't have write access to the logs folder.

  2. kostiag commented on Dec 2, 2016

    @kostiag
    Author

    This is just a side effect. The real issue that causes write to fail is login request followed by create request which actually fails.

  3. flovilmart commented on Dec 2, 2016

    @flovilmart
    Contributor

    If you in locally on your machine, does it fail?

  4. kostiag commented on Dec 2, 2016

    @kostiag
    Author

    running it as a bitnami installation on AWS. Have not tried locally. Just to make it clear running just second part: `request.post({
    url: SERVER_NAME + '/parse/users',
    json: {
    username: username,
    password: PARSE_USER_PASSWORD,
    email: email,
    emailVerified: true
    },
    headers: {
    'X-Parse-Application-Id': PARSE_APP_ID,
    'X-Parse-REST-API-Key': PARSE_API_KEY,
    'Content-Type': 'application/json'
    }
    })

    works. This was a suggested solution for Auth0 and Parse integration which seemed to have worked at some point at least on parse.com.

  5. flovilmart commented on Dec 2, 2016

    @flovilmart
    Contributor

    I believe this is an implementation detail that would be better suited for stackoverflow. Also, please run it locally as you don't know what's in the image you deployed.

    Can you run with VERBOSE=1 to gather the server logs?

  6. kostiag commented on Dec 2, 2016

    @kostiag
    Author

    Yeah, I am thinking starting over... not sure what else to try at this point. Do not see anything in the logs, but will try VERBOSE, but something is not being releases given that works as 1 call and fails as 2 one after another.

  7. flovilmart commented on Dec 2, 2016

    @flovilmart
    Contributor

    but something is not being releases given that works as 1 call and fails as 2 one after another.

    the server is fully stateless, the controls don't hold any state. I'm not sure what's going on for you. You should probably run it locally and with VERBOSE=1 to investigate further.

  8. kostiag commented on Dec 8, 2016

    @kostiag
    Author

    FIGURED IT OUT! permission on log file creation were throwing and error that was causing server to shut down and miss the second call. Thank you.

  9. ArMouReR commented on Feb 11, 2017

    @ArMouReR

    kostiag,
    Can you please share what you have actually did to fix this error ?

    Thanks...

  10. kostiag commented on Feb 11, 2017

    @kostiag
    Author

    so as reported in my original post I was getting errors while writing to log files. This was the cause of the future server errors. I changed permissions +w on log directory and/or log files.

  11. gate3 commented on May 15, 2018

    @gate3

    I am still having this issue. I am hosting on heroku, what i noiced is that the logs folder doesn't exist at all when I do heroku run bash. Any suggestions on how to fix this.

  12. flovilmart commented on May 16, 2018

    @flovilmart
    Contributor

    @gate3 the issue was closed over a year ago. Please open a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions