Skip to content

Dashboard configuration export (JSON) fails with INTERNAL_SERVER_ERROR: "Expected a string but received a Object" #14539

@ericWadeFord

Description

@ericWadeFord

Description

Exporting a custom dashboard configuration as JSON via the UI export button fails silently — nothing happens in the UI. Inspecting browser Developer Tools (Network tab) reveals the toConfigurationExport GraphQL query returns an INTERNAL_SERVER_ERROR with the message "Expected a string but received a Object".

The toConfigurationExport resolver is expected to return a serialized JSON string, but a field within the workspace's stored configuration appears to contain an object where a string is expected, causing the serialization to fail.

The frontend export handler (workspaceExportHandler.tsx) calls the following GraphQL query:

graphql
Copy
query workspaceExportHandlerQuery($id: String!) {
    workspace(id: $id) {
        toConfigurationExport
    }
}

The resolver in workspace-resolver.ts handles this query. The error indicates a type mismatch during response serialization — a workspace configuration field stores an object where the export logic expects a string.

Environment

6.9.21

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Navigate to the custom dashboard "IR Case Tracking" in the CSM platform. One of the widgets uses Dynamic filters, i.e., Dynamic from and Dynamic to
  2. Click the Export button (file icon with arrow, top-right corner of the dashboard) to export the dashboard configuration as JSON.
  3. Nothing happens in the UI — no file download is triggered, no error toast is displayed.
  4. Open browser Developer Tools → Network tab → inspect the GraphQL POST request.
  5. The response contains an INTERNAL_SERVER_ERROR.

Expected Output

Clicking the export button should trigger a JSON file download named YYYYMMDD_octi_dashboard_IR Case Tracking.json containing the dashboard's portable configuration, suitable for import on another OpenCTI instance.

Actual Output

No file is downloaded. The UI provides no error feedback to the user. The GraphQL response returns:

{
  "errors": [
    {
      "message": "Expected a string but received a Object",
      "locations": [
        {
          "line": 5,
          "column": 5
        }
      ],
      "path": [
        "workspace",
        "toConfigurationExport"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR"
      },
      "name": "INTERNAL_SERVER_ERROR"
    }
  ],
  "data": {
    "workspace": null
  }
}

Additional information

  • Not user-resolvable — the error originates in the backend resolver's serialization logic. There is no user-facing way to edit the raw workspace configuration to correct the type mismatch.
  • Possible root cause: A widget configuration or filter parameter within this dashboard's stored manifest contains a nested object where the toConfigurationExport serializer expects a flat string value. This may be due to a schema evolution where the widget configuration format was updated but the export serializer was not updated to handle the new structure.
  • Tested exporting other dashboards on the same instance to determine if the bug is specific to this dashboard's configuration or a broader regression.

Screenshots (optional)

Image

Network tab showing the failed request

Image

Request payload

Image Image

Suspected widget configuration

Image

GraphQL Playground reproduction

Metadata

Metadata

Assignees

No one assigned

    Labels

    dashboardsLinked to dashboards and widgets

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions