platform icon indicating copy to clipboard operation
platform copied to clipboard

Repeated `Block height changed handler is already set` warnings using JS SDK

Open riongull opened this issue 1 year ago • 1 comments

Expected Behavior

No (or one) warning during script execution

Current Behavior

warn: Running on a NodeJS env without any specified adapter. Data will not persist.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.
warn: [Wallet: 40331ae54d] [TransactionsSyncWorker] Block height changed handler is already set.

Possible Solution

Not sure.

Steps to Reproduce (for bugs)

From Anthony's platform tutorial, I ran into the issue above during the updateContract, submitNoteDocument, topUpIdentities, updateNoteDocument and deleteNoteDocument scripts. Not sure how consistent/reproducible it is.

Your Environment

  • Version used: JS SDK v4.2.0
  • Environment name and version: Node.js v22.5.1
  • Operating System and version: Desktop MacOS 12.6.3
  • Project: https://github.com/riongull/first-look-dash?tab=readme-ov-file

riongull avatar Sep 06 '24 20:09 riongull

Thank you for your report. This is happening in case if block sync worker in wallet lib is not getting new L1 blocks for some reason. It will be difficult to fix atm. We are planning to rework our SDK soon. I will comeback with more details when we have our SDK roadmap defined.

shumkov avatar Sep 20 '24 20:09 shumkov