Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

TypeError: decoded.map is not a function #1392

@splawndive

Description

@splawndive

Environment details

  • OS: Google Container-Optimized OS
  • Node.js version: 14.15 (also experienced on 12.18)
  • npm version: 6.14
  • @google-cloud/spanner version: 5.7.0

Steps to reproduce

  1. ?
  2. ?

We're seeing an issue more-or-less identical to this one opened by a coworker of mine a ways back: #198. It happens pretty inconsistently, so I'm not sure of how exactly to reproduce it. The error message looks like:

TypeError: decoded.map is not a function at Object.decode (/opt/app/node_modules/@google-cloud/spanner/build/src/codec.js:299:31)

Possibly related, we're seeing a separate error message, though much less frequently:

TypeError: tail.shift is not a function at Function.mergeLists (/opt/app/node_modules/@google-cloud/spanner/build/src/partial-result-stream.js:239:77)

The code in our application looks something like this:

// query returns ~90k rows -- each `arrayOfStrings` value consists of 0-4 short strings
const stream = spannerDb.runStream({
  sql: '
    SELECT string1, string2, bool1, arrayOfStrings
    FROM <table>
  ',
  json: true,
});

Please let me know what other information may be helpful

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/nodejs-spanner API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions