Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

XMLHttpRequest cannot be used when running ipfs in a service worker #1477

Closed
@vasco-santos

Description

@vasco-santos

self.XMLHttpRequest is not a constructor

  • Version: 0.31.0
  • Platform: Browser
  • Subsystem: Preload

Type: Bug

Severity: Critical

Description:

Service workers does not support XMLHttpRequest. This way, a service worker cannot run this version of js-ipfs. Can the XMLHttpRequest be changed to use fetch instead?

const req = new self.XMLHttpRequest()

Steps to reproduce the error:

Instantiate an IPFS node inside a service worker

Metadata

Metadata

Assignees

Labels

P0Critical: Tackled by core team ASAPexp/noviceSomeone with a little familiarity can pick upkind/bugA bug in existing code (including security flaws)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions