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

TypeError in processRequest() with AWS lambda #4

Closed
pgeimer opened this issue Jul 26, 2020 · 5 comments
Closed

TypeError in processRequest() with AWS lambda #4

pgeimer opened this issue Jul 26, 2020 · 5 comments

Comments

@pgeimer
Copy link

pgeimer commented Jul 26, 2020

When I use processRequest in my AWS lambda function like this:

module.exports.hello = (event, context, callback) => {
    processRequest(event, null, { environment: "lambda" }).then((processed) => {
        // ...
    });
};

I get the following error:

ERROR	Unhandled Promise Rejection 	
{
    "errorType": "Runtime.UnhandledPromiseRejection",
    "errorMessage": "TypeError: Cannot read property 'once' of null",
    "reason": {
        "errorType": "TypeError",
        "errorMessage": "Cannot read property 'once' of null",
        "stack": [
            "TypeError: Cannot read property 'once' of null",
            "    at /var/task/node_modules/graphql-upload-minimal/public/process-request.js:378:14",
            "    at new Promise (<anonymous>)",
            "    at processRequest (/var/task/node_modules/graphql-upload-minimal/public/process-request.js:78:10)",
            "    at Runtime.module.exports.handle [as handler] (/var/task/handler.js:27:9)",
            "    at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
        ]
    },
    "promise": {},
    "stack": [
        "Runtime.UnhandledPromiseRejection: TypeError: Cannot read property 'once' of null",
        "    at process.<anonymous> (/var/runtime/index.js:35:15)",
        "    at process.emit (events.js:310:20)",
        "    at process.EventEmitter.emit (domain.js:482:12)",
        "    at processPromiseRejections (internal/process/promises.js:209:33)",
        "    at processTicksAndRejections (internal/process/task_queues.js:98:32)"
    ]
}
@koresar
Copy link
Collaborator

koresar commented Jul 27, 2020

Are you using the graphql-upload-minimal@next or the current stable?

@koresar
Copy link
Collaborator

koresar commented Jul 27, 2020

Probably the README should be updated that it is showing the @next features. Sorry about the confusion.

@pgeimer
Copy link
Author

pgeimer commented Jul 27, 2020

I was using the current stable. With graphql-upload-minimal@next it worked. Thank you!

@pgeimer pgeimer closed this as completed Jul 27, 2020
@koresar
Copy link
Collaborator

koresar commented Jul 27, 2020

I was waiting for you!
I'm going to publish it as stable. 😃

@koresar
Copy link
Collaborator

koresar commented Jul 30, 2020

The new stable v1.2.0 was just published. No any changes comparing to the @next version.
Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants