-
Notifications
You must be signed in to change notification settings - Fork 15
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
Cannot read properties of undefined (reading 'type') #210
Comments
Hi @GravlLift I'm not sure what could be causing this, but my best guess is it's some sort of race condition that only happens with more complex projects. It'll be hard for me to repro, so it would be helpful if we could get more logs. Could you replace line 203 in const bindingType = __classPrivateFieldGet(this, _InvocationModel_bindings, "f")[bindingName].type; With this code: let bindingType;
try {
bindingType = __classPrivateFieldGet(this, _InvocationModel_bindings, "f")[bindingName].type;
} catch (err) {
context.log(`bindingName: ${bindingName}`);
context.log(`inputData: ${JSON.stringify(req.inputData.map((id) => id.name))}`);
context.log(`bindings: ${JSON.stringify(__classPrivateFieldGet(this, _InvocationModel_bindings, "f"))}`);
throw err;
} And then share the new logs with us if/when you get the error to reproduce again. |
We are getting this error as well, in a timer triggered function:
When I look in the logs, it seems to start happening at midnight, and then a restart resolves it. Then next midnight it starts happening again. Although that could be because we have multiple other functions starting at that time, but Im not sure. |
@ejizba, took a while for it to reappear, but here it is:
The route seen under bindings is the one that crashed when this was logged. |
@GravlLift thanks for the info! I just merged a change that I'm pretty confident will fix this, although it's hard to reproduce the bug so I can't be 100% sure. The change will be included in the next release towards the end of February, although you can try it out earlier following these instructions: https://github.com/Azure/azure-functions-nodejs-library/wiki/Install-Insiders-Build If you do try it out, let us know if it works or not! Thanks |
Investigative information
Please provide the following:
Repro steps
Provide the steps required to reproduce the problem:
https://azud-rms-fa-01.azurewebsites.net/api/v4/customer?emailAddress=lightspeed.e2e%40gmail.com
in a browserExpected behavior
Provide a description of the expected behavior.
Http request should return valid JSON and 200 response
Actual behavior
500 error
Related information
Provide any related information
This error is not reproducible locally, only on our Azure instance. While it is reproducible for a single function run, restarting the function will fix the issue.
Relevant code appears to be here:
azure-functions-nodejs-library/src/InvocationModel.ts
Lines 46 to 79 in aa9068d
The text was updated successfully, but these errors were encountered: