Fork me on GitHub
#fulcro
<
2019-01-04
>
geraldodev10:01:42

is dev guide's source on github ?

Twan10:01:33

The book is also available here https://github.com/fulcrologic/fulcro/blob/develop/DevelopersGuide.adoc (albeit without live code examples)

bbss13:01:14

I have run into the need to use websockets in a fulcro project, I had done it before in a different project and this time it's running into a bunch more resistance. Figured out part of that has to do with the csrf security issue recently discovered in sente. Now after including sente 0.14.0-RC1 in my :dependencies when trying to run my server I get an error that I think is not right:

INFO [fulcro.websockets:101] : Starting Sente websockets support
ERROR [fulcro.util:133] : Failed to load functions from taoensso.sente. Fulcro does not have hard dependencies on that library, and you must explicitly add the dependency to your project.

Execution error (ExceptionInfo) at fulcro.util$build_invoke$fn__20011/doInvoke (util.cljc:174).
Dynamically loaded function not found. You forgot to add a dependency to your classpath.

I don't have that issue with older versions of sente, but then my front-end will give the following error, which I guess indicates an incompatible api:
Uncaught #error {:message "Invalid event", :data {:given "~:chsk/handshake", :errors {:wrong-type 
{…}
[:expected :vector]
[:actual {:type #object[String], :value "~:chsk/handshake"}]
Fulcro version is 2.7.0

tony.kay16:01:51

Thanks @mroerni I ran some server upgrades..clearly it overwrote my configs 😕

tony.kay16:01:17

should work now?

tony.kay16:01:40

@bbss the book is updated with respect to that

tony.kay16:01:51

I upgraded my app and it is working

tony.kay16:01:45

use 1.14, and change your client code to pass the CSRF token as an option…you no longer need the enforce-csrf thing on the server, since it’ll be properly done by security middleware

tony.kay17:01:59

you do need anti-forgery on server (e.g. via defaults)