Skip to content
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

The V8 platform used by this instance of Node does not support creating Workers #116

Open
AwesomeNameMan opened this issue Aug 26, 2020 · 15 comments

Comments

@AwesomeNameMan
Copy link

Describe the bug
Updated from camaro 5.0.3 to 6 (6.0.3). Using camaro with electron to parse many XML strings.
After the update electron crashes with the following error:

The V8 platform used by this instance of Node does not support creating Workers

Minimal Script To Reproduce

import { ready, transform } from 'camaro';

await ready();
result = await transform(files[fileName], template);

Expected behavior
Camaro not breaking my electron app.

  • camaro version: 6.0.3
  • Node version: v12.18.3
  • Operating system: Windows 10 Version1909 (Build 18363.900)
@tuananh
Copy link
Owner

tuananh commented Aug 26, 2020

Looks like it's similar to this electron/electron#18540 but lemme dig deeper into this. I've never use Electron before.

@AwesomeNameMan
Copy link
Author

Thanks for the quick reply, tuananh!

Here some more info about the environment:

  • electron version: 9.2.1 (had version 7.x.x before, but same behavior)

I'm distributing the camaro.wasm to the app after build and I've seen you added a worker.js with v6, which seems to break the electron app. As far as I know, electron uses his own node & V8 engine version.

@kentico-ericd
Copy link

I'm also having an issue that might be related. I'm writing a Zapier CLI application and started getting this error immediately after trying to call transform()

Error: Cannot find module '/node_modules/piscina/dist/src/worker.js'

@tuananh
Copy link
Owner

tuananh commented Sep 10, 2020

@kentico-ericd what node / camaro version are you using?

@kentico-ericd
Copy link

I tried

  • camaro 6.0.3
  • node 10.22.0

Does it require node >=12? I think it might have been an issue with zapier-platform-core actually- if so, sorry for polluting the thread and I'll check with them :)

@AwesomeNameMan
Copy link
Author

Workers should be stable with node >= 12.

@tuananh is it maybe possible to make the usage of workers for camaro optional? This could help with different environments and people can't argue about a lack in performance when workers are not in use.

@tuananh
Copy link
Owner

tuananh commented Sep 11, 2020 via email

@tuananh
Copy link
Owner

tuananh commented Jan 31, 2021

Fixed by #122

@tuananh tuananh closed this as completed Jan 31, 2021
@AwesomeNameMan
Copy link
Author

Problem still occurs for me with the following versions:

  • camaro 6.1.0
  • Electron 10.1.3

The V8 platform used by this instance of Node does not support creating Workers

@tuananh tuananh reopened this Mar 23, 2021
@fabiospampinato
Copy link

Stil happening v12

@tuananh
Copy link
Owner

tuananh commented Mar 25, 2021

@AwesomeNameMan @fabiospampinato do you have minimal project so that I can try? I'm not very familiar with Electron.

@fabiospampinato
Copy link

Oh sorry I thought we were in electron's repo here 🤦‍♂️ my bad. You can probably reproduce the issue by running this library inside Electron's renderer process.

@AwesomeNameMan
Copy link
Author

Hi tuananh,

any news here?

@tuananh
Copy link
Owner

tuananh commented Sep 6, 2021

Sorry i didn't have bandwidth for tis project lately. could you rollback to v3 where worker isn't used yet?

@absir1949
Copy link

@tuananh i use camaro 3.0.19 There are still problems.

 error: \\?\C:\Users\cd\AppData\Local\Temp\3809f2b1-9563-44e0-8d63-6b5673ffc4d6.tmp.node is not a valid Win32 application.
  • camaro 6.1.0,6.2,5.0
  • Electron 11.5
  • node 12.18.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants