pouchdb / pouchdb-server

CouchDB-compatible server built on PouchDB and Node
Apache License 2.0
944 stars 155 forks source link

Invalid String Length #473

Open jasondalycan opened 1 year ago

jasondalycan commented 1 year ago

Issue

When running a Mango query that returns a large dataset the following error is returned:

RangeError: Invalid string length.

This error is on line 212 of utils.js and occurs when JSON.stringify() is executed against a large JSON object.

Info

Reproduce

To reproduce the issue, run the following query against a database that will return a very large JSON result: let result = await mydb.find({selector: {"field1": "veryCommonValue"}});