lichess.org
Donate

What happened to PNACL Stockfish in Chrome?

Yeah, it's still super buggy and really frustrating. The engine often refuses to load, especially when you switch to analyze a different move.

I hope there's some way to fix this bug that @CoffehCat identified.
Stockfish 9+ (WASMX) Engine does not load. In the console view:
Uncaught TypeError: Cannot read property 'apply' of undefined
at VM104 stockfish.js:12
at Worker.<anonymous> (VM104 stockfish.js:12)
PNACL Stockfish was giving me way better speeds than this new WASMX. PNACL was giving me 2x... yes, 2 times my current nodes/sec with WASMX. Is there a particular reason why we would want to double the length of our search times?

If WASMX was giving comparable speeds, I'd be all game as long as the bugs of it not loading at times gets fixed, otherwise PNACL should still be made as a possible option.
For me the following error appears on the console:

Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Worker': #<Module> could not be cloned.
at Object.allocateUnusedWorkers (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:31359)
at lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:18291
at callRuntimeCallbacks (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:15739)
at preRun (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:16381)
at run (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:146940)
at runCaller (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:146186)
at removeRunDependency (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:18062)
at receiveInstance (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:20807)
at receiveInstantiatedSource (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:21128)
Thanks to everyone who helped debugging.

Looks like there are still plenty of issues to figure out. So we'll pause the experiment with the next update of the site and try it again sometime later - hopefully before PNaCl is removed from Chrome.

Chrome users will still be able to opt-in by enabling chrome://flags/#enable-webassembly-threads and users of Firefox Nightly can enable javascript.options.shared_memory in about:config.
Maybe we can leave the option for WASMX? Just make it not default. For me it works great, and uses all my CPU. Otherwise, my browser cannot use PNACL and uses only one thread of WASM, which is ridiculously slow.
@Chesstroll_Ingot : Yes, as a Chrome user you will still be able to go to chrome://flags/#enable-webassembly-threads and opt-in to the experiment.
Yep this stockfish bug is with me too. I made a thread about it and I'll copy/paste my logs here too in case it's useful.

lichess.site.min.js:26 Lichess is open source! github.com/ornicar/lila
lichess.analyse.min.js:1 watchdog armed: wasmx
stockfish.js:12 Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Worker': #<Module> could not be cloned.
at Object.allocateUnusedWorkers (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:31359)
at lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:18291
at callRuntimeCallbacks (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:15739)
at preRun (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:16381)
at run (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:146940)
at runCaller (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:146186)
at removeRunDependency (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:18062)
at receiveInstance (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:20807)
at receiveInstantiatedSource (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:21128)
lichess.site.min.js:7 The Web Audio autoplay policy will be re-enabled in Chrome 71 (December 2018). Please check that your website is compatible with it. goo.gl/7K7WLu
s @ lichess.site.min.js:7
stockfish.js:12 Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Worker': #<Module> could not be cloned.
at Object.allocateUnusedWorkers (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:31359)
at lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:18291
at callRuntimeCallbacks (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:15739)
at preRun (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:16381)
at run (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:146940)
at runCaller (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:146186)
at removeRunDependency (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:18062)
at receiveInstance (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:20807)
at receiveInstantiatedSource (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:21128)
lichess.analyse.min.js:1 watchdog disarmed: wasmx
stockfish.js:12 Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Worker': #<Module> could not be cloned.
at Object.allocateUnusedWorkers (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:31359)
at lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:18291
at callRuntimeCallbacks (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:15739)
at preRun (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:16381)
at run (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:146940)
at runCaller (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:146186)
at removeRunDependency (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:18062)
at receiveInstance (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:20807)
at receiveInstantiatedSource (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:21128)
stockfish.js:12 Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Worker': #<Module> could not be cloned.
at Object.allocateUnusedWorkers (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:31359)
at lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:18291
at callRuntimeCallbacks (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:15739)
at preRun (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:16381)
at run (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:146940)
at runCaller (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:146186)
at removeRunDependency (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:18062)
at receiveInstance (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:20807)
at receiveInstantiatedSource (lichess.org/assets/_UcLLmA/vendor/stockfish.wasm/stockfish.js:12:21128)

This topic has been archived and can no longer be replied to.