flowbased / fbp-protocol-client

JavaScript client library for FBP protocol connection handling
8 stars 5 forks source link

Set allow-forms permission for the iframe sandbox #78

Closed bergie closed 7 years ago

bergie commented 7 years ago

Fixes Flowhub React example

bergie commented 7 years ago

@jonnor currently build is failing due to microflo-empscripten issues. Would be nice to fix those

jonnor commented 7 years ago

Uhm, cannot find module ws - that is a very odd message. Is fbp-manifest or something including microflo-runtime.js. If so, why? That probably wont work

jonnor commented 7 years ago

@bergie ^ see above command

bergie commented 7 years ago

Both microflo and microflo-emscripten are in package deps https://github.com/flowbased/fbp-protocol-client/blob/master/package.json

jonnor commented 7 years ago

Problem is that webpack or something is failing on this third-party dep, which is deep inside some generated Emscripten code. It looks all be optional but I don't know how to disable it. I don't see any other required deps which are not node.js standard though, so maybe just add commonjs ws so webpack does not fall over?

jonnor commented 7 years ago

Of course the issue with webpack is that this may be needed by every dependency down...

jonnor commented 7 years ago

The hacky way is of course to just include ws...

jonnor commented 7 years ago

Wait, let me try to remove some unused #include statements, maybe that will help Emscripten to not generate this code. It looks to be for standard I/O streams

jonnor commented 7 years ago

@bergie no luck, reduced includes to a minimum and still the require('ws') code is there

jonnor commented 7 years ago

@bergie do you want me to add ws as a dependency to microflo-emscripten in the meantime? It is actually very small, few subdeps, nothing native.

jonnor commented 7 years ago

The offending code is gone when compiling with latest Emscripten, but that is impossible to setup on Travis CI so not planning on that anytime soon...

bergie commented 7 years ago

@jonnor well, we need to get this back to releasable shape, so do whatever you must.

bergie commented 7 years ago

@jonnor next error: https://travis-ci.org/flowbased/fbp-protocol-client/builds/190673694#L390

jonnor commented 7 years ago

@bergie the ws dependency is now included, but it does not fix it because webpack does not look in subdirs. You need to use NPMv3. This will basically affect all projects using grunt-noflo-browser due to the webpack limitation...

jonnor commented 7 years ago

@bergie https://github.com/flowbased/fbp-protocol-client/pull/82