Skip to content

Bug: devtools reload-and-profile feature is defeated by sync-xhr feature policy #20806

Closed
@roippi

Description

@roippi

React version: all

Steps To Reproduce

  1. Visit a site that uses Feature-Policy: sync-xhr 'none' and has the profiling build of react enabled
  2. Attempt to use the "reload and start profiling" feature of devtools
  3. The xhr request will fail on reload because it attempts to make a synchronous XHR call. The profiling tab will be stuck in "press record to stop recording" state. Devtools will now fail to load on all subsequent refreshes unless the developer clears session storage, because it keeps trying and failing to make that XHR request.

The current behavior

see 3. above

The expected behavior

Ideally, this feature would not depend on synchronous XHR to function. Browsers are deprecating it and sites are blocking it via Feature-Policy due to third-party javascript abusing it.
In its current state, the feature should fail more gracefully when the XHR is blocked due to feature policy or in the future when browsers start blocking it by default.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions