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.

Chrome Deprecation warning: SharedArrayBuffer will require cross-origin isolation as of M91

See original GitHub issue

Running TFJS 3.5.0 with WASM backend and SIMD & multithreading enabled results in warnings in browser console:

[Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021.  
See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.

  (anonymous)	@	flags_wasm.ts:49
  evaluateFlag	@	environment.ts:141
  getAsync	@	environment.ts:88

Which happens in internal WASM test in flags_wasm.ts:

// Test for transferability of SABs (needed for Firefox)
// https://groups.google.com/forum/#!msg/mozilla.dev.platform/IHkBZlHETpA/dwsMNchWEQAJ
new MessageChannel().port1.postMessage(new SharedArrayBuffer(1));
// This typed array is a WebAssembly program containing threaded
// instructions.
return WebAssembly.validate(new Uint8Array([
  0, 97, 115, 109, 1, 0,  0,  0, 1, 4, 1,  96, 0,   0,  3, 2, 1,  0, 5,
  4, 1,  3,   1,   1, 10, 11, 1, 9, 0, 65, 0,  254, 16, 2, 0, 26, 11
]));

Environment: TFJS 3.5.0 with Edge/Chromium 90 on Windows 10 with WASM backend (SIMD and MultiThreading enabled)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
jinjingforevercommented, Jul 12, 2021

Hi @SukkaW, without cross-origin isolation, the wasm baskend will fallback to simd only (without multi-threading support).

1reaction
jinjingforevercommented, Sep 8, 2021

@huningxin We set up a new benchmark site that has the cross-origin isolation set up: https://tfjs-benchmarks.web.app/local-benchmark/. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

SharedArrayBuffer will require cross-origin isolation as of M91 ...
As the warning shows, Chrome will require cross-origin isolation starting version 91 in order to use SharedArrayBuffer.
Read more >
DevTools warning: SharedArrayBuffer will require cross-origin ...
development.js:298 [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021. See https://developer.chrome.
Read more >
SharedArrayBuffer will require cross-origin isolation as of M91 ...
Noticed this warning in javascript console today: [Deprecation] ... Chrome - SharedArrayBuffer will require cross-origin isolation as of M91 ...
Read more >
A guide to enable cross-origin isolation - web.dev
This guide shows you how to enable cross-origin isolation. Cross-origin isolation is required if you want to use SharedArrayBuffer ...
Read more >
Sharedarraybuffer Will Require Cross-Origin Isolation As Of M91 ...
Starting in Chrome 91 May 2021 crossorigin isolation will be required on all platforms in order to access APIs like SharedArrayBuffer and performance...
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