https://pulumi.com logo
#general
Title
# general
w

worried-engineer-33884

01/23/2020, 11:37 PM
Does anyone know what this error means?
Copy code
Error calling "Runtime.evaluate(global.__inflightFunctions.id2)": Uncaught

      at ../../../../opt/pulumi/node_modules/@pulumi/pulumi/runtime/closure/v8_v11andHigher.js:123:23
      at fulfilled (../../../../opt/pulumi/node_modules/@pulumi/pulumi/runtime/closure/v8_v11andHigher.js:18:58)
Digging deeper I'm seeing this, but can't figure out what's happening here:
Copy code
exceptionDetails: {
        exceptionId: 2,
        text: 'Uncaught',
        lineNumber: 0,
        columnNumber: 27,
        scriptId: '2434',
        exception: {
          type: 'object',
          subtype: 'error',
          className: 'TypeError',
          description: "TypeError: Cannot read property 'id1' of undefined\n" +
            '    at <anonymous>:1:28\n' +
            '    at <http://Session.post|Session.post> (inspector.js:110:28)\n' +
            '    at internal/util.js:278:30\n' +
            '    at new Promise (<anonymous>)\n' +
            '    at <http://Session.post|Session.post> (internal/util.js:277:12)\n' +
            '    at /opt/pulumi/node_modules/@pulumi/pulumi/runtime/closure/v8_v11andHigher.js:121:40\n' +
            '    at Generator.next (<anonymous>)\n' +
            '    at fulfilled (/opt/pulumi/node_modules/@pulumi/pulumi/runtime/closure/v8_v11andHigher.js:18:58)\n' +
            '    at processTicksAndRejections (internal/process/task_queues.js:93:5)',
          objectId: '{"injectedScriptId":1,"id":4}'
        }
w

white-balloon-205

01/24/2020, 3:00 AM
Are you using “closure serialization” (magic functions) anywhere in your code? Also - do you have the string “id1” anywhere in your code?
w

worried-engineer-33884

01/24/2020, 3:01 AM
no and no. i am getting this when using jest specifically tests that try to get outputs from lambda callback resources or dynamic resources
i have a hunch that this has something to do with how jest sets up a vm and possibly messing with or restricting the global namespace somehow
i've found that if i poke the jest global settings (like inserting
__inflightFunctions
via the "globals" configuration) I get different errors.
but i don't really know what i'm doing
Are you using “closure serialization” (magic functions) anywhere in your code?
I believe both lambdacallbacks and dynamic resources use this, right?
w

white-balloon-205

01/24/2020, 3:50 AM
Yes - that’s right.
Will look into this a little later - there are some hints in the call stack about what might be interacting poorly with Jest. Haven’t seen anything like this previously though.
w

worried-engineer-33884

01/24/2020, 3:52 AM
ok, thanks luke
I created a minimal repo and opened an issue: https://github.com/pulumi/pulumi/issues/3799
👍 1
2 Views