question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unknown error when run async func

See original GitHub issue

when I run my application, the error was catch by pool.execute(...).then(...).catch(...):

Error:      at /data/node_modules/poolifier/lib/workers.js:67:19\\n     at processTicksAndRejections (internal/process/task_queues.js:94:5)

any idea?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
NeoyeElfcommented, May 24, 2020

I figured it out. the real error is: (after I add error log before the line 70)

_runAsync error DOMException [DataCloneError]: [object Object] could not be cloned.
    at /Applications/workspace/shimo/svc-sas-runner/node_modules/poolifier/lib/workers.js:67:19
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

and I print my return value res from worker:

{
  success: true,
  result: [
    { label: '嘿嘿嘿', type: '文本' },
    { label: 'time', type: '日期' },
    { label: '这是数字', type: '数字' }
  ],
  log: '_EMPTY_LOG_',
  status: 'success',
  execTime: 715
}

Before I return the res, I add res.result = JSON.stringify(result), then it works fine.

My questions are:

  1. Why my return value triggered this bug?
  2. the error catch by pool.execute seems lack error.message, only contains the error.stack?
1reaction
NeoyeElfcommented, May 22, 2020

I will try

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nodejs Async/Await in api controller responds with unknown ...
No error gets thrown. I am using babel babel-plugin-syntax-async-functions to parse it. What is it that I am doing wrong?
Read more >
How to fix the error “async call in a function that does not ...
This error occurs when you've tried to call an async function from a synchronous function, which is not allowed in Swift – asynchronous...
Read more >
JSOM async page returns "Unknown Error" - MSDN
I'm having issues creating a new page on an existing site using JSOM against a Sharepoint Office 365 environment.
Read more >
Handling Errors in Node (asynchronous) - Mario Kandut
Unknown errors are propagated from the divideByTwo() function, to the catch block and then up to the run function with the catch handler....
Read more >
Type 'typeof ResultAsync' is not a valid async function return ...
I'm trying something very simple like: async function foo(): Promise { return ... 0 ) const bar = async (): Promise<Result<number, unknown>> =>...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found