ring

aaron51 2020-06-07T06:50:38.081100Z

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.

seancorfield 2020-06-07T15:45:56.082300Z

@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?

aaron51 2020-06-11T21:19:19.087900Z

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*})

1
seancorfield 2020-06-11T21:20:52.088200Z

(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 )

aaron51 2020-06-07T19:39:02.082400Z

Thanks @seancorfield — 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!

seancorfield 2020-06-07T21:52:09.082800Z

Can you share your project.clj ?

aaron51 2020-06-07T23:29:37.083Z

Yes, I’ll send via DM. Thanks!