question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: decoded.map is not a function

See original GitHub issue

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: https://github.com/googleapis/nodejs-spanner/issues/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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
splawndivecommented, Jun 25, 2021

Thanks for getting this one fixed so quickly @skuruppu @olavloite – we’ll try out this version next week and report back

0reactions
olavloitecommented, Jul 9, 2021

Thanks for getting this one fixed so quickly @skuruppu @olavloite – we’ll try out this version next week and report back

@splawndive Did you have a chance to try this version? And if so, were you able to detect any improvement?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: decoded.map is not a function · Issue #198 - GitHub
Environment details OS: CoreOS Node.js version: v8.9.4 npm version: v6.0.1 @google-cloud/spanner version: v1.4.1 Steps to reproduce ?
Read more >
TypeError: .map is not a function - React application
I created this React application to practice the fetch API. However, while writing the code to display the data on the browser via...
Read more >
TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >
Uncaught (in promise) TypeError: data.map is not a function at ...
But here you're using it on an object, data . As such, the compiler is telling you that .map() is not a function...
Read more >
Solved: "replaceAll is not a function" JavaScript TypeError
If you're seeing the error " TypeError: replaceAll is not a function ", it is likely due to the method not implemented/supported by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found