Description
After upgrading to subquerynetwork/subql-node-cosmos:v5.4.0, the previously working node-fetch logic in the project started failing.
Downgrading to v5.3.0 resolves the issue, confirming a regression introduced in v5.4.0.
Error Message
2026-04-06T10:22:14.623Z <sandbox-#4> ERROR Indexer revalidate error: Cannot read properties of undefined (reading 'substring')
Environment
- Indexer image:
subquerynetwork/subql-node-cosmos:v5.4.0
- Working version:
v5.3.0
Steps to Reproduce
Make an external API request using node-fetch inside the runtime code of a SubQuery Cosmos project.
Expected Behavior
fetch (or node-fetch) should work as it did in v5.3.0 without throwing substring errors.
Question
How should fetch operations be properly supported in the latest version? Is there a recommended replacement (e.g., native fetch or another approach) for making external API calls in the runtime?
Additional Context
This seems related to changes in the sandbox or runtime environment between v5.3.0 and v5.4.0. Any guidance on the correct migration path would be appreciated.
Description
After upgrading to
subquerynetwork/subql-node-cosmos:v5.4.0, the previously workingnode-fetchlogic in the project started failing.Downgrading to
v5.3.0resolves the issue, confirming a regression introduced in v5.4.0.Error Message
Environment
subquerynetwork/subql-node-cosmos:v5.4.0v5.3.0Steps to Reproduce
Make an external API request using
node-fetchinside the runtime code of a SubQuery Cosmos project.Expected Behavior
fetch(ornode-fetch) should work as it did in v5.3.0 without throwingsubstringerrors.Question
How should
fetchoperations be properly supported in the latest version? Is there a recommended replacement (e.g., nativefetchor another approach) for making external API calls in the runtime?Additional Context
This seems related to changes in the sandbox or runtime environment between v5.3.0 and v5.4.0. Any guidance on the correct migration path would be appreciated.