-
Notifications
You must be signed in to change notification settings - Fork 80
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
Writing to properties fails in browser #785
Comments
I get a similiar error trying to write to properties: from-browser.js:2 Uncaught (in promise) Error: Readable.from is not available in the browser
at module.exports (from-browser.js:2:9)
at Readable.from (_stream_readable.js:1115:12)
at ContentSerdes.valueToContent (content-serdes.js:112:61)
at ConsumedThing.eval (consumed-thing.js:428:54)
at Generator.next (<anonymous>)
at eval (consumed-thing.js:28:71)
at new Promise (<anonymous>)
at __awaiter (consumed-thing.js:24:12)
at ConsumedThing.writeProperty (consumed-thing.js:415:16) A work-around, that involves editing if (value instanceof es2018_1.ReadableStream) { to if (value instanceof ReadableStream) { With this editing |
just for record: the webui app has the same problem when I call an action: |
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: |
PR in flight; it should fix the issue but it is a workaround due to my previous comment. I would close this issue when it is properly merged and keep track of #785 (comment) in another issue. |
@relu91 I am not sure if the issue is really solved.
Note: It is different to the one @sebastiankb and others were seeing before... To reproduce the problem
|
The builtins were wrongly passed in the root configuration object. They should be set in the `builtins` property. Close eclipse-thingweb#785 Signed-off-by: reluc <relu.cri@gmail.com>
FYI: I updated the online version also. |
Create
foo.html
with the following code:Expected result:
No errors, successful write operation.
Actual result:
Error in console, write operation not performed.
The text was updated successfully, but these errors were encountered: