TypeError: can't convert undefined to object

Description

When reporting queries have been made available from the repository https://github.com/metadb-project/metadb-examples/tree/main/folio/reports

  1. Go to https://folio-snapshot.dev.folio.org/ldp/templated

  2. Select the “Missing items” report from the GitHub repo `metadb-project/metadb-examples`

  3. Click Submit.

The SPA reports “**Something went wrong**. An error occurred on this page and it could not be loaded”.

Clicking the View error details button shows:

The following occurred, resulting in the current page becoming unstable: Error: TypeError: can't convert undefined to object Xl@https://folio-snapshot.dev.folio.org/bundle.stripese0dbcab9a1bab3820eb4.js:9652:18785 Hs@https://folio-snapshot.dev.folio.org/bundle.stripese0dbcab9a1bab3820eb4.js:9654:48092 W@https://folio-snapshot.dev.folio.org/bundle.stripese0dbcab9a1bab3820eb4.js:9654:43445 [etc.]

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Checklist

hide

Activity

Show:

Mike Taylor February 12, 2025 at 12:26 PM

Working correctly on snapshot now, using the dummy report “Missing items (always empty)”.

Mike Taylor February 11, 2025 at 5:15 PM

Fixed and merged to master.

Tomorrow I will QA it on snapshot.

Mike Taylor February 11, 2025 at 5:06 PM

The evidence is that this problem occurs, or can occur, when there are no hits. Sometimes — I don’t understand when — the display code that tries to figure out the names of the columns by looking at the keys in the first data row blows up.

This is easily protected against.

Mike Taylor February 11, 2025 at 5:04 PM

It seems that this error message, “can't convert undefined to object” occurs only in a few contexts. The only one where I’ve made it happen with experiments in the console is when passing an undefined value to Object.keys, though no doubt there are others.

Done

Details

Assignee

Reporter

Priority

Sprint

Development Team

Thor

Fix versions

RCA Group

TBD

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created February 11, 2025 at 12:35 PM
Updated February 12, 2025 at 12:26 PM
Resolved February 12, 2025 at 12:26 PM
TestRail: Cases
TestRail: Runs

Flag notifications