Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use streams in write property operation on browsers #790

Open
relu91 opened this issue Jun 29, 2022 · 4 comments
Open

Use streams in write property operation on browsers #790

relu91 opened this issue Jun 29, 2022 · 4 comments
Labels
browser-bundle Issues related to the browser distribution of node-wot enhancement New feature or request reminder

Comments

@relu91
Copy link
Member

relu91 commented Jun 29, 2022

I've created this issue mostly to monitor the two issues that I linked below.

After plumbing into the inner workings of broserify and the Web platform, I've found that sadly stream upload is not supported for browsers. This means that we can't use a stream to write properties or invoke actions. Solving this issue is going to be tricky but I hope to find a patch that will only be active on browser environments.

For the ones that are curious. Here are the relevant issues:
whatwg/fetch#1438
https://bugs.chromium.org/p/chromium/issues/detail?id=688906

Originally posted by @relu91 in #785 (comment)

@relu91 relu91 added enhancement New feature or request browser-bundle Issues related to the browser distribution of node-wot labels Jun 29, 2022
@samubura
Copy link

samubura commented Sep 7, 2022

I'm having issues using the browser bundle to invoke actions
the error I get is:

TypeError: stream_1.Readable.from is not a function
valueToContent https://cdn.jsdelivr.net/npm/@node-wot/[email protected]/dist/wot-bundle.min.js:49981
invokeAction https://cdn.jsdelivr.net/npm/@node-wot/[email protected]/dist/wot-bundle.min.js:49762
__awaiter https://cdn.jsdelivr.net/npm/@node-wot/[email protected]/dist/wot-bundle.min.js:49326
__awaiter https://cdn.jsdelivr.net/npm/@node-wot/[email protected]/dist/wot-bundle.min.js:49322
invokeAction https://cdn.jsdelivr.net/npm/@node-wot/[email protected]/dist/wot-bundle.min.js:49747`

is this related to this issue?

@danielpeintner
Copy link
Member

danielpeintner commented Sep 8, 2022

The 'stream_1.Readable.from is not a function' issue was resolved by #809.

This was done on 27 July and no more release has been published since than. I hope we can publish a new release soon. In the meantime you may want to use wot-bundle.min.js from a master build.

@relu91
Copy link
Member Author

relu91 commented Sep 22, 2022

The new release is out, @samubura can you confirm that you don't experience that issue anymore?

@samubura
Copy link

Yes! I can confirm it is working as expected now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser-bundle Issues related to the browser distribution of node-wot enhancement New feature or request reminder
Projects
None yet
Development

No branches or pull requests

3 participants