Does anyone know what this error means? ``` Er...
# general
w
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
Are you using “closure serialization” (magic functions) anywhere in your code? Also - do you have the string “id1” anywhere in your code?
w
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
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
ok, thanks luke
I created a minimal repo and opened an issue: https://github.com/pulumi/pulumi/issues/3799
👍 1