Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot return null for non-nullable field Redeemer.scriptHash #895

Open
2 of 6 tasks
alecalve opened this issue Sep 9, 2024 · 3 comments
Open
2 of 6 tasks

Cannot return null for non-nullable field Redeemer.scriptHash #895

alecalve opened this issue Sep 9, 2024 · 3 comments
Labels

Comments

@alecalve
Copy link

alecalve commented Sep 9, 2024

Summary

This error happened first when querying this transaction with the following GraphQL query:

query Query($txHash: Hash32Hex) {
    transactions(where: {hash: {_eq: $txHash}}) {
        redeemers {
            scriptHash
        }
    }
}

Steps to reproduce the bug

Run the query against a Cardano graphql instance

Actual Result

See the following error:

Error(
    message = Cannot return null for non-nullable field Redeemer.scriptHash., 
    locations = [Location(line = 1, column = 115)], 
    customAttributes = {path=[transactions, 0, redeemers, 0, scriptHash], 
    extensions={
        code=INTERNAL_SERVER_ERROR, 
        exception={
            stacktrace=[
                Error: Cannot return null for non-nullable field Redeemer.scriptHash.,     
                at completeValue (/app/node_modules/graphql/execution/execute.js:560:13),     
                at completeValueCatchingError (/app/node_modules/graphql/execution/execute.js:495:19),     
                at resolveField (/app/node_modules/graphql/execution/execute.js:435:10),     
                at executeFields (/app/node_modules/graphql/execution/execute.js:275:18),     
                at collectAndExecuteSubfields (/app/node_modules/graphql/execution/execute.js:713:10),     
                at completeObjectValue (/app/node_modules/graphql/execution/execute.js:703:10),     
                at completeValue (/app/node_modules/graphql/execution/execute.js:591:12),     
                at completeValueCatchingError (/app/node_modules/graphql/execution/execute.js:495:19),     
                at /app/node_modules/graphql/execution/execute.js:618:25,     
                at Array.forEach (<anonymous>)
            ]
        }
    }
})

Expected Result

We'd expect to get a successful output.

Environment

    image: ghcr.io/intersectmbo/cardano-node:9.1.0
    image: cardanosolutions/ogmios:v6.5.0
    image: ghcr.io/intersectmbo/cardano-db-sync:13.5.0.0
    image: postgres:14-alpine
    image: cardanofoundation/cardano-graphql-hasura:8.2.0
    image: cardanofoundation/cardano-graphql-background:8.2.0-mainnet
    image: cardanofoundation/cardano-graphql:8.2.1

Platform

  • Linux (Ubuntu)
  • Linux (Other)
  • macOS
  • Windows

Platform version

No response

Runtime

  • Node.js
  • Docker

Runtime version

No response

@alecalve alecalve added the BUG label Sep 9, 2024
@Kammerlo
Copy link
Member

Could you provide me the transaction hash you were trying to fetch? Because I can't reproduce it with others.

@alecalve
Copy link
Author

It's this one https://cardanoscan.io/transaction/95f880700a8ad31515aeece30737868b9dcd26ade91e909b25a4d033bfe4840d?tab=summary

@Kammerlo
Copy link
Member

Kammerlo commented Oct 1, 2024

@alecalve Sorry for the very late reply. I started to reproduce the error, but still can't manage to get the same error message.
When querying your example request I get the following response:
{ "data": { "transactions": [ { "redeemers": [ { "scriptHash": null } ] } ] } }

In CardanoScan I see that there is a contract, but the data is null as well.
So the response I get seems correct (I double checked it on db-sync database level).
If the data is wrong it might be a problem for db-sync.

Did you manage to find the issue for your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants