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

filesController sporadically missing in FilesRouter #1766

Closed
benishak opened this issue May 12, 2016 · 14 comments
Closed

filesController sporadically missing in FilesRouter #1766

benishak opened this issue May 12, 2016 · 14 comments

Comments

@benishak
Copy link
Contributor

benishak commented May 12, 2016

Env

  • ParseServer 2.2.9
  • AWS EC2 (Centos+Nginx)
  • Self-hosted MongoDB on AWS

Problem

error: Uncaught internal server error. [TypeError: Cannot read property 'getFileData' of undefined] TypeError: Cannot read property 'getFileData' of undefined
    at getHandler (/home/centos/apps/parse-server-dev/source/node_modules/parse-server/lib/Routers/FilesRouter.js:69:22)
    at Layer.handle [as handle_request] (/home/centos/apps/parse-server-dev/source/node_modules/parse-server/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/centos/apps/parse-server-dev/source/node_modules/parse-server/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/home/centos/apps/parse-server-dev/source/node_modules/parse-server/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/centos/apps/parse-server-dev/source/node_modules/parse-server/node_modules/express/lib/router/layer.js:95:5)
    at /home/centos/apps/parse-server-dev/source/node_modules/parse-server/node_modules/express/lib/router/index.js:277:22
    at param (/home/centos/apps/parse-server-dev/source/node_modules/parse-server/node_modules/express/lib/router/index.js:349:14)
    at param (/home/centos/apps/parse-server-dev/source/node_modules/parse-server/node_modules/express/lib/router/index.js:365:14)
    at param (/home/centos/apps/parse-server-dev/source/node_modules/parse-server/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/home/centos/apps/parse-server-dev/source/node_modules/parse-server/node_modules/express/lib/router/index.js:410:3)

This error appears randomly in the console and it makes the ParseServer crash, I still can't able to reproduce it

https://github.com/ParsePlatform/parse-server/blob/master/src/Routers/FilesRouter.js#L39

@drew-gross drew-gross changed the title [TypeError: Cannot read property 'getFileData' of undefined] filesController sporadically missing in FilesRouter May 12, 2016
@drew-gross
Copy link
Contributor

I don't see how this could happen. Please let me know if you are ever able to reproduce this, I haven't been able to reproduce it either.

@benishak
Copy link
Contributor Author

reproduce

As fair as I tested it could be reproduced in this way but not all the time

  • point the app to api.parse.com
  • login to the app
  • switch the app to self-hosted-parse-server
  • open the app
  • the error appears in the console only that time

@flovilmart
Copy link
Contributor

Closing due to lack of activity, please update to latest parse-server version and reopen if the issue persist.

Don't forget to include your current:

  • node version
  • npm version
  • parse-server version
  • any relevant logs (VERBOSE=1 will enable verbose logging)

@lowgator
Copy link

I have had the same issue along with the exact error message. benishak are you still having this issue as well?

@themoonlitknight
Copy link

themoonlitknight commented Jul 22, 2016

I have the same identical issue and I'm able to reproduce it. I'm using the parse-server-fs-adapter to store files. While storing succeeds, when I try to retrieve a file Parse crashes with that error log. I posted this issue here weeks ago parse-community/parse-server-fs-adapter#3.
This does not happen with the default GridStoreAdapter.

My configuration:
• node: v4.4.6
• npm: 2.15.5
• parse-server: dev version

@agordeev
Copy link

agordeev commented Aug 12, 2016

I'm getting the same error on migrated app. I uploaded a file through Parse Dasboard and now trying to access it, but getting this in error log:

 error: Uncaught internal server error. TypeError: Cannot read property 'getFileData' of undefined
 at getHandler (/usr/lib/node_modules/parse-server/lib/Routers/FilesRouter.js:69:22)
 at Layer.handle [as handle_request] (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/layer.js:95:5)
 at next (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/route.js:131:13)
 at Route.dispatch (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/route.js:112:3)
 at Layer.handle [as handle_request] (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/layer.js:95:5)
 at /usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:277:22
 at param (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:349:14)
 at param (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:365:14)
 at param (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:365:14)
 at Function.process_params (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:410:3) TypeError: Cannot read property 'getFileData' of undefined
 at getHandler (/usr/lib/node_modules/parse-server/lib/Routers/FilesRouter.js:69:22)
 at Layer.handle [as handle_request] (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/layer.js:95:5)
 at next (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/route.js:131:13)
 at Route.dispatch (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/route.js:112:3)
 at Layer.handle [as handle_request] (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/layer.js:95:5)
 at /usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:277:22
 at param (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:349:14)
 at param (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:365:14)
 at param (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:365:14)
 at Function.process_params (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:410:3)

The dashboard shows this:

{"code":1,"message":"Internal server error."}

Parse Server version is 2.2.15.
Parse Dashboard version is 1.0.15

This error is persistent.

@agordeev
Copy link

@flovilmart Can you please reopen this issue, as I wouldn't like to open a new one?

@flovilmart flovilmart reopened this Aug 12, 2016
@flovilmart
Copy link
Contributor

Please update to latest version and reopen the issue if it persists

@venkataramanab
Copy link

I'm using parse server version 2.2.25
Problem still exists
error: Uncaught internal server error. [TypeError: Cannot read property 'getFileData' of undefined] TypeError: Cannot read property 'getFileData' of undefined at getHandler (/usr/lib/node_modules/parse-server/lib/Routers/FilesRouter.js:81:24) at Layer.handle [as handle_request] (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/layer.js:95:5) at next (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/route.js:131:13) at Route.dispatch (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/layer.js:95:5) at /usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:277:22 at param (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:349:14) at param (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:365:14) at param (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:365:14) at Function.process_params (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:410:3) TypeError: Cannot read property 'getFileData' of undefined at getHandler (/usr/lib/node_modules/parse-server/lib/Routers/FilesRouter.js:81:24) at Layer.handle [as handle_request] (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/layer.js:95:5) at next (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/route.js:131:13) at Route.dispatch (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/layer.js:95:5) at /usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:277:22 at param (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:349:14) at param (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:365:14) at param (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:365:14) at Function.process_params (/usr/lib/node_modules/parse-server/node_modules/express/lib/router/index.js:410:3)

@flovilmart
Copy link
Contributor

Can you provide the logs when running with VERBOSE=1 when this occurs?

@venkataramanab
Copy link

sure!, please give me a moment.

@venkataramanab
Copy link

`verbose: REQUEST for [GET] /parse/classes/Posts?skip=1&include=celebrity_pointer&limit=5&order=-source_created_at: {} method=GET, url=/parse/classes/Posts?skip=1&include=celebrity_pointer&limit=5&order=-source_created_at, host=<my_host_name>, connection=close, content-length=0, accept-encoding=identity, x-parse-application-id=<my_app_id>, content-type=application/json, x-parse-master-key=<my_key>,
/usr/lib/node_modules/parse-server/lib/ParseServer.js:430
throw err;
^

Error: ENOENT: no such file or directory, open '/usr/lib/node_modules/parse-server/logs/parse-server.info.2016-11-29'
at Error (native)`

@flovilmart
Copy link
Contributor

That isn't the same crash...

@flovilmart
Copy link
Contributor

But odd nonetheless

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

Successfully merging a pull request may close this issue.

7 participants