Using the latest Pathom Viz release and connector, I get the following stack trace every once in a while:
Sat May 01 08:03:46 MDT 2021 [worker-2] ERROR - POST /
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: No implementation of method: :-operation-config of protocol: #'com.wsscode.pathom3.connect.operation.protocols/IOperation found for class: com.wsscode.pathom3.connect.operation.Resolver
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2069)
at clojure.core$deref_future.invokeStatic(core.clj:2304)
at clojure.core$deref.invokeStatic(core.clj:2324)
at clojure.core$deref.invoke(core.clj:2310)
at com.wsscode.pathom.viz.ws_connector.impl.http_clj$handler.invokeStatic(http_clj.clj:39)
at com.wsscode.pathom.viz.ws_connector.impl.http_clj$handler.invoke(http_clj.clj:30)
at com.wsscode.pathom.viz.ws_connector.impl.http_clj$start_http_server_BANG_$fn__61908.invoke(http_clj.clj:67)
at org.httpkit.server.HttpHandler.run(RingHandler.java:115)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: java.lang.IllegalArgumentException: No implementation of method: :-operation-config of protocol: #'com.wsscode.pathom3.connect.operation.protocols/IOperation found for class: com.wsscode.pathom3.connect.operation.Resolver
at clojure.core$_cache_protocol_fn.invokeStatic(core_deftype.clj:583)
at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:575)
at com.wsscode.pathom3.connect.operation.protocols$eval76622$fn__76634$G__76611__76639.invoke(protocols.cljc:3)
at com.wsscode.pathom3.connect.operation$operation_config.invokeStatic(operation.cljc:112)
at com.wsscode.pathom3.connect.operation$operation_config.invoke(operation.cljc:110)
at com.wsscode.pathom3.connect.indexes$resolver_config.invokeStatic(indexes.cljc:213)
at com.wsscode.pathom3.connect.indexes$resolver_config.invoke(indexes.cljc:207)
at com.wsscode.pathom3.connect.indexes$resolver_optionals.invokeStatic(indexes.cljc:228)
at com.wsscode.pathom3.connect.indexes$resolver_optionals.invoke(indexes.cljc:223)
at com.wsscode.pathom3.connect.planner$resolvers_missing_optionals$fn__77815.invoke(planner.cljc:763)
at clojure.core$map$fn__5880$fn__5881.invoke(core.clj:2746)
at clojure.core.protocols$iter_reduce.invokeStatic(protocols.clj:49)
at clojure.core.protocols$fn__8162.invokeStatic(protocols.clj:75)
at clojure.core.protocols$fn__8162.invoke(protocols.clj:75)
at clojure.core.protocols$fn__8110$G__8105__8123.invoke(protocols.clj:13)
at clojure.core$transduce.invokeStatic(core.clj:6886)
at clojure.core$transduce.invoke(core.clj:6872)
at com.wsscode.pathom3.connect.planner$resolvers_missing_optionals.invokeStatic(planner.cljc:762)
at com.wsscode.pathom3.connect.planner$resolvers_missing_optionals.invoke(planner.cljc:759)
at com.wsscode.pathom3.connect.planner$compute_input_resolvers_graph.invokeStatic(planner.cljc:862)
at com.wsscode.pathom3.connect.planner$compute_input_resolvers_graph.invoke(planner.cljc:844)
at com.wsscode.pathom3.connect.planner$compute_attribute_graph_STAR_$fn__77870.invoke(planner.cljc:926)
at clojure.lang.PersistentArrayMap.kvreduce(PersistentArrayMap.java:377)
at clojure.core$fn__8460.invokeStatic(core.clj:6847)
at clojure.core$fn__8460.invoke(core.clj:6832)
at clojure.core.protocols$fn__8189$G__8184__8198.invoke(protocols.clj:175)
at clojure.core$reduce_kv.invokeStatic(core.clj:6858)
at clojure.core$reduce_kv.invoke(core.clj:6849)
at com.wsscode.pathom3.connect.planner$compute_attribute_graph_STAR_.invokeStatic(planner.cljc:924)
at com.wsscode.pathom3.connect.planner$compute_attribute_graph_STAR_.invoke(planner.cljc:892)
at com.wsscode.pathom3.connect.planner$compute_attribute_graph.invokeStatic(planner.cljc:962)
at com.wsscode.pathom3.connect.planner$compute_attribute_graph.invoke(planner.cljc:942)
at com.wsscode.pathom3.connect.planner$compute_run_graph_STAR_$fn__77890.invoke(planner.cljc:1009)
at clojure.lang.PersistentVector.reduce(PersistentVector.java:343)
at clojure.core$reduce.invokeStatic(core.clj:6829)
at clojure.core$reduce.invoke(core.clj:6812)
at com.wsscode.pathom3.connect.planner$compute_run_graph_STAR_.invokeStatic(planner.cljc:997)
at com.wsscode.pathom3.connect.planner$compute_run_graph_STAR_.invoke(planner.cljc:993)
at com.wsscode.pathom3.connect.planner$compute_run_graph$fn__77901.invoke(planner.cljc:1090)
at com.wsscode.pathom3.cache$eval77324$fn__77325.invoke(cache.cljc:19)
at com.wsscode.pathom3.cache$eval77303$fn__77304$G__77294__77313.invoke(cache.cljc:10)
at com.wsscode.pathom3.cache$cached.invokeStatic(cache.cljc:53)
at com.wsscode.pathom3.cache$cached.invoke(cache.cljc:34)
at com.wsscode.pathom3.connect.planner$compute_run_graph.invokeStatic(planner.cljc:1087)
at com.wsscode.pathom3.connect.planner$compute_run_graph.invoke(planner.cljc:1029)
at com.wsscode.pathom3.connect.planner$compute_run_graph.invokeStatic(planner.cljc:1073)
at com.wsscode.pathom3.connect.planner$compute_run_graph.invoke(planner.cljc:1029)
at com.wsscode.pathom3.connect.runner.async$plan_and_run_BANG_.invokeStatic(async.cljc:422)
at com.wsscode.pathom3.connect.runner.async$plan_and_run_BANG_.invoke(async.cljc:413)
at com.wsscode.pathom3.connect.runner.async$run_graph_impl_BANG_$fn__79531$fn__79532.invoke(async.cljc:505)
at promesa.util.FunctionWrapper.apply(util.cljc:43)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1183)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2305)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:143)
at promesa.impl$eval56965$fn__56968.invoke(impl.cljc:154)
at promesa.protocols$eval56417$fn__56544$G__56396__56557.invoke(protocols.cljc:28)
at promesa.impl$eval56989$fn__56992.invoke(impl.cljc:246)
at promesa.protocols$eval56417$fn__56544$G__56396__56557.invoke(protocols.cljc:28)
at com.wsscode.pathom3.connect.runner.async$run_graph_impl_BANG_$fn__79531.invoke(async.cljc:504)
at promesa.util.FunctionWrapper.apply(util.cljc:43)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1183)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2305)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:143)
at promesa.impl$eval56965$fn__56968.invoke(impl.cljc:154)
at promesa.protocols$eval56417$fn__56544$G__56396__56557.invoke(protocols.cljc:28)
at promesa.impl$eval57003$fn__57006.invoke(impl.cljc:266)
at promesa.protocols$eval56417$fn__56544$G__56396__56557.invoke(protocols.cljc:28)
at com.wsscode.pathom3.connect.runner.async$run_graph_impl_BANG_.invokeStatic(async.cljc:504)
at com.wsscode.pathom3.connect.runner.async$run_graph_impl_BANG_.invoke(async.cljc:502)
at com.wsscode.pathom3.plugin$run_with_plugins.invokeStatic(plugin.cljc:143)
at com.wsscode.pathom3.plugin$run_with_plugins.invoke(plugin.cljc:129)
at com.wsscode.pathom3.connect.runner$run_graph_with_plugins$fn__78242.invoke(runner.cljc:802)
at com.wsscode.pathom3.plugin$run_with_plugins.invokeStatic(plugin.cljc:143)
at com.wsscode.pathom3.plugin$run_with_plugins.invoke(plugin.cljc:129)
at com.wsscode.pathom3.connect.runner$run_graph_with_plugins.invokeStatic(runner.cljc:800)
at com.wsscode.pathom3.connect.runner$run_graph_with_plugins.invoke(runner.cljc:798)
at com.wsscode.pathom3.connect.runner.async$run_graph_BANG_.invokeStatic(async.cljc:524)
at com.wsscode.pathom3.connect.runner.async$run_graph_BANG_.invoke(async.cljc:517)
at com.wsscode.pathom3.interface.async.eql$process_ast_STAR_$fn__57611$fn__57612.invoke(eql.cljc:16)
at promesa.util.FunctionWrapper.apply(util.cljc:43)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1183)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2305)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:143)
at promesa.impl$eval56965$fn__56968.invoke(impl.cljc:154)
at promesa.protocols$eval56417$fn__56544$G__56396__56557.invoke(protocols.cljc:28)
at promesa.impl$eval56989$fn__56992.invoke(impl.cljc:246)
at promesa.protocols$eval56417$fn__56544$G__56396__56557.invoke(protocols.cljc:28)
at com.wsscode.pathom3.interface.async.eql$process_ast_STAR_$fn__57611.invoke(eql.cljc:15)
at promesa.util.FunctionWrapper.apply(util.cljc:43)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1183)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2305)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:143)
at promesa.impl$eval56965$fn__56968.invoke(impl.cljc:154)
at promesa.protocols$eval56417$fn__56544$G__56396__56557.invoke(protocols.cljc:28)
at promesa.impl$eval57003$fn__57006.invoke(impl.cljc:266)
at promesa.protocols$eval56417$fn__56544$G__56396__56557.invoke(protocols.cljc:28)
at com.wsscode.pathom3.interface.async.eql$process_ast_STAR_.invokeStatic(eql.cljc:15)
at com.wsscode.pathom3.interface.async.eql$process_ast_STAR_.invoke(eql.cljc:14)
at com.wsscode.pathom3.plugin$run_with_plugins.invokeStatic(plugin.cljc:140)
at com.wsscode.pathom3.plugin$run_with_plugins.invoke(plugin.cljc:129)
at com.wsscode.pathom3.interface.async.eql$process_ast.invokeStatic(eql.cljc:23)
at com.wsscode.pathom3.interface.async.eql$process_ast.invoke(eql.cljc:20)
at com.wsscode.pathom3.interface.async.eql$process.invokeStatic(eql.cljc:51)
at com.wsscode.pathom3.interface.async.eql$process.invoke(eql.cljc:26)
at com.wsscode.pathom.viz.ws_connector.pathom3$connect_env$parser__62122.invoke(pathom3.cljc:224)
at com.wsscode.pathom.viz.ws_connector.impl.http_clj$handler$fn__61895.invoke(http_clj.clj:41)
at promesa.util.FunctionWrapper.apply(util.cljc:43)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1183)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2305)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:143)
at promesa.impl$eval56965$fn__56968.invoke(impl.cljc:154)
at promesa.protocols$eval56417$fn__56544$G__56396__56557.invoke(protocols.cljc:28)
at promesa.impl$eval57003$fn__57006.invoke(impl.cljc:266)
at promesa.protocols$eval56417$fn__56544$G__56396__56557.invoke(protocols.cljc:28)
at com.wsscode.pathom.viz.ws_connector.impl.http_clj$handler.invokeStatic(http_clj.clj:41)
... 8 more
in what context? what are you doing when the error happens?
It's seems to be random. I'll keep trying to find a pattern
@wilkerlucio
I have a problem where I have a recursive query and I get nil
s in my response. (pathom 2)
Query:
[{[:argument/id #uuid "608c8040-6722-4303-9801-e4f362e7fccb"]
[:argument/id
{:argument/premise->arguments 2}]}]
Response:
{[:argument/id #uuid "608c8040-6722-4303-9801-e4f362e7fccb"]
{:argument/id #uuid "608c8040-6722-4303-9801-e4f362e7fccb",
:argument/premise->arguments
[{:argument/id #uuid "608d46b9-3161-465c-9560-becbd20ff946",
:argument/premise->arguments
[{:argument/id #uuid "608d5014-012a-442f-ab72-885a9187ed8c",
:argument/premise->arguments
[nil nil]}]}]} <<----- These two nils are the problem
Actually my resolver (`{::pc/output [{:argument/premise->arguments [:argument/id]}]}` ) is called and returns two real values instead of the nil
s.
{:argument/premise->arguments
[{:argument/id #uuid "608d7954-b05d-4f67-a44f-92b1c16984f4"}
{:argument/id #uuid "608d7a34-7090-47c1-a855-47c8ee68baa0"}]}
I feel like the resolver shouldn't be called a third time?
Do you know what the problem may be?
It looks like there is a mismatch in the interpretation of the depth somewhere..?hi Bjorn, sorry the delay, the to-many case seems weird to have the items as nils
Query:
[{[:argument/id #uuid "608c8040-6722-4303-9801-e4f362e7fccb"]
[:argument/id
{:argument/premise->arguments 0}]}]
Response:
{[:argument/id #uuid "608c8040-6722-4303-9801-e4f362e7fccb"]
{:argument/id #uuid "608c8040-6722-4303-9801-e4f362e7fccb"
:argument/premise->arguments [nil nil nil nil]}}. ; I removed three of the elements in the example above
I see that https://github.com/wilkerlucio/pathom/blob/master/test/com/wsscode/pathom/core_test.cljc#L258
expects nil
to be returned.
The problem I face with the nil
s is, that fulcro then tries to normalize them and then my db contains [:argument/id nil]
s