BigInt serialization TypeError in MonitorServiceImpl
メンテナーはふだん 8 日以内に返信
関連するプルリクエストがすでにマージされています。
- #703 @karenc-bq による — マージ済み
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 70/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
common/lib/utils/monitoring/monitor_service.ts から始め、特に MonitorServiceImpl.checkMonitors() と、runCleanupLoop() を通る cleanup パスを調査します。Monitor のロギングに使用されている JSON.stringify() の呼び出しを、参照されている行および類似のケースも含めて確認します。monitoring のアクティビティによって BigInt のシリアライズに関する TypeErrors が発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
After upgrading to 3.0.0, I've started to see uncaught exceptions from within the library for TypeError: Do not know how to serialize a BigInt. It appears that MonitorServiceImpl::checkMonitors() attempts to serialize Monitor objects for logging with JSON.stringify(), but these include BigInt members that fail. One such place is:
There appear to be several other similar cases throughout monitor_service.ts.
Expected Behavior
No exceptions attempting to serialize BigInt.
What plugins are used? What other connection properties were set?
efm2
Current Behavior
Example stack trace:
TypeError: Do not know how to serialize a BigInt
at JSON.stringify ()
at MonitorServiceImpl.checkMonitors (file:///redacted/node_modules/aws-advanced-nodejs-wrapper/dist/common/lib/utils/monitoring/monitor_service.js:148:81)
at MonitorServiceImpl.runCleanupLoop (file:///redacted/node_modules/aws-advanced-nodejs-wrapper/dist/common/lib/utils/monitoring/monitor_service.js:106:18)
} reason: TypeError: Do not know how to serialize a BigInt
at JSON.stringify ()
at MonitorServiceImpl.checkMonitors (file:///redacted/node_modules/aws-advanced-nodejs-wrapper/dist/common/lib/utils/monitoring/monitor_service.js:148:81)
at MonitorServiceImpl.runCleanupLoop (file:///redacted/node_modules/aws-advanced-nodejs-wrapper/dist/common/lib/utils/monitoring/monitor_service.js:106:18)
Reproduction Steps
I don't have a quick reproducer since the issue seems to depend on the the monitoring state and activity. In my application, this sometimes happen after some period of inactivity or just before/after activity. I believe attempting to JSON.stringify() a BigInt is always an error unless the library were to provide a replacer function to JSON.stringify().
Possible Solution
Provide a replacer function to JSON.stringify() to handle the BigInt fields or perform some alternative serialization of the Monitor objects for logging.
Additional Information/Context
This is my first bug report here. Thanks for the great library.
The AWS Advanced NodeJs Wrapper version used
3.0.0
Node version used
24
Operating System and version
Rocky Linux 8.10
- 主要言語
- TypeScript
- スター
- 38
- フォーク
- 17
- 平均マージ
- 7日 11時間
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws/aws-advanced-nodejs-wrapper のほかの issue
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
aws/aws-advanced-nodejs-wrapper#527 · コメント 7 件 · リアクション 1 件 ·
メンテナーはふだん 8 日以内に返信
aws/aws-advanced-nodejs-wrapper の issue をすべて見る
似ている issue
-
e2e-failure ready-to-code
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
redhat-developer/rhdh-plugin-export-overlays#4616 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
ai-handle
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nextlevelbuilder/dewee-web-v2#73 ·
メンテナーはふだん 1 日以内に返信
-
backend bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
PoCInnovation/Distribox#255 ·
メンテナーはふだん 1 日以内に返信