This repository was archived by the owner on Mar 4, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 113
This repository was archived by the owner on Mar 4, 2026. It is now read-only.
Error: decoded.map is not a function #198
Copy link
Copy link
Closed
Labels
🚨This issue needs some love.This issue needs some love.api: spannerIssues related to the googleapis/nodejs-spanner API.Issues related to the googleapis/nodejs-spanner API.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- OS: CoreOS
- Node.js version: v8.9.4
- npm version: v6.0.1
@google-cloud/spannerversion: v1.4.1
Steps to reproduce
- ???
- ???
This error is occasionally happening when running the same query as in #197.
SELECT * FROM <TABLE> ORDER BY id LIMIT 10000 OFFSET @offsetconst [rows] = await spannerDb.run({
sql: 'SELECT * FROM <table> ORDER BY id LIMIT @limit OFFSET @offset',
params: {
limit: 10000,
offset: 0,
},
}, { readTimestamp: timestampBound });
return rows.map(row => row.toJSON()); // Causes error from scrambled dataTypeError: decoded.map is not a function
at decodeValue_ (/opt/app/node_modules/@google-cloud/spanner/src/codec.js:145)
at Object.decode (/opt/app/node_modules/@google-cloud/spanner/src/codec.js:179)
at (/opt/app/node_modules/@google-cloud/spanner/src/partial-result-stream.js:183)
at Array.map (<anonymous>)
at Function.partialResultStream.formatRow_ (partial-result-stream.js:179)
at (/opt/app/node_modules/@google-cloud/spanner/src/partial-result-stream.js:175)
at Array.map (<anonymous>)
at Function.partialResultStream.formatRow_ (partial-result-stream.js:173)
at DestroyableTransform._transform (/opt/app/node_modules/@google-cloud/spanner/src/partial-result-stream.js:99)
at DestroyableTransform.Transform._read (_stream_transform.js:184)
at DestroyableTransform.Transform._write (_stream_transform.js:172)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: spannerIssues related to the googleapis/nodejs-spanner API.Issues related to the googleapis/nodejs-spanner API.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.