io.temporal.internal.sync.SyncWorkflowContext.query uncategorized exception often seen in server log

often see this

{"level":"error","ts":"2021-02-06T14:01:06.842Z","msg":"Uncategorized error","service":"history","wf-namespace-id":"493f72d9-4de5-4e0f-b113-3e37449990fa","wf-id":"feb20210607-worflow","error":"java.lang.IllegalArgumentException: Unknown query type: __cadence_web_list, knownTypes=**[getData, getState]**
at io.temporal.internal.sync.SyncWorkflowContext.query(SyncWorkflowContext.java:627)
at io.temporal.internal.sync.WorkflowExecuteRunnable.query(WorkflowExecuteRunnable.java:75)
at io.temporal.internal.sync.SyncWorkflow.query(SyncWorkflow.java:175)
at io.temporal.internal.replay.ReplayWorkflowExecutor.query(ReplayWorkflowExecutor.java:137)
at io.temporal.internal.replay.ReplayWorkflowRunTaskHandler.handleQueryWorkflowTask(ReplayWorkflowRunTaskHandler.java:256)
at io.temporal.internal.replay.ReplayWorkflowTaskHandler.handleQueryOnlyWorkflowTask(ReplayWorkflowTaskHandler.java:257)
at io.temporal.internal.replay.ReplayWorkflowTaskHandler.handleWorkflowTask(ReplayWorkflowTaskHandler.java:112)
at io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.handle(WorkflowWorker.java:314)
at io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.handle(WorkflowWorker.java:280)
at io.temporal.internal.worker.PollTaskExecutor.lambda$process$0(PollTaskExecutor.java:73)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
","logging-call-at":"handler.go:1794","stacktrace":"go.temporal.io/server/common/log/loggerimpl.(*loggerImpl).Error
/temporal/common/log/loggerimpl/logger.go:138
go.temporal.io/server/service/history.(*Handler).updateErrorMetric
/temporal/service/history/handler.go:1794
go.temporal.io/server/service/history.(*Handler).error
/temporal/service/history/handler.go:1806
go.temporal.io/server/service/history.(*Handler).QueryWorkflow
/temporal/service/history/handler.go:1167
go.temporal.io/server/api/historyservice/v1._HistoryService_QueryWorkflow_Handler.func1
/temporal/api/historyservice/v1/service.pb.go:1401
go.temporal.io/server/common/rpc.ServiceErrorInterceptor
/temporal/common/rpc/grpc.go:100
go.temporal.io/server/api/historyservice/v1._HistoryService_QueryWorkflow_Handler
/temporal/api/historyservice/v1/service.pb.go:1403
google.golang.org/grpc.(*Server).processUnaryRPCĂ„
/go/pkg/mod/google.golang.org/grpc@v1.34.0/server.go:1210
google.golang.org/grpc.(*Server).handleStream
/go/pkg/mod/google.golang.org/grpc@v1.34.0/server.go:1533
google.golang.org/grpc.(*Server).serveStreams.func1.2
/go/pkg/mod/google.golang.org/grpc@v1.34.0/server.go:871"}

However, i am able to query this from temporal web ui and form api.

But every query call i see this exception.

This is bening. The web UI needs a way to find out which queries are supported by a workflow to put them into a drop down. To get the list the fake __cadence_web_list query is emitted and the list of supported queries is parsed from the error message.

I filed an issue to get __get_workflow_metadata query added to the SDKs.

1 Like

thanks @maxim