Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.
This repository was archived by the owner on Apr 3, 2025. It is now read-only.

Instructions to demonstrate this? #9

@mitra42

Description

@mitra42

Are there a set of instructions to get this working ?

What I figured so far ...

  • Clone the repo from here
  • cd to ipfs-service-worker
  • npm install
  • cd examples
  • npm run build
  • cp -r public+sw/* dist/public+sw

Then copy all of dist/public+sw to a http server
Access for example /public+sw/index.html

It reports ...

-> Registered the service worker successfuly
bundle.js:1:807398
install step
service-worker-bundle.js:1:1582000
activate step

so it looks like the SW is activated.

But ...clicking on window.ipfs.id gets:

 TypeError: asm.js type error: expecting argument type declaration for 'e' of the form 'arg = arg|0' or 'arg = +arg' or 'arg = fround(arg)'
TypeError: e(...) is undefined

and putting a IPFS hash in the input box results in e.g.

Handling fetch event for http://localhost:8080/ipfs/zb2rhfUz7JSdBBb39AHrhtiMLFa5XV2h8Ni1mGz8D67NNKsZg

So it looks like service worker is getting the request, but it never returns.

I'm not sure if I'm doing something wrong (e.g. I didn't change config from the repo default) or if its still early days for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions