Skip to content

Conversation

@doomsower
Copy link

While doing huge read request I encountered following error in my code:

RangeError: Maximum call stack size exceeded 
    at String.match (<anonymous>)
    at _getBytes (/app/node_modules/ethers/src.ts/utils/data.ts:34:45)
    at getBytes (/app/node_modules/ethers/src.ts/utils/data.ts:55:12)
    at hexlify (/app/node_modules/ethers/src.ts/utils/data.ts:102:19)
    at JsonRpcProvider.#call (/app/node_modules/ethers/src.ts/providers/abstract-provider.ts:974:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

With some insight from this post here I changed regexp to use non-capturing group, and that fixed my app.

@ricmoo
Copy link
Member

ricmoo commented May 29, 2024

Good idea! I'll get this into the next patch release.

Thanks! :)

@ricmoo ricmoo added enhancement New feature or improvement. on-deck This Enhancement or Bug is currently being worked on. v6 Issues regarding v6 next-patch Issues scheduled for the next arch release. labels May 29, 2024
ricmoo added a commit that referenced this pull request May 29, 2024
@ricmoo
Copy link
Member

ricmoo commented Jun 2, 2024

Added in v6.12.2. Let me know if you come across any other regex's that make sense to non-capture. ;)

Thanks!

@ricmoo ricmoo closed this Jun 2, 2024
@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or improvement. fixed/complete This Bug is fixed or Enhancement is complete and published. next-patch Issues scheduled for the next arch release. v6 Issues regarding v6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants