Client closed connection prematurely w static dashboard embed & default value

steps to reproduce:

  1. create a question from the People table (from the sample database), though any table should do
  2. select, say, the Name column
  3. put this question in a dashboard
  4. create a dashboard (text) filter for the Name column, with a Default value
  5. setup static embedding for this dashboard, marking the filter as editable
  6. create the embedding html and view in browser, with params: {}

get a "Client closed connection prematurely" error in the logs

this happens in at least Chrome and Safari, Ubuntu and MacOS

java version = openjdk 11.0.25

metabase version: 0.51.4 (but also .50)

logs:

2024-11-25 12:42:23,585 ERROR query-processor.streaming :: Client closed connection prematurely

org.eclipse.jetty.io.EofException

at org.eclipse.jetty.io.SocketChannelEndPoint.flush(SocketChannelEndPoint.java:116)

at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:422)

at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:275)

at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:254)

at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:386)

at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:849)

at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:243)

at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)

at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:600)

at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:1051)

at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:1123)

at org.eclipse.jetty.server.HttpOutput.channelWrite(HttpOutput.java:270)

at org.eclipse.jetty.server.HttpOutput.close(HttpOutput.java:623)

at java.base/java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:250)

at metabase.async.streaming_response$delay_output_stream$fn__53178.invoke(streaming_response.clj:130)

at metabase.async.streaming_response.proxy$java.io.OutputStream$ff19274a.close(Unknown Source)

at java.base/sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:341)

at java.base/sun.nio.cs.StreamEncoder.close(StreamEncoder.java:161)

at java.base/java.io.OutputStreamWriter.close(OutputStreamWriter.java:255)

at java.base/java.io.BufferedWriter.close(BufferedWriter.java:269)

at com.fasterxml.jackson.core.json.WriterBasedJsonGenerator.close(WriterBasedJsonGenerator.java:1033)

at metabase.query_processor.streaming.json$fn$reify__60630.finish_BANG_(json.clj:154)

at metabase.query_processor.streaming$streaming_result_fn61508__61509$result__61510$fn__61511.invoke(streaming.clj:143)

at metabase.query_processor.streaming$streaming_result_fn61508__61509$result__61510.invoke(streaming.clj:142)

at clojure.core$comp$fn__5895.invoke(core.clj:2586)

at metabase.query_processor.pipeline$STAR_reduce_STAR.invokeStatic(pipeline.clj:86)

at metabase.query_processor.pipeline$STAR_reduce_STAR.invoke(pipeline.clj:54)

at metabase.query_processor.pipeline$STAR_run_STAR$respond__58968.invoke(pipeline.clj:100)

at metabase.driver.sql_jdbc.execute$execute_reducible_query$fn__87276.invoke(execute.clj:725)

at metabase.driver.h2$fn__90052$fn__90054.invoke(h2.clj:543)

at metabase.driver.sql_jdbc.execute$do_with_resolved_connection87050__87051.invokeStatic(execute.clj:338)

at metabase.driver.sql_jdbc.execute$do_with_resolved_connection87050__87051.invoke(execute.clj:321)

at metabase.driver.h2$fn__90052.invokeStatic(h2.clj:534)

at metabase.driver.h2$fn__90052.invoke(h2.clj:530)

at clojure.lang.MultiFn.invoke(MultiFn.java:244)

at metabase.driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:708)

at metabase.driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:694)

at metabase.driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:705)

at metabase.driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:694)

at metabase.driver.sql_jdbc$fn__113467.invokeStatic(sql_jdbc.clj:79)

at metabase.driver.sql_jdbc$fn__113467.invoke(sql_jdbc.clj:77)

at metabase.driver.h2$fn__89891.invokeStatic(h2.clj:271)

at metabase.driver.h2$fn__89891.invoke(h2.clj:267)

at clojure.lang.MultiFn.invoke(MultiFn.java:244)

at metabase.query_processor.pipeline$STAR_execute_STAR.invokeStatic(pipeline.clj:52)

at metabase.query_processor.pipeline$STAR_execute_STAR.invoke(pipeline.clj:39)

at metabase.query_processor.pipeline$STAR_run_STAR.invokeStatic(pipeline.clj:102)

at metabase.query_processor.pipeline$STAR_run_STAR.invoke(pipeline.clj:95)

at metabase.query_processor.execute$run.invokeStatic(execute.clj:62)

at metabase.query_processor.execute$run.invoke(execute.clj:56)

at metabase.query_processor.middleware.update_used_cards$update_used_cards_BANG_76938__76939$fn__76940.invoke(update_used_cards.clj:60)

at metabase.query_processor.execute$add_native_form_to_result_metadata$fn__76955.invoke(execute.clj:25)

at metabase.query_processor.execute$add_preprocessed_query_to_result_metadata_for_userland_query$fn__76961.invoke(execute.clj:36)

at metabase.query_processor.middleware.cache$maybe_return_cached_results$maybe_return_cached_results_STAR___76911.invoke(cache.clj:241)

at metabase.query_processor.middleware.permissions$check_query_permissions$fn__73948.invoke(permissions.clj:148)

at metabase.query_processor.middleware.enterprise$check_download_permissions_middleware$fn__74659.invoke(enterprise.clj:51)

at metabase.query_processor.middleware.enterprise$maybe_apply_column_level_perms_check_middleware$fn__74669.invoke(enterprise.clj:64)

at metabase.query_processor.execute$execute76988__76989$fn__76990.invoke(execute.clj:94)

at metabase.query_processor.setup$do_with_qp_setup75184__75185.invokeStatic(setup.clj:225)

at metabase.query_processor.setup$do_with_qp_setup75184__75185.invoke(setup.clj:216)

at metabase.query_processor.execute$execute76988__76989.invokeStatic(execute.clj:93)

at metabase.query_processor.execute$execute76988__76989.invoke(execute.clj:89)

at metabase.query_processor$process_query_STAR__STAR_.invokeStatic(query_processor.clj:49)

at metabase.query_processor$process_query_STAR__STAR_.invoke(query_processor.clj:44)

at metabase.query_processor.middleware.enterprise$fn__74686$handle_audit_app_internal_queries__74687$fn__74689.invoke(enterprise.clj:96)

at metabase.query_processor.middleware.enterprise$handle_audit_app_internal_queries_middleware$fn__74697.invoke(enterprise.clj:103)

at metabase.query_processor.middleware.process_userland_query$process_userland_query_middleware77844__77845$fn__77846.invoke(process_userland_query.clj:204)

at metabase.query_processor.middleware.catch_exceptions$catch_exceptions77909__77910$fn__77911.invoke(catch_exceptions.clj:132)

at metabase.query_processor$process_query77950__77951$fn__77952.invoke(query_processor.clj:80)

at metabase.query_processor.setup$do_with_canceled_chan75179__75180$fn__75181.invoke(setup.clj:187)

at metabase.query_processor.setup$do_with_database_local_settings75172__75173$fn__75174.invoke(setup.clj:181)

at metabase.query_processor.setup$do_with_driver75165__75166$fn__75167$fn__75168.invoke(setup.clj:166)

at metabase.driver$do_with_driver.invokeStatic(driver.clj:106)

at metabase.driver$do_with_driver.invoke(driver.clj:101)

at metabase.query_processor.setup$do_with_driver75165__75166$fn__75167.invoke(setup.clj:165)

at metabase.query_processor.setup$do_with_metadata_provider75156__75157$fn__75158$fn__75161.invoke(setup.clj:151)

at metabase.query_processor.store$do_with_metadata_provider58679__58680.invokeStatic(store.clj:170)

at metabase.query_processor.store$do_with_metadata_provider58679__58680.invoke(store.clj:150)

at metabase.query_processor.store$do_with_metadata_provider58679__58680.invokeStatic(store.clj:159)

at metabase.query_processor.store$do_with_metadata_provider58679__58680.invoke(store.clj:150)

at metabase.query_processor.setup$do_with_metadata_provider75156__75157$fn__75158.invoke(setup.clj:150)

at metabase.query_processor.setup$do_with_resolved_database75146__75147$fn__75148.invoke(setup.clj:128)

at metabase.query_processor.setup$do_with_qp_setup75184__75185.invokeStatic(setup.clj:232)

at metabase.query_processor.setup$do_with_qp_setup75184__75185.invoke(setup.clj:216)

at metabase.query_processor$process_query77950__77951.invokeStatic(query_processor.clj:78)

at metabase.query_processor$process_query77950__77951.invoke(query_processor.clj:71)

at metabase.query_processor.card$process_query_for_card_default_qp87524__87525.invokeStatic(card.clj:186)

at metabase.query_processor.card$process_query_for_card_default_qp87524__87525.invoke(card.clj:182)

at metabase.api.public$process_query_for_card_with_id_run_fn$run__101638$fn__101639$fn__101640.invoke(public.clj:140)

at metabase.server.middleware.session$do_with_current_user.invokeStatic(session.clj:438)

at metabase.server.middleware.session$do_with_current_user.invoke(session.clj:421)

at metabase.api.public$process_query_for_card_with_id_run_fn$run__101638$fn__101639.invoke(public.clj:139)

at metabase.query_processor.streaming$_streaming_response$fn__61522$fn__61523$fn__61524.invoke(streaming.clj:175)

at metabase.query_processor.streaming$_streaming_response$fn__61522$fn__61523.invoke(streaming.clj:173)

at metabase.query_processor.streaming$do_with_streaming_rff.invokeStatic(streaming.clj:164)

at metabase.query_processor.streaming$do_with_streaming_rff.invoke(streaming.clj:151)

at metabase.query_processor.streaming$_streaming_response$fn__61522.invoke(streaming.clj:170)

at clojure.lang.AFn.applyToHelper(AFn.java:156)

at clojure.lang.AFn.applyTo(AFn.java:144)

at clojure.core$apply.invokeStatic(core.clj:667)

at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1990)

at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1990)

at clojure.lang.RestFn.applyTo(RestFn.java:145)

at clojure.core$apply.invokeStatic(core.clj:671)

at clojure.core$bound_fn_STAR_$fn__5837.doInvoke(core.clj:2020)

at clojure.lang.RestFn.invoke(RestFn.java:424)

at metabase.async.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:78)

at metabase.async.streaming_response$do_f_STAR_.invoke(streaming_response.clj:76)

at metabase.async.streaming_response$do_f_async$task__53163.invoke(streaming_response.clj:97)

at clojure.lang.AFn.run(AFn.java:22)

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:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at java.base/java.lang.Thread.run(Thread.java:829)

Caused by: java.io.IOException: Broken pipe

at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method)

at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51)

at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:182)

at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:130)

at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:493)

at java.base/java.nio.channels.SocketChannel.write(SocketChannel.java:507)

at org.eclipse.jetty.io.SocketChannelEndPoint.flush(SocketChannelEndPoint.java:110)

... 114 more