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

Why I cannot batch delete one row? #3421

Closed
kevinlee85 opened this issue Jan 23, 2017 · 7 comments
Closed

Why I cannot batch delete one row? #3421

kevinlee85 opened this issue Jan 23, 2017 · 7 comments

Comments

@kevinlee85
Copy link

kevinlee85 commented Jan 23, 2017

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!

You're running version >=1.0.21 of Parse Dashboard.

You're running version >=2.2.24 of Parse Server.

You've searched through existing issues. Chances are that your issue has been reported or resolved before.

Environment Setup

I host my parse-server by Heroku. I setup parse-dashboard on my owned computer.
I can query my DB, but cannot delete any row.
That means my POST of path is correct, but delete batch with wrong path mount.
My Dashboard config is:
"serverURL": "http://propassional.herokuapp.com/parse"

My Parse Server config is:
var api = new ParseServer({
databaseURI: databaseUri,
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID || 'myAppId',
masterKey: process.env.MASTER_KEY || '', //Add your master key here. Keep it secret!
fileKey: process.env.FILEKEY_PROPASSIONAL,
serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse', // Don't forget to change to https if needed
filesAdapter: new S3Adapter(

),
// Enable email verification
verifyUserEmails: true,
// email verify token below expires in 2 hours (= 2 * 60 * 60 == 7200 seconds)
emailVerifyTokenValidityDuration: 2 * 60 * 60,
// set preventLoginWithUnverifiedEmail to false to allow user to login without verifying their email
// set preventLoginWithUnverifiedEmail to true to prevent user from login if their email is not verified
preventLoginWithUnverifiedEmail: false, // defaults to false
// The public URL of your app.
// This will appear in the link that is used to verify email addresses and reset passwords.
// Set the mount path as it is in serverURL
publicServerURL: 'http://propassional.herokuapp.com/parse',
// Your apps name. This will appear in the subject and body of the emails that are sent.
appName: 'PROPASSIONAL',
// The email adapter
liveQuery: {
classNames: ["Posts", "Comments"] // List of classes to support for query subscriptions
}
});
// Client-keys like the javascript key or the .NET key are not necessary with parse-server
// If you wish you require them, you can set them as options in the initialization above:
// javascriptKey, restAPIKey, dotNetKey, clientKey

var app = express();

// Serve static assets from the /public folder
app.use('/public', express.static(path.join(__dirname, '/public')));

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

Steps to reproduce

Logs/Trace

2017-01-23T03:32:14.028955+00:00 heroku[router]: at=info method=POST path="/parse/classes/test" host=propassional.herokuapp.com request_id=f25641cb-76d1-4cf4-a1fa-d829a06d1ae7 fwd="106.186.20.78" dyno=web.1 connect=1ms service=10ms status=200 bytes=648
2017-01-23T03:32:17.820916+00:00 app[web.1]: �[31merror�[39m: Error handling request: ParseError {
2017-01-23T03:32:17.820930+00:00 app[web.1]: code: 107,
2017-01-23T03:32:17.820931+00:00 app[web.1]: message: 'cannot route batch path /propassional.herokuapp.com/classes/test/UMERFB23Yc' } code=107, message=cannot route batch path /propassional.herokuapp.com/classes/test/UMERFB23Yc
2017-01-23T03:32:17.822589+00:00 app[web.1]: [object Object]
Note: If you get a browser JS error please run npm run dev. This will provide source maps and a much more useful stack trace.

@kevinlee85
Copy link
Author

I noticed I cannot delete the row by Parse-Dashboard.

@kevinlee85
Copy link
Author

The Error message looks like that:
2017-01-23T07:18:29.458629+00:00 app[web.1]: �[31merror�[39m: Error handling request: ParseError { 2017-01-23T07:18:29.458646+00:00 app[web.1]: code: 107, 2017-01-23T07:18:29.458650+00:00 app[web.1]: message: 'cannot route batch path /propassional.herokuapp.com/classes/test/YlzFH8JzGd' } code=107, message=cannot route batch path /propassional.herokuapp.com/classes/test/YlzFH8JzGd

@natanrolnik
Copy link
Contributor

natanrolnik commented Jan 23, 2017

@kevinlee85 one tip: never post a database address, user and password on the internet

@kevinlee85
Copy link
Author

@natanrolnik Thank you.

@kevinlee85
Copy link
Author

I have found the root cause by myself. I have one heroku config var set as SERVER_URL which was pointed to my server link without mount path. I manually remove this config var, then the everthing works well.

@kevinlee85
Copy link
Author

Please close this issue. Sorry for disturbing.

@natanrolnik
Copy link
Contributor

Glad you found the reason!

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

2 participants