Skip to content

Server 500 error on /parse/schemas #888

@rblalock

Description

@rblalock

Environment Setup

Parse server 2.1.4
Parse Dashboard 2.0.0
Heroku, and a dev server and prod server environment

Steps to reproduce

Deployed parse server and ran parse dashboard locally. It has no problem reading the schema from the development instance I setup but when I try to hit the production server I have I don't get anything back because the parse/schemas endpoint is always a 500. I can interact with the server though and it behaves appropriately. e.g. /parse/classes/Users, etc. But the schemas endpoint fails.

The only difference I can see between the two servers in Heroku is my production server uses https and my dev one does not.

Logs/Trace

2016-03-07T14:44:55.645275+00:00 app[web.1]: Uncaught internal server error. [TypeError: type.startsWith is not a function] TypeError: type.startsWith is not a function
2016-03-07T14:44:55.645325+00:00 app[web.1]:     at Object.mongoFieldTypeToSchemaAPIType (/app/node_modules/parse-server/lib/Schema.js:315:12)
2016-03-07T14:44:55.645329+00:00 app[web.1]:     at /app/node_modules/parse-server/lib/Routers/SchemasRouter.js:49:29
2016-03-07T14:44:55.645331+00:00 app[web.1]:     at mongoSchemaAPIResponseFields (/app/node_modules/parse-server/lib/Routers/SchemasRouter.js:48:29)
2016-03-07T14:44:55.645330+00:00 app[web.1]:     at Array.reduce (native)
2016-03-07T14:44:55.645331+00:00 app[web.1]:     at mongoSchemaToSchemaAPIResponse (/app/node_modules/parse-server/lib/Routers/SchemasRouter.js:62:13)
2016-03-07T14:44:55.645332+00:00 app[web.1]:     at Array.map (native)
2016-03-07T14:44:55.645333+00:00 app[web.1]:     at /app/node_modules/parse-server/lib/Routers/SchemasRouter.js:70:20
2016-03-07T14:44:55.645337+00:00 app[web.1]:     at run (/app/node_modules/parse-server/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:84:47)
2016-03-07T14:44:55.645338+00:00 app[web.1]:     at /app/node_modules/parse-server/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:95:28
2016-03-07T14:44:55.645338+00:00 app[web.1]:     at flush (/app/node_modules/parse-server/node_modules/babel-polyfill/node_modules/core-js/modules/_microtask.js:19:5)
2016-03-07T14:44:55.645340+00:00 app[web.1]:     at process._tickDomainCallback (node.js:389:13)
2016-03-07T14:44:55.645339+00:00 app[web.1]:     at nextTickCallbackWith0Args (node.js:419:9)
2016-03-07T14:44:55.645341+00:00 app[web.1]:     at process.wrappedFunction (/app/node_modules/newrelic/lib/transaction/tracer/index.js:245:51)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions