You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling contract.getPastEvents or contract.events.allEvents() throws error SubscriptionError: Failed to get past events., if there is no matching events
#6644
When calling contract.events.allEvents(...), if there is no previous events to get, the following error came:
Error: Unhandled error. (SubscriptionError: Failed to get past events.
at /home/maltabba/repos/web3v4.x/packages/web3-eth-contract/src/contract.ts:1341:8
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
cause: TypeError: Cannot read properties of undefined (reading 'map')
at Contract.map (/home/maltabba/repos/web3v4.x/packages/web3-eth-contract/src/contract.ts:909:28)
at Generator.next (<anonymous>)
at fulfilled (/home/maltabba/repos/web3v4.x/packages/web3-eth-contract/src/contract.ts:9589:24)
at processTicksAndRejections (node:internal/process/task_queues:95:5),
code: 603
})
at new NodeError (node:internal/errors:388:5)
at EventEmitter.emit (node:events:526:17)
at LogsSubscription.emit (/home/maltabba/repos/web3v4.x/packages/web3-core/src/web3_event_emitter.ts:49:17)
at /home/maltabba/repos/web3v4.x/packages/web3-eth-contract/src/contract.ts:11715:15
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_UNHANDLED_ERROR',
context: SubscriptionError: Failed to get past events.
at /home/maltabba/repos/web3v4.x/packages/web3-eth-contract/src/contract.ts:1341:8
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
cause: TypeError: Cannot read properties of undefined (reading 'map')
at Contract.map (/home/maltabba/repos/web3v4.x/packages/web3-eth-contract/src/contract.ts:909:28)
at Generator.next (<anonymous>)
at fulfilled (/home/maltabba/repos/web3v4.x/packages/web3-eth-contract/src/contract.ts:9589:24)
at processTicksAndRejections (node:internal/process/task_queues:95:5),
code: 603
}
}
Environment
web3 v4
The text was updated successfully, but these errors were encountered:
Actual behavior
When calling
contract.events.allEvents(...)
, if there is no previous events to get, the following error came:Environment
web3 v4
The text was updated successfully, but these errors were encountered: