parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

Uncaught internal server error. Incorrect arguments undefined

Open maruthi-wal opened this issue 10 years ago • 1 comments

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 avatar Feb 25 '16 10:02 maruthi-wal

Hello Everyone,

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

maruthi-wal avatar Feb 25 '16 13:02 maruthi-wal