Getting error when I am doing static embedding or a dashboard

Version: 0.51.4 , Running through jar file

I have a simple dashboard that includes a bar chart widget, 2-3 numeric widgets, and a couple of filters. While the dashboard works perfectly, clicking the "Publish" button in the Static Embedding section does nothing. Upon checking the Developer Tools, I noticed the following error message being returned:

Diagnostic Report

{
  "browser-info": {
    "language": "en-US",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "metabase-info": {
    "databases": [
      "h2",
      "mysql"
    ],
    "run-mode": "prod",
    "plan-alias": "",
    "version": {
      "date": "2024-11-19",
      "tag": "v0.51.4",
      "hash": "47f05f3"
    },
    "settings": {
      "report-timezone": null
    },
    "hosting-env": "unknown",
    "application-database": "h2",
    "application-database-details": {
      "database": {
        "name": "H2",
        "version": "2.1.214 (2022-06-13)"
      },
      "jdbc-driver": {
        "name": "H2 JDBC Driver",
        "version": "2.1.214 (2022-06-13)"
      }
    }
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.25+9-post-Debian-1deb11u1",
    "java.vendor": "Debian",
    "java.vendor.url": "https://tracker.debian.org/openjdk-11",
    "java.version": "11.0.25",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.25+9-post-Debian-1deb11u1",
    "os.name": "Linux",
    "os.version": "5.10.0-30-cloud-amd64",
    "user.language": "en",
    "user.timezone": "Etc/UTC"
  }
}

Error returned

{
    "via": [
        {
            "type": "clojure.lang.ExceptionInfo",
            "message": ":parameters must be a sequence of maps with :id and :type keys",
            "data": {
                "parameters": [
                    {
                        "name": "Period",
                        "slug": "period",
                        "id": "d20f0c12",
                        "type": "date/relative",
                        "sectionId": "date",
                        "default": "past7days",
                        "required": true
                    },
                    {
                        "name": "Grouping",
                        "slug": "grouping",
                        "id": "42bfd1ea",
                        "type": "temporal-unit",
                        "sectionId": "temporal-unit",
                        "temporal_units": [
                            "hour",
                            "day",
                            "week",
                            "month",
                            "quarter",
                            "year"
                        ],
                        "default": "day",
                        "required": true
                    }
                ],
                "toucan2/context-trace": [
                    [
                        "execute SQL with class com.mchange.v2.c3p0.impl.NewProxyConnection",
                        {
                            "toucan2.jdbc.query/sql-args": [
                                "SELECT * FROM \"REPORT_DASHBOARD\" WHERE \"ID\" = ?",
                                2
                            ]
                        }
                    ],
                    [
                        "resolve connection",
                        {
                            "toucan2.connection/connectable": "class org.h2.jdbc.JdbcConnection"
                        }
                    ],
                    [
                        "resolve connection",
                        {
                            "toucan2.connection/connectable": null
                        }
                    ],
                    {
                        "toucan2.pipeline/rf": "clojure.core$map$fn__5950$fn__5951@330ae9fc"
                    },
                    [
                        "with compiled query",
                        {
                            "toucan2.pipeline/compiled-query": [
                                "SELECT * FROM \"REPORT_DASHBOARD\" WHERE \"ID\" = ?",
                                2
                            ]
                        }
                    ],
                    [
                        "with built query",
                        {
                            "toucan2.pipeline/built-query": {
                                "select": [
                                    "*"
                                ],
                                "from": [
                                    [
                                        "report_dashboard"
                                    ]
                                ],
                                "where": [
                                    "=",
                                    "id",
                                    2
                                ]
                            }
                        }
                    ],
                    [
                        "apply before-update to matching rows",
                        {
                            "toucan2.tools.before-update/model": "model/Dashboard",
                            "toucan2.tools.before-update/changes": {
                                "enable_embedding": true
                            }
                        }
                    ],
                    [
                        "with resolved query",
                        {
                            "toucan2.pipeline/resolved-query": {}
                        }
                    ],
                    [
                        "with parsed args",
                        {
                            "toucan2.pipeline/query-type": "toucan.query-type/update.update-count",
                            "toucan2.pipeline/parsed-args": {
                                "changes": {
                                    "enable_embedding": true
                                },
                                "queryable": {},
                                "kv-args": {
                                    "toucan/pk": 2
                                }
                            }
                        }
                    ],
                    [
                        "with model",
                        {
                            "toucan2.pipeline/model": "model/Dashboard"
                        }
                    ],
                    [
                        "with unparsed args",
                        {
                            "toucan2.pipeline/query-type": "toucan.query-type/update.update-count",
                            "toucan2.pipeline/unparsed-args": [
                                "model/Dashboard",
                                2,
                                {
                                    "enable_embedding": true
                                }
                            ]
                        }
                    ],
                    [
                        "resolve connection",
                        {
                            "toucan2.connection/connectable": "class metabase.db.connection.ApplicationDB"
                        }
                    ],
                    [
                        "resolve connection",
                        {
                            "toucan2.connection/connectable": "default"
                        }
                    ],
                    [
                        "resolve connection",
                        {
                            "toucan2.connection/connectable": null
                        }
                    ]
                ]
            },
            "at": [
                "metabase.models.params$assert_valid_parameters",
                "invokeStatic",
                "params.clj",
                43
            ]
        }
    ]

seems you're using parameters, is that correct?

can you send us:

  1. filter config in the dashboard
  2. parameters in the embedding

This appears to be related to the time grouping options:

Does this align with your experience?

That is correct. I was using grouping in my SQL and that was breaking the static Dashboard publishing. Figured out the workaround i.e. published the db without that specific widget and then added the widget after publishing. Seems to work for me.

Thanks