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

Uncaught internal server error. Incorrect arguments undefined #647

Closed
maruthi-wal opened this issue Feb 25, 2016 · 1 comment
Closed

Uncaught internal server error. Incorrect arguments undefined #647

maruthi-wal opened this issue Feb 25, 2016 · 1 comment

Comments

@maruthi-wal
Copy link

Hello All,

Iam getting below error while i tried to login.

"Uncaught internal server error. Incorrect arguments undefined" in parse server command prompt.
{"code":1,"message":"Internal server error."} in curl command prompt.

Could some one please help me how to fix this issue.

please find below for my parse server code in index.js

var express = require('express');
var ParseServer = require('parse-server').ParseServer;

var databaseUri = process.env.DATABASE_URI || process.env.MONGOLAB_URI;

if (!databaseUri) {
console.log('DATABASE_URI not specified, falling back to localhost.');
}

var api = new ParseServer({
databaseURI: 'mongodb://MY_IP:PORT/DB_NAME',
cloud: __dirname + '/cloud/main.js',
appId: 'Key',
masterKey: 'Key',
clientKey: 'key',
restAPIKey: 'key',
serverURL: 'http://my_IP/parse'
});

NOTE; 'KEY' means i have given parse keys which are available in parse dashboard.

var app = express();

// Serve the Parse API on the /parse URL prefix
var mountPath = '/parse';
app.use(mountPath, api);

// Parse Server plays nicely with the rest of your web routes
app.get('/', function(req, res) {
res.status(200).send('I dream of being a web site.');
});

var port = process.env.PORT || 1317;
app.listen(port, function() {
console.log('parse-server-example running on port ' + port + '.');
});

Please find the CURL command:

curl -X GET -H "X-Parse-Application-Id: key" -H "X-Parse-REST-API-Key: key" -H "X-Parse-Revocable-Session: 1" -G --data-urlencode 'username=username' --data-urlencode 'password=password' https://MY_IP/parse/login

Thanks,
Maruthi.

@maruthi-wal
Copy link
Author

Hello Everyone,

It's working for me now.. Just changed the DB and it is working

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

1 participant