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.

WASM backend stopped working In the latest Chrome (macOS)

See original GitHub issue

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js): No

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS Big Sur version 11.3.1

  • TensorFlow.js installed from (npm or script link): CDN

  • TensorFlow.js version (use command below): 3.6.0

  • Browser version: Version 91.0.4472.77 (Official Build) (x86_64)

  • Tensorflow.js Converter Version: Did not use

Describe the current behavior Wasm backend stopped working after updating Chrome to the latest version

Describe the expected behavior It should work without errors

Standalone code to reproduce the issue https://jsfiddle.net/alex_oliynyk/2b6oa4dm/14/ (check the console)

Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

"Initialization of backend wasm failed"
"Error: Failed to construct 'Worker': Access to the script at 'blob:https://fiddle.jshell.net/eb0c5b29-6555-4ab3-9c45-38056d8e563a' is denied by the document's Content Security Policy.
    at Object.allocateUnusedWorker (https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm/dist/tf-backend-wasm.js:4745:23103)
    at Object.initMainThreadBlock (https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm/dist/tf-backend-wasm.js:4745:17789)
    at https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm/dist/tf-backend-wasm.js:4745:47195
    at https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm/dist/tf-backend-wasm.js:5032:42
    at new Promise (<anonymous>)
    at https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm/dist/tf-backend-wasm.js:4986:45
    at step (https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm/dist/tf-backend-wasm.js:4662:25)
    at Object.next (https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm/dist/tf-backend-wasm.js:4643:55)
    at fulfilled (https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm/dist/tf-backend-wasm.js:4633:60)"

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vladmandiccommented, Jun 1, 2021

sure, you can override what tfjs autodetected - just set this before calling setBackend('wasm'):

tf.ENV.set('WASM_HAS_SIMD_SUPPORT', false);
tf.ENV.set('WASM_HAS_MULTITHREAD_SUPPORT', false);
Read more comments on GitHub >

github_iconTop Results From Across the Web

Content-Security-Policy to make Tensorflow.js's WASM ...
Show activity on this post. Latest Chrome update breaks WASM backend when using Tensorflow. js. Apparently, browser enforces more strict Content-Security- ...
Read more >
Introducing the WebAssembly backend for TensorFlow.js
We're happy to announce that TensorFlow.js now provides a WebAssembly (WASM) backend for both the browser and for Node.js!
Read more >
Chrome Enterprise and Education release notes
The team is adding a web backend to SQLite, using Emscripten to compile it to WebAssembly and leveraging the new File System Access...
Read more >
SSL certificates no longer work in Google Chrome
I have the same issue with SSL in Chrome after upgrading to MacOS Ventura, nothing else was updated. Works fine in other browsers....
Read more >
Troubleshooting | Authentication - Google Developers
Google Sign-in is currently not supported in incognito mode on Chrome on iOS. Safari with Intelligent Tracking Prevention. This new feature of ...
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