-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Doesn't work inside a service-worker on Firefox #2857
Comments
That is correct, Accordingly, We fixed a |
I will try to find the time for it 👍 Should I update it for all the requests? I was diving a little and I found this line: That connects to: I see from the code that there is a lot of dependency on how we are using this module. I guess I need to change that... but my bet is that would complicate a lot of things since changing it would mean to change the way we set up headers, the requests etc etc etc. In any case can you guide a little bit me to find what would be the best solution? Maybe also @alanshaw can give me some suggestion a la planning 😃 |
Nice research! I believe that we should have Yes, I suppose it will not be an immediate and easy change, as you say, some of the request's building blocks have to be implemented according to the fetch API. Let's wait for @alanshaw input here. |
In the browser we use |
HI @koalalorenzo, I think this is because Could you test your code after enabling https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
|
The error that I am getting when I am doing a simple list of pinned elements is reporting a |
Enabling ReadableStream on Firefox it doesn't fix the problem. I think it is more related to the code that I was reporting, but again I am not 100% sure. |
I'm looking into stream-http for other stuff I'll check this out. |
@hugomrdias let me know if you need help with |
Can anybody explain to me why it is |
@koalalorenzo |
@koalalorenzo I just tested ServiceWorker inside Firefox and was able to call This is the screenshot of my console. From the result, I think if Hope this helps. 😄 |
Well, I can't ask the users to enable |
FYSA Streaming API is very close to be enabled by default in Firefox:
|
@koalalorenzo this should now be fixed in ipfs-api@25.0.0 by ipfs-inactive/js-ipfs-http-client#868 please open a new issue if the problem persists |
@alanshaw this is related to stream-http going xhr mode instead fetch mode when it doesn't detect web stream support, and sw doesn't have xhr. I'm gonna reopen and assign it to me. |
argh, yes sorry, thanks @hugomrdias |
Any update? |
FYSA streams just got enabled in Firefox Nightly 👀 🎉 : Refs. |
aaaand Firefox 65 just landed in stable channel with support for @koalalorenzo are you able to re-check with Firefox 65? |
I am not able to test again as we decided to implement it in a different way in order to unlock what we were doing on Orion. Sorry :( |
js-ipfs is being deprecated in favor of Helia. You can follow the migration plan here #4336 and read the migration guide. This issue has been resolved in Helia! if this does not address your concern please let us know by reopening this issue before 2023-06-05! |
By playing around with
js-ipfs-api
inside a service worker, I have noticed that it works perfectly on Safari and Chrome, but apparently not on Firefox.The error reported is related to the usage of
XMLHTTPRequest
.I guess this is the cause: https://www.fxsitecompat.com/en-CA/docs/2015/xmlhttprequest-is-no-longer-available-in-service-workers/
Any guess how to solve/fix this to support also Firefox service workers?
The text was updated successfully, but these errors were encountered: