Skip to content

BSONOffsetError error when trying to load from Atlas #4

@benjitastic

Description

@benjitastic

In wrangler.toml I had to change this:

[alias]
"net" = "@jchoi2x/cf-mongodb-polyfills/net"
"dns" = "@jchoi2x/cf-mongodb-polyfills/dns"
"tls" = "@jchoi2x/cf-mongodb-polyfills/tls"

To this:

[alias]
"net" = "cf-mongodb-polyfills/net"
"dns" = "cf-mongodb-polyfills/dns"
"tls" = "cf-mongodb-polyfills/tls"

It appears I am able to connect to database but then when trying to retrieve docs I am getting this error:

const result = await collection.find({}).toArray()

causes this error:

BSONOffsetError: Parsed documentSize (36755 bytes) does not match input length (4075 bytes). offset: 0

Any ideas why? I have double checked the collection name and the DB connect appears to succeed. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions