admin管理员组文章数量:1312692
I'm using the Google Cloud Run Firestore integration, which worked fine until recently. I can't do any CRUD operations aynmore, while I'm able to authenticate.
This only occurs on the Google Cloud Run instance but not when I connect to the same database locally (with a service account).
The error is:
2024-08-23 10:19:55.857 CEST
Caused by: Error
2024-08-23 10:19:55.857 CEST
at Firestore.getAll (/home/node/app/node_modules/@google-cloud/firestore/build/src/index.js:1007:23)
2024-08-23 10:19:55.857 CEST
at DocumentReference.get (/home/node/app/node_modules/@google-cloud/firestore/build/src/reference/document-reference.js:180:32)
2024-08-23 10:19:55.857 CEST
at pareCredentials (file:///home/node/app/auth.js:55:40)
2024-08-23 10:19:55.857 CEST
at authenticate (file:///home/node/app/auth.js:200:16)
2024-08-23 10:19:55.857 CEST
at postAuthAdmin (file:///home/node/app/routes.js:354:37)
2024-08-23 10:19:55.857 CEST
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2024-08-23 10:19:55.857 CEST
at async Server.server (file:///home/node/app/server.js:173:15) {
2024-08-23 10:19:55.857 CEST
code: 'ERR_BUFFER_OUT_OF_BOUNDS'
2024-08-23 10:19:55.857 CEST
}
And the code:
const firestore = new Firestore({ databaseId: 'projecttest' })
const credsColl = firestore.collection('creds')
const adminCredsDoc = credsColl.doc('admin')
const adminDoc = await adminCredsDoc.get() // ERR_BUFFER_OUT_OF_BOUNDS
The document I'm trying to get (password is faked):
{
user: 'admin',
password: '$2a$12$kHkqVa3fHz7qRBpv5BSPCOjci1H77AGHNXsReL3Huw9vITk5lqcXG'
}
I'm using the Google Cloud Run Firestore integration, which worked fine until recently. I can't do any CRUD operations aynmore, while I'm able to authenticate.
This only occurs on the Google Cloud Run instance but not when I connect to the same database locally (with a service account).
The error is:
2024-08-23 10:19:55.857 CEST
Caused by: Error
2024-08-23 10:19:55.857 CEST
at Firestore.getAll (/home/node/app/node_modules/@google-cloud/firestore/build/src/index.js:1007:23)
2024-08-23 10:19:55.857 CEST
at DocumentReference.get (/home/node/app/node_modules/@google-cloud/firestore/build/src/reference/document-reference.js:180:32)
2024-08-23 10:19:55.857 CEST
at pareCredentials (file:///home/node/app/auth.js:55:40)
2024-08-23 10:19:55.857 CEST
at authenticate (file:///home/node/app/auth.js:200:16)
2024-08-23 10:19:55.857 CEST
at postAuthAdmin (file:///home/node/app/routes.js:354:37)
2024-08-23 10:19:55.857 CEST
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2024-08-23 10:19:55.857 CEST
at async Server.server (file:///home/node/app/server.js:173:15) {
2024-08-23 10:19:55.857 CEST
code: 'ERR_BUFFER_OUT_OF_BOUNDS'
2024-08-23 10:19:55.857 CEST
}
And the code:
const firestore = new Firestore({ databaseId: 'projecttest' })
const credsColl = firestore.collection('creds')
const adminCredsDoc = credsColl.doc('admin')
const adminDoc = await adminCredsDoc.get() // ERR_BUFFER_OUT_OF_BOUNDS
The document I'm trying to get (password is faked):
{
user: 'admin',
password: '$2a$12$kHkqVa3fHz7qRBpv5BSPCOjci1H77AGHNXsReL3Huw9vITk5lqcXG'
}
Share
Improve this question
asked Aug 23, 2024 at 8:28
JulianJulian
1,4671 gold badge13 silver badges31 bronze badges
1
- I'm facing exactly the same issue today. Nothing has changed, but it started giving me this error when running on a server. Locally everything is fine... – Yuri Drabik Commented Aug 23, 2024 at 8:59
1 Answer
Reset to default 15Which version of Node are you running? I had the same issue with the latest version 22.7.0 and downgraded to the one I used before, 22.5.0. That worked.
Please check also the issue I filed here:
https://github./nodejs/node/issues/54518
EDIT:
The issue has been addressed and will be fixed in version 22.8.0: https://github./nodejs/node/issues/54518#issuement-2307687124
本文标签:
版权声明:本文标题:javascript - Google Cloud Run Firestore: [ERR_BUFFER_OUT_OF_BOUNDS]: "length" is outside of buffer bounds - St 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741853034a2401179.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论