Fork me on GitHub
#ring
<
2020-06-07
>
aaron5106:06:38

Using @weavejester’s latest ring-oauth2 and clj-time 0.15.2, I’m getting “No reader function for tag clj-time/date-time” in the callback step. It only happens in production and not in development or test. The error is similar to https://github.com/weavejester/ring-oauth2/issues/27 but my message is “for tag clj-time/date-time”. Any ideas how to work around this, or why it’s only in production? Thank you.

seancorfield15:06:56

@aaron51 sounds like maybe the data_readers.clj file from clj-time didn't make it into your uberjar? How are you building that JAR?

aaron5119:06:02

Thanks @U04V70XH6 — it’s built with lein uberjar. I jar xf’d it and find clj_time | grep reader doesn’t show any files. Lein is in :pedantic mode so we had to add :exclusions to get it to compile — could one of those have removed this file? clj-time.core is also in :aot in project.clj. We added some logging in production, and the value that fails to serialize/deserialize is #clj-time/date-time "2020-06-07T20:20:56.554Z" Thanks for any tips!

seancorfield21:06:09

Can you share your project.clj ?

aaron5123:06:37

Yes, I’ll send via DM. Thanks!

aaron5121:06:19

For future reference — the fix was to specify :readers when creating cookie-store, like (cookie-store {:key admin-auth-cookie-store-key :readers *data-readers*})

3
seancorfield21:06:52

(that will make sure folks can find the answer in the Clojurians Log and in Zulip: https://clojurians.zulipchat.com/#narrow/stream/180378-slack-archive/topic/ring/near/200607738 )