I have this error when I deploy a workflow; it appeared recently, and from the stack trace, it’s not my source code, so I’m wondering if someone may have encountered the same issue. By the way, I tried with many BPMN workflows/DMN tables, and I always get the same error:
<rejected> Error: 3 INVALID_ARGUMENT: Property 'variables' is invalid: Expected document to be a root level object, but was 'STRING' : at
Object.exports.createStatusError (/usr/src/app/node_modules/grpc/src/common.js:91:15) : at Object.onReceiveStatus
(/usr/src/app/node_modules/grpc/src/client_interceptors.js:1209:28) : at InterceptingListener._callNext
(/usr/src/app/node_modules/grpc/src/client_interceptors.js:568:42) : at InterceptingListener.onReceiveStatus
(/usr/src/app/node_modules/grpc/src/client_interceptors.js:618:8) : at Object.onReceiveStatus
(/usr/src/app/node_modules/zeebe-node-affinity/node_modules/zeebe-node/dist/lib/GrpcClient.js:144:36) : at InterceptingListener._callNext
(/usr/src/app/node_modules/grpc/src/client_interceptors.js:568:42) : at InterceptingListener.onReceiveStatus
(/usr/src/app/node_modules/grpc/src/client_interceptors.js:618:8) : at callback (/usr/src/app/node_modules/grpc/src/client_interceptors.js:847:24) { : code: 3, : metadata: Metadata { _internal_repr: [Object], flags: 0 }, : details: "Property 'variables' is invalid: Expected document to be a root level object, but was 'STRING'" : } :}
Yes, the zeebe-node library serialises and deserialises the variables payload, so that in the application domain you are dealing with a JavaScript object.