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.

DevTools warning: SharedArrayBuffer will require cross-origin isolation

See original GitHub issue

Describe the bug

When creating an app via npx create-react-app and running it, a warning pops up in DevTools (Chrome 88 and 89):

scheduler.development.js:298 [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.

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

sharedarraybuffer returned no result.

Environment

  current version of create-react-app: 4.0.1
  running from /Users/maudn/.npm/_npx/25767/lib/node_modules/create-react-app
  Binaries:
    Node: 14.15.4 - ~/.nvm/versions/node/v14.15.4/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.10 - ~/.nvm/versions/node/v14.15.4/bin/npm
  Browsers:
    Chrome: 88.0.4324.96
    Edge: 87.0.664.66
    Firefox: 84.0
    Safari: 14.0.2
  npmPackages:
    react: ^17.0.1 => 17.0.1
    react-dom: ^17.0.1 => 17.0.1
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

  1. npx create-react-app myapp
  2. cd myapp && npm start
  3. Open http://localhost:3000 in Chrome 88 or 89, regular or Incognito mode
  4. Open DevTools: the warning is displayed

Expected behavior

Actual behavior

Warning: scheduler.development.js:298 [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.

image

Reproducible demo

See instructions in Steps to reproduce. Thank you!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:17
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

34reactions
wayneblosscommented, Apr 1, 2021

@sonpnh95 Perhaps some other package is using SharedArrayBuffer. For this reason and for people who didn’t upgrade yet to react v17 you can apply this workaround somewhere in your index.html file or elsewhere:

    <!-- Issue workaround for React v16. -->
    <script>
      // See https://github.com/facebook/react/issues/20829#issuecomment-802088260
      if (!crossOriginIsolated) SharedArrayBuffer = ArrayBuffer;
    </script>
25reactions
bvaughncommented, Mar 4, 2021

The fix only landed a few days ago and has not yet been released.

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 >
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 warnings in Search Console: Clarifying a ...
Cross-origin isolation. Implementation of SharedArrayBuffers requires a security environment where you lock down access using one or more ...
Read more >
Chrome Extensions cross-origin isolation
Cross-origin isolation enables a web page to use powerful features such as SharedArrayBuffer . An extension can opt into cross-origin ...
Read more >
Mitigate cross-origin isolation requirements for ... - aboutweb.dev
Mitigate cross-origin isolation requirements for SharedArrayBuffer with Cloudflare workers. Joe Vallender • May 4, 2021. If you're responsible for a product ...
Read more >

github_iconTop Related Medium Post

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