Skip to content

Conversation

@neilcampbell
Copy link
Contributor

@neilcampbell neilcampbell commented Jun 26, 2025

The indexer API supports retrieving deleted applications by suppling the include-all=true param when calling /v2/applications/{applicationId}, however when fetching a deleted application via the algosdk using indexer.lookupApplications(applicationId).includeAll(true).do() it throws an error "Invalid byte array: (object) null".

This error is due to the indexer API returning a null value for the approval-program and clear-state-program, however those values are deserialized using the ByteArraySchema which expects a base64 encoded bytes value. This can be observed in this application https://mainnet-idx.algonode.cloud/v2/applications/2365972864?include-all=true

This PR updates the ByteArraySchema JSON deserializer to handle null or undefined values and maps them to the default value (empty byte array).

@gmalouf gmalouf added the Bug-Fix label Aug 4, 2025
@gmalouf gmalouf self-assigned this Aug 4, 2025
@gmalouf gmalouf merged commit ae42ca9 into algorand:main Aug 4, 2025
13 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants