Anvil-app-server 1.10.1 -> 1.12.3 causes lazy media issues

After upgrading, all media objects in the application database are unusable and throw the following exception:

[ERROR anvil.runtime.server] Error getting lazy media: d1bdd2f7fdc5
java.lang.IllegalArgumentException: No implementation of method: :id-when-persisted of protocol: #'anvil.runtime.sessions/ISession found for class: nil
	at clojure.core$_cache_protocol_fn.invokeStatic(core_deftype.clj:584)
	at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:576)
	at anvil.runtime.sessions$fn__268$G__198__273.invoke(sessions.clj:43)
	at anvil.runtime.sessions$with_app_session$fn__577.invoke(sessions.clj:478)
	at anvil.core.ring.util$wrap_async$fn__23201$fn__23209.invoke(util.clj:37)
	at anvil.core.ring.util$wrap_async$fn__23201$fn__23220.invoke(util.clj:43)
	at anvil.core.ring.util$wrap_async$inner_handler__23226$send_BANG___23227.invoke(util.clj:53)
	at anvil.core.ring.util$wrap_async$inner_handler$reify__23230.send_BANG_(util.clj:62)
	at anvil.runtime.server$serve_lazy_media$fn__26154$fn__26155.invoke(server.clj:119)
	at clojure.lang.AFn.run(AFn.java:22)
	at anvil.core.worker_pool$run_one_task_BANG_.invokeStatic(worker_pool.clj:55)
	at anvil.core.worker_pool$run_one_task_BANG_.invoke(worker_pool.clj:38)
	at anvil.core.worker_pool$launch_thread_BANG_$fn__5542.invoke(worker_pool.clj:94)
	at clojure.lang.AFn.run(AFn.java:22)
	at java.lang.Thread.run(Thread.java:750)

This is the same error in this post:

If we downgrade back to 1.10.1, everything works again.

We want to upgrade to keep pace with security updates.

2 Likes

This is not the only problem in 1.12.3 release. There is also a problem with HTTP endpoints described here:

App Server v1.12 error when serving HTTP endpoints

This appears to be fixed in 1.13