bee-js
bee-js copied to clipboard
`ky` update is required
ky just recently published its new version where they fixed the "The duplex member must be specified for a request with a streaming body" with which we also encountered.
all streaming request are currently affected at the moment in Chrome.
Thanks for the report. Although in order to update KY, we would have to make Bee-js ES-only which is something that we had not decided to do yet, as it will affect all Bee-js users.
Btw. Bee-js does not yet uses streaming requests so I'm not sure how it is relevant?
Fairdrive create account feature is currently broken in Chrome browser. Unless there is a workaround, shim or polyfill, we'd need a fix or upgrade
Can you please expand on what and how are you using and what does not work? Preferably having reproduction example?
@molekilla can you link to the project to a file where this call originates?
It's hard to find the problem if you don't give enough information. I tried to look at the Fairdrive app but it does not even seem to have bee-js as dependency.
This https://github.com/fairDataSociety/fdp-storage/blob/c4c08822efd8293e1cbda086d720b3c96551be8b/src/account/account-data.ts#L170
simple testpage to test out the problem: https://github.com/nugaon/bee-js-issue-762
not only feed/soc update can be affected, but other uploads as well. try it out in Chrome and you will see the same exact problem mentioned before.
@agazso @nugaon @AuHau https://github.com/sindresorhus/ky/commit/0b141f1725442039a439b683d32d42e9b9d52559
just update to latest ky-universal version of 0.10.1 (current version is 0.8.2 and is 2 years old) https://github.com/sindresorhus/ky-universal/releases
Thanks for the reproduction example. I was able to reproduce it in Chrome.
So first of all to repeat the issue with "just bumping ky
" solution that you are proposing. We run the last version of ky
that supports CommonJs. Starting 0.26.0
it becomes ESM-only, which means that Ky can't be imported in CommonJS, because of this we have not moved forward with updating it because bee-js would have to become ESM-only as well and force all its users to do so as well. There are for example still environments that don't support ESM like Electron, so we are a bit hesitant about making that switch.
Honestly, this seems like a bug in Chrome, because they are basically making a breaking change from earlier working environments. And there is actually bug report that indicates that they are treating this like that and hopefully they will release fix for this ASAP, because bee-js does not use streaming uploads...
That said, we have discussed this issue today and we are keen on moving towards to the breaking change of migrating to ESM-only as we will have to do it sooner or later, but it won't happen quickly. We need to make sure that we do not break any of our existing products.
Our plan is that we will release a custom bee-js package (under @vaporsphere org) that will be ESM only and will have the updated ky
which we will test with our products to make sure everything is alright, and then we will proceed to make the breaking change in bee-js
package.
We have a pre-release out that is ESM-only package and has updated Ky: 6.0.0-pre.0
. Can you please try it out and see if that solves your problem?
Btw. after updating puppeteer to latest version which uses the latest Chrome I saw the same problem, and after updating Ky all good.
Release v5.1.2 addresses this.