apache/superset · error

Unknown deck.gl layer type: ${vizType}

Error message

Unknown deck.gl layer type: ${vizType}

What it means

The deck.gl Multi chart resolves each sub-chart's buildQuery and transformProps from the chart registry using its viz_type. If either lookup returns something that is not a function (unregistered or not-yet-loaded plugin), it throws 'Unknown deck.gl layer type'. This typically means the sub-chart is not a registered deck.gl layer.

Source

Thrown at superset-frontend/plugins/preset-chart-deckgl/src/Multi/Multi.tsx:379

          adhoc_filters: adhocFilters,
          // Preserve dashboard context for embedded mode permissions
          ...(formData.dashboardId && { dashboardId: formData.dashboardId }),
          // Include parent multilayer chart ID for security checks
          ...(formData.slice_id && { parent_slice_id: formData.slice_id }),
        },
      } as any as JsonObject & { slice_id: number };

      const vizType = subsliceCopy.form_data.viz_type as string;
      Promise.all([
        getChartBuildQueryRegistry().get(vizType),
        getChartTransformPropsRegistry().get(vizType),
      ])
        .then(([layerBuildQuery, layerTransformProps]) => {
          if (
            typeof layerBuildQuery !== 'function' ||
            typeof layerTransformProps !== 'function'
          ) {
            throw new Error(`Unknown deck.gl layer type: ${vizType}`);
          }
          const queryContext = layerBuildQuery(
            subsliceCopy.form_data as QueryFormData,
          );
          return SupersetClient.post({
            endpoint: '/api/v1/chart/data',
            jsonPayload: {
              ...queryContext,
              result_format: 'json',
              // 'full' takes the async-query handoff under
              // GLOBAL_ASYNC_QUERIES, and this call never registers a
              // listener to follow that job, so a cold cache means the
              // layer just never renders. 'results' returns the same
              // data/colnames/coltypes this reads, skips the async path
              // entirely.
              result_type: 'results',
            },
          }).then(({ json }) => {

View on GitHub (pinned to f4587218dd)

Solutions

  1. Verify each sub-chart's viz_type is a registered deck.gl layer in this deployment (check Chart plugin list / presets).
  2. Register the missing plugin in the frontend preset (or enable the extension that provides it) and rebuild.
  3. Remove the offending sub-chart from the Multi layout and re-add it from a known-good layer type.
  4. For lazy-loaded plugins, ensure the buildQuery registry entry is awaited before rendering (the code already awaits the registry promise — confirm the plugin chunk actually loads without network errors).

Example fix

// before
const vizType = subsliceCopy.form_data.viz_type as string;

// after
import { getChartBuildQueryRegistry } from '@superset-ui/core';
const vizType = subsliceCopy.form_data.viz_type as string;
const registered = await getChartBuildQueryRegistry().get(vizType);
if (typeof registered !== 'function') {
  addDangerToast(t('Layer type %s is not available in this deployment', vizType));
  return null;
}
Defensive patterns

Strategy: type-guard

Validate before calling

import { getChartBuildQueryRegistry, getChartTransformPropsRegistry } from '@superset-ui/core';

const [bq, tp] = await Promise.all([
  getChartBuildQueryRegistry().get(vizType),
  getChartTransformPropsRegistry().get(vizType),
]);
const isKnownLayer = typeof bq === 'function' && typeof tp === 'function';

Type guard

async function isRegisteredDeckLayer(vizType: string): Promise<boolean> {
  const [bq, tp] = await Promise.all([
    getChartBuildQueryRegistry().get(vizType),
    getChartTransformPropsRegistry().get(vizType),
  ]);
  return typeof bq === 'function' && typeof tp === 'function';
}

Try / catch

if (!(await isRegisteredDeckLayer(vizType))) {
  addDangerToast(t('Layer type %s is not available; skipping', vizType));
  continue;
}

Prevention

When it happens

Trigger: A Multi deck.gl chart whose subslices include a viz_type that is not a deck.gl layer or whose plugin was never registered (lazy chunk not loaded, plugin disabled, or a custom viz missing from the preset).

Common situations: Custom deck.gl plugin not added to the frontend preset/chart registration; chart JSON imported referencing a viz_type that the deployment does not have; async chunk load failure leaving the registry entry undefined.

Related errors


AI-assisted analysis of apache/superset@f4587218dd (2026-08-14). Data as JSON: /api/errors/ba5e4c7e8f436e46. Report an issue: GitHub.