-
Notifications
You must be signed in to change notification settings - Fork 12
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
Object to primitive value error #616
Comments
Yeah we've got a raft of problems serialising error objects, it's something I've been struggling with for a while. I find it hard to repro cases and error objects in Javascript are basically rubbish. The basic problem I think is that the logger interferes with and sometimes tries to serialise error objects. |
@stuartc , @josephjclark - are you guys aware of any workarounds or temporary fixes for this? The WaterAid is blocked until we find a way forward with the crash that happens after using I have a draft PR here but I'm not certain it actually does what we want since I'm not able to test it in Lightning w/o some way of using local/non-NPM adaptors with Lightning. |
I've just looked a bit closer and I see that it's not actually an error object. It's just an object being logged. So my guess is that the worker is failing to serialize that object properly to send it out of the worker thread. Options:
I think the first step is to repro this on my local machine, then I can try to work out what's up with the actual error object. |
Yeah it's the object.toString being called on some sort of special "null property" object. Google tells me this is a way of making an object that's just a map... no special JS object properties (like toString). What if I stringify inside the adaptor for now? So the logger just logs a string? |
When using salesforce's
bulk()
function via the CLI, we see a log (from here) that looks like this:And when we use that same job code on app.openfn.org (via the ws-worker, logger, etc.) we see a crash with this message:
I wonder if, somehow, the logger or the runtime or the ws-worker is trying to convert this log to a string via
Object.toString()
but is unable because the "null prototype" object does not inherit thetoString
property.cc @aleksa-krolls , @mtuchi , @josephjclark
The text was updated successfully, but these errors were encountered: