学習方法

メンター情報

料金

対応時間帯

返信スピード

学習方法

メンター情報

料金

対応時間帯

返信スピード

募集をシェアしてメンターを探そう
シェア

※ この募集は締め切られました。

プログラミング Firebase Firestore CloudFunctions JavaScript TypeScript

定期実行しているCloud Functionsが実行失敗してしまう件について

2022年7月14日
単発
予算
3,000円 〜 7,000円
提案数
2人が提案中
応募期限
終了

【概要】
これまで正常に動作していた、毎日22:00にCloud Functions定期実行している処理が6月を境に断続的にエラーで失敗するようになってしまいました。
失敗する日が連続することもあれば、失敗しない日もあります。
エラー内容は以下の通りです。

Error: 3 INVALID_ARGUMENT: inequality filter property and first sort order must be the same: contractRenewalDate and __key__
at Object.callErrorFromStatus (/workspace/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client.js:331:49)
at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
at /workspace/node_modules/@grpc/grpc-js/build/src/call-stream.js:182:78
at processTicksAndRejections (node:internal/process/task_queues:78:11)

以下の箇所でエラーが発生していると思われます。
const records = await
firestore
.collection("records")
.where("contractRenewalDate", "!=", null)
.where("isPaused", "==", false)
.get();

【目的】
断続的に定期処理がエラーで失敗する原因を発見して修正したいです。

【募集背景】
数日間エラーの調査を行いましたが解明できず、経験者の助言をいただきたく募集させていただきました。

募集をシェアしてメンターを探そう
シェア