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

Error: Query root type must be provided. #281

Closed
vae520283995 opened this issue Aug 13, 2020 · 16 comments · Fixed by #309
Closed

Error: Query root type must be provided. #281

vae520283995 opened this issue Aug 13, 2020 · 16 comments · Fixed by #309
Assignees

Comments

@vae520283995
Copy link

root@ip-172-31-38-92:/home/ubuntu# curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardanoDbMeta { initialized syncPercentage }}"}' http://localhost:3100/graphql
{"data":{"cardanoDbMeta":{"initialized":true,"syncPercentage":100}}}
root@ip-172-31-38-92:/home/ubuntu# curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardano { tip { number slotNo epoch { number } } } }"}' http://localhost:3100/graphql
{"errors":[{"message":"Error: Query root type must be provided.","locations":[{"line":1,"column":3}],"path":["cardano"],"extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"stacktrace":["Error: Error: Query root type must be provided."," at Object. (/application/packages/api-cardano-db-hasura/dist/executableSchema.js:78:35)"," at Generator.next ()"," at /application/packages/api-cardano-db-hasura/dist/executableSchema.js:8:71"," at new Promise ()"," at __awaiter (/application/packages/api-cardano-db-hasura/dist/executableSchema.js:4:12)"," at cardano (/application/packages/api-cardano-db-hasura/dist/executableSchema.js:63:63)"," at field.resolve (/application/node_modules/graphql-extensions/dist/index.js:134:26)"," at field.resolve (/application/node_modules/apollo-server-core/dist/utils/schemaInstrumentation.js:52:26)"," at resolveFieldValueOrError (/application/node_modules/graphql/execution/execute.js:467:18)"," at resolveField (/application/node_modules/graphql/execution/execute.js:434:16)"]}}}],"data":null}

Did I do something wrong?
@rhyslbw

@rhyslbw rhyslbw added the waiting on author Have asked for more information, next action on the author label Aug 13, 2020
@rhyslbw rhyslbw self-assigned this Aug 13, 2020
@rhyslbw
Copy link
Contributor

rhyslbw commented Aug 13, 2020

@vae520283995
Please complete the bug report template and attach above

@vae520283995
Copy link
Author

vae520283995 commented Aug 13, 2020

Environment

The CLI can be used to gather generic information about your system to assist with support.
No installation is required thanks to npx

npx @cardano-graphql/cli system-info

Alternatively, what release or Git revision are you using: git version 2.7.4

Platform

  • [√] Linux / Ubuntu
  • Linux / Other
  • macOS
  • Windows

Platform version: Linux version 4.4.0-1092-aws (buildd@lgw01-amd64-030) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ) #103-Ubuntu SMP Tue Aug 27 10:21:48 UTC 2019

Runtime

  • Node.js
  • [√] Docker

Runtime version:

node -v
docker version Docker version 19.03.5, build 633a0ea838  docker-compose version 1.25.0, build 0a186604

Steps to reproduce the bug

Execute according to this document
https://github.com/input-output-hk/cardano-graphql/blob/master/README.md

root@ip-172-31-38-92:/home/ubuntu# curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardanoDbMeta { initialized syncPercentage }}"}' http://localhost:3100/graphql
{"data":{"cardanoDbMeta":{"initialized":true,"syncPercentage":100}}}
root@ip-172-31-38-92:/home/ubuntu# curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardano { tip { number slotNo epoch { number } } } }"}' http://localhost:3100/graphql
{"errors":[{"message":"Error: Query root type must be provided.","locations":[{"line":1,"column":3}],"path":["cardano"],"extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"stacktrace":["Error: Error: Query root type must be provided."," at Object. (/application/packages/api-cardano-db-hasura/dist/executableSchema.js:78:35)"," at Generator.next ()"," at /application/packages/api-cardano-db-hasura/dist/executableSchema.js:8:71"," at new Promise ()"," at __awaiter (/application/packages/api-cardano-db-hasura/dist/executableSchema.js:4:12)"," at cardano (/application/packages/api-cardano-db-hasura/dist/executableSchema.js:63:63)"," at field.resolve (/application/node_modules/graphql-extensions/dist/index.js:134:26)"," at field.resolve (/application/node_modules/apollo-server-core/dist/utils/schemaInstrumentation.js:52:26)"," at resolveFieldValueOrError (/application/node_modules/graphql/execution/execute.js:467:18)"," at resolveField (/application/node_modules/graphql/execution/execute.js:434:16)"]}}}],"data":null}

What is the expected behavior?

root@ip-172-31-38-92:/home/ubuntu# curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardano { tip { number slotNo epoch { number } } } }"}' http://localhost:3100/graphql
{ "data": { "cardano": { "tip": { "number": 4391749, "slotNo": 4393973, "epoch": { "number": 203 } } } } }

@rhyslbw
Copy link
Contributor

rhyslbw commented Aug 13, 2020

with the stack running, please run docker-compose images and paste the output

@vae520283995
Copy link
Author

vae520283995 commented Aug 13, 2020

root@ip-172-31-38-92:/data/cardano-graphql/cardano-graphql# docker-compose images
WARNING: The POSTGRES_DATA variable is not set. Defaulting to a blank string.
WARNING: The POSTGRES_NAME variable is not set. Defaulting to a blank string.
WARNING: The NODE_DB variable is not set. Defaulting to a blank string.
WARNING: The NODE_IPC variable is not set. Defaulting to a blank string.
WARNING: The CARDANO_NODE_NAME variable is not set. Defaulting to a blank string.
WARNING: The CARDANO_DB_SYNC_NAME variable is not set. Defaulting to a blank string.
WARNING: The CARDANO_GRAPHQL_HASURA_NAME variable is not set. Defaulting to a blank string.
WARNING: The CARDANO_GRAPHQL_NAME variable is not set. Defaulting to a blank string.
          Container                          Repository                                 Tag                        Image Id       Size  
----------------------------------------------------------------------------------------------------------------------------------------
cardano-db-sync-mainnet          inputoutput/cardano-db-sync          36e7621fa5ecb4be923569f735b74d60a26da6c1   0e1e5658fc52   1.003 GB
cardano-graphql-hasura-mainnet   inputoutput/cardano-graphql-hasura   2.0.0                                      20ec2257c042   123.5 MB
cardano-graphql-mainnet          inputoutput/cardano-graphql          2.0.0                                      d8ca620fd554   92.43 MB
cardano-node-mainnet             rhyslbw/cardano-node                 a4b6dae699fa21dc3c025c8a83d1718475cb3afc   9df1e6db7ff4   778 MB  
postgres-mainnet                 postgres                             11.5-alpine                                da01ecfbabe1   71.85 MB

@vae520283995
Copy link
Author

The reason for the warning is that I customize the container name and data directory

@vae520283995
Copy link
Author

vae520283995 commented Aug 14, 2020

root@ip-172-31-38-16:/home/ubuntu# curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardanoDbMeta { initialized syncPercentage }}"}' http://localhost:3100/graphql
{"data":{"cardanoDbMeta":{"initialized":false,"syncPercentage":100}}}
[7a09bbf3:cardano.node.ErrorPolicy:Notice:53] [2020-08-14 08:47:37.20 UTC] [String "ErrorPolicySuspendConsumer (Just (ConnectionExceptionTrace (SubscriberError {seType = SubscriberParallelConnectionCancelled, seMessage = \"Parallel connection cancelled\", seStack = []}))) 1s",String "ErrorPolicyTrace",String "18.194.0.10:3001"]
cardano-node_1              | [7a09bbf3:cardano.node.DnsSubscription:Error:26515] [2020-08-14 08:47:37.70 UTC] [String "Application Exception: 35.177.103.2:3001 HeaderError (At (Block {blockPointSlot = SlotNo {unSlotNo = 5789249}, blockPointHash = 68914f093daebff961def6df4830a21b2fffccec69442e8e6b780e51c40d5217})) (HeaderProtocolError (HardForkValidationErrFromEra S (Z (WrapValidationErr {unwrapValidationErr = ChainTransitionError [OverlayFailure (VRFLeaderValueTooBig (OutputVRF {getOutputVRFBytes = \"\\NUL\\NUL\\157\\185\\199\\189l\\210Y\\130\\175\\220\\248\\140\\242\\129\\&4!\\138\\193\\175\\235\\238c*h(\\\\\\187\\156Y3\\239\\204lYMF\\160\\239F.>S\\248\\193l\\CAN\\162\\181\\204\\147\\241\\EOT\\183\\182P{R`z\\200vM\"}) (0 % 1) (ActiveSlotCoeff {unActiveSlotVal = UnsafeUnitInterval (1 % 20), unActiveSlotLog = -512932943875505334261962382072846}))]})))) (Tip (SlotNo {unSlotNo = 5789244}) 9c925a40b21eb2768f2b07733568f7bd9dbfe74848f0b29755b9e8a230b4f43e (BlockNo {unBlockNo = 4555199})) (Tip (SlotNo {unSlotNo = 5828555}) 761a204d720b0a6f7452617b3b6c903a150571f7a7b342b9f6c3c55fcb6a6ae4 (BlockNo {unBlockNo = 4557141}))",String "SubscriptionTrace",String "\"relays-new.cardano-mainnet.iohk.io\""]
cardano-node_1              | [7a09bbf3:cardano.node.ErrorPolicy:Warning:53] [2020-08-14 08:47:37.70 UTC] [String "ErrorPolicySuspendPeer (Just (ApplicationExceptionTrace (HeaderError (At (Block {blockPointSlot = SlotNo {unSlotNo = 5789249}, blockPointHash = 68914f093daebff961def6df4830a21b2fffccec69442e8e6b780e51c40d5217})) (HeaderProtocolError (HardForkValidationErrFromEra S (Z (WrapValidationErr {unwrapValidationErr = ChainTransitionError [OverlayFailure (VRFLeaderValueTooBig (OutputVRF {getOutputVRFBytes = \"\\NUL\\NUL\\157\\185\\199\\189l\\210Y\\130\\175\\220\\248\\140\\242\\129\\&4!\\138\\193\\175\\235\\238c*h(\\\\\\187\\156Y3\\239\\204lYMF\\160\\239F.>S\\248\\193l\\CAN\\162\\181\\204\\147\\241\\EOT\\183\\182P{R`z\\200vM\"}) (0 % 1) (ActiveSlotCoeff {unActiveSlotVal = UnsafeUnitInterval (1 % 20), unActiveSlotLog = -512932943875505334261962382072846}))]})))) (Tip (SlotNo {unSlotNo = 5789244}) 9c925a40b21eb2768f2b07733568f7bd9dbfe74848f0b29755b9e8a230b4f43e (BlockNo {unBlockNo = 4555199})) (Tip (SlotNo {unSlotNo = 5828555}) 761a204d720b0a6f7452617b3b6c903a150571f7a7b342b9f6c3c55fcb6a6ae4 (BlockNo {unBlockNo = 4557141}))))) 200s 200s",String "ErrorPolicyTrace",String "35.177.103.2:3001"]
cardano-node_1              | [7a09bbf3:cardano.node.DnsSubscription:Error:26516] [2020-08-14 08:47:37.74 UTC] [String "Application Exception: 18.159.69.220:3001 HeaderError (At (Block {blockPointSlot = SlotNo {unSlotNo = 5789249}, blockPointHash = 68914f093daebff961def6df4830a21b2fffccec69442e8e6b780e51c40d5217})) (HeaderProtocolError (HardForkValidationErrFromEra S (Z (WrapValidationErr {unwrapValidationErr = ChainTransitionError [OverlayFailure (VRFLeaderValueTooBig (OutputVRF {getOutputVRFBytes = \"\\NUL\\NUL\\157\\185\\199\\189l\\210Y\\130\\175\\220\\248\\140\\242\\129\\&4!\\138\\193\\175\\235\\238c*h(\\\\\\187\\156Y3\\239\\204lYMF\\160\\239F.>S\\248\\193l\\CAN\\162\\181\\204\\147\\241\\EOT\\183\\182P{R`z\\200vM\"}) (0 % 1) (ActiveSlotCoeff {unActiveSlotVal = UnsafeUnitInterval (1 % 20), unActiveSlotLog = -512932943875505334261962382072846}))]})))) (Tip (SlotNo {unSlotNo = 5789244}) 9c925a40b21eb2768f2b07733568f7bd9dbfe74848f0b29755b9e8a230b4f43e (BlockNo {unBlockNo = 4555199})) (Tip (SlotNo {unSlotNo = 5828555}) 761a204d720b0a6f7452617b3b6c903a150571f7a7b342b9f6c3c55fcb6a6ae4 (BlockNo {unBlockNo = 4557141}))",String "SubscriptionTrace",String "\"relays-new.cardano-mainnet.iohk.io\""]
cardano-node_1              | [7a09bbf3:cardano.node.ErrorPolicy:Warning:53] [2020-08-14 08:47:37.74 UTC] [String "ErrorPolicySuspendPeer (Just (ApplicationExceptionTrace (HeaderError (At (Block {blockPointSlot = SlotNo {unSlotNo = 5789249}, blockPointHash = 68914f093daebff961def6df4830a21b2fffccec69442e8e6b780e51c40d5217})) (HeaderProtocolError (HardForkValidationErrFromEra S (Z (WrapValidationErr {unwrapValidationErr = ChainTransitionError [OverlayFailure (VRFLeaderValueTooBig (OutputVRF {getOutputVRFBytes = \"\\NUL\\NUL\\157\\185\\199\\189l\\210Y\\130\\175\\220\\248\\140\\242\\129\\&4!\\138\\193\\175\\235\\238c*h(\\\\\\187\\156Y3\\239\\204lYMF\\160\\239F.>S\\248\\193l\\CAN\\162\\181\\204\\147\\241\\EOT\\183\\182P{R`z\\200vM\"}) (0 % 1) (ActiveSlotCoeff {unActiveSlotVal = UnsafeUnitInterval (1 % 20), unActiveSlotLog = -512932943875505334261962382072846}))]})))) (Tip (SlotNo {unSlotNo = 5789244}) 9c925a40b21eb2768f2b07733568f7bd9dbfe74848f0b29755b9e8a230b4f43e (BlockNo {unBlockNo = 4555199})) (Tip (SlotNo {unSlotNo = 5828555}) 761a204d720b0a6f7452617b3b6c903a150571f7a7b342b9f6c3c55fcb6a6ae4 (BlockNo {unBlockNo = 4557141}))))) 200s 200s",String "ErrorPolicyTrace",String "18.159.69.220:3001"]

@vae520283995
Copy link
Author

@rhyslbw hello,I have 2 nodes that can't synchronize. Is there any group under discussion, such as telegram

@vae520283995
Copy link
Author

vae520283995 commented Aug 17, 2020

root@ip-172-31-38-16:/home/ubuntu# curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardanoDbMeta { initialized syncPercentage }}"}' http://localhost:3100/graphql
{"data":{"cardanoDbMeta":{"initialized":false,"syncPercentage":99.98}}}

@rhyslbw
Copy link
Contributor

rhyslbw commented Aug 17, 2020

Hi @vae520283995
Best to stick to the latest release from Dockerhub, or checkout the 2.0.0 git tag and build from there. The next release is being planned, but is dependent on an update from cardano-db-sync

@vae520283995
Copy link
Author

Hi @vae520283995
Best to stick to the latest release from Dockerhub, or checkout the 2.0.0 git tag and build from there. The next release is being planned, but is dependent on an update from cardano-db-sync

Unable to synchronize is the reason for cardano-node,Even if I update the latest version, it doesn't work

@rhyslbw
Copy link
Contributor

rhyslbw commented Aug 18, 2020

@vae520283995

Best to try from a clean state with:

  • inputoutput/cardano-node:1.18.0
  • inputoutput/cardano-db-sync:3.1.0
  • inputoutput/cardano-graphql:2.0.0

To achieve this without removing the existing volumes, docker-compose -p another-name up

@vae520283995
Copy link
Author

@vae520283995

Best to try from a clean state with:

  • inputoutput/cardano-node:1.18.0
  • inputoutput/cardano-db-sync:3.1.0
  • inputoutput/cardano-graphql:2.0.0

To achieve this without removing the existing volumes, docker-compose -p another-name up

      Container                          Repository                   Tag         Image Id       Size  

cardano-db-sync-mainnet inputoutput/cardano-db-sync 3.1.0 08e2fc63f973 1.003 GB
cardano-graphql-hasura-mainnet inputoutput/cardano-graphql-hasura 2.0.0 7301341edecd 123.5 MB
cardano-graphql-mainnet inputoutput/cardano-graphql 2.0.0 416ef6842e55 92.43 MB
cardano-node-mainnet inputoutput/cardano-node master 5098319ed904 776.7 MB
postgres-mainnet postgres 11.5-alpine da01ecfbabe1 71.85 MB

@vae520283995
Copy link
Author

vae520283995 commented Aug 20, 2020

@rhyslbw
I have updated the latest version of cardano-node. Now it can synchronize normally, but cardano-grapql has been reporting errors:

{"level":"info","msg":"Applying migrations...","time":"2020-08-20T09:27:12Z"}
{"level":"info","msg":"nothing to apply","time":"2020-08-20T09:27:12Z"}

{"level":"info","msg":"Applying migrations...","time":"2020-08-20T09:27:13Z"}

Command failed: hasura --skip-update-check --project /application/packages/api-cardano-db-hasura/hasura/project --endpoint http://hasura:8080 migrate apply --up all
time="2020-08-20T09:27:13Z" level=fatal msg="apply failed: [postgres-error] query execution failed ($.args[0].args)\r\nFile: '1589369664961_init/up.sql'\r\n{\n "check_metadata_consistency": false,\n "sql": "CREATE VIEW \"Block\" AS\n SELECT (COALESCE(( SELECT sum((tx.fee)::bigint) AS sum\n FROM tx\n WHERE (tx.block = block.id)), (0)::NUMERIC))::bigint AS fees,\n block.hash,\n block.merkel_root AS \"merkelRoot\",\n block.block_no AS \"number\",\n block.op_cert AS \"opCert\",\n previous_block.hash AS \"previousBlockHash\",\n next_block.hash AS \"nextBlockHash\",\n block.proto_version AS \"protocolVersion\",\n block.size,\n block.tx_count AS \"transactionsCount\",\n block.epoch_no AS \"epochNo\",\n block.\"time\" AS \"forgedAt\",\n block.epoch_slot_no AS \"slotInEpoch\",\n block.slot_no AS \"slotNo\",\n slot_leader.id AS \"slot_leader_id\",\n block.vrf_key As \"vrfKey\"\n FROM (((block\n LEFT JOIN block previous_block ON ((block.previous = previous_block.id)))\n LEFT JOIN block next_block ON ((next_block.previous = block.id)))\n LEFT JOIN slot_leader ON ((block.slot_leader = slot_leader.id)));\n\nCREATE OR REPLACE VIEW \"Cardano\" AS\n SELECT block.block_no AS \"tipBlockNo\",\n block.epoch_no AS \"currentEpochNo\"\n FROM block\n WHERE (block.block_no IS NOT NULL)\n ORDER BY block.block_no DESC\n LIMIT 1;\n \nCREATE VIEW \"Delegation\" AS\nSELECT\n delegation.id AS \"id\",\n (\n\t SELECT stake_address.view\n\t FROM stake_address\n\t WHERE stake_address.id = delegation.addr_id\n ) AS \"address\",\n delegation.tx_id AS \"tx_id\",\n delegation.update_id AS \"update_id\",\n pool_hash.hash AS \"pool_hash\"\nFROM\n delegation\nJOIN pool_update\n ON delegation.update_id = pool_update.id\nLEFT OUTER JOIN pool_hash\n ON pool_update.hash_id = pool_hash.id;\n\nCREATE VIEW \"Epoch\" AS\nSELECT\n epoch.out_sum AS \"output\",\n epoch.no AS \"number\",\n epoch.tx_count AS \"transactionsCount\",\n epoch.start_time AS \"startedAt\",\n epoch.end_time AS \"lastBlockTime\",\n epoch.blk_count AS \"blocksCount\"\nFROM epoch;\n\nCREATE VIEW \"Reward\" AS\nSELECT\n reward.amount AS \"amount\",\n reward.id AS \"id\",\n (\n\t SELECT stake_address.view\n\t FROM stake_address\n\t WHERE stake_address.id = reward.addr_id\n ) AS \"address\",\n reward.tx_id AS \"tx_id\"\nFROM reward;\n\nCREATE VIEW \"SlotLeader\" AS\nSELECT\n slot_leader.hash AS \"hash\",\n slot_leader.id AS \"id\",\n slot_leader.description AS \"description\",\n ( SELECT pool_hash.hash FROM pool_hash WHERE pool_hash.id = slot_leader.pool_hash_id ) AS \"pool_hash\"\nFROM slot_leader;\n\nCREATE VIEW \"StakeDeregistration\" AS\nSELECT\n stake_deregistration.id AS \"id\",\n (\n\t SELECT stake_address.view\n\t FROM stake_address\n\t WHERE stake_address.id = stake_deregistration.addr_id\n ) AS \"address\",\n stake_deregistration.tx_id AS \"tx_id\"\nFROM stake_deregistration;\n\nCREATE VIEW \"StakePool\" AS\nWITH\n latest_block_times AS (\n SELECT pool.hash_id, max(block.time) AS blockTime\n FROM pool_update AS pool\n JOIN tx ON pool.registered_tx_id = tx.id\n JOIN block ON tx.block = block.id\n group by pool.hash_id\n)\nSELECT\n pool.fixed_cost AS \"fixedCost\",\n ( SELECT pool_hash.hash FROM pool_hash WHERE pool_hash.id = pool.hash_id ) AS \"hash\",\n pool.id AS \"id\",\n pool.margin AS \"margin\",\n pool_meta_data.hash AS \"metadataHash\",\n block.block_no AS \"blockNo\",\n pool.registered_tx_id AS \"updated_in_tx_id\",\n pool.pledge AS \"pledge\",\n ( SELECT stake_address.view FROM stake_address WHERE stake_address.id = pool.reward_addr_id) AS \"rewardAddress\",\n pool_meta_data.url AS \"url\"\nFROM pool_update AS pool\n INNER JOIN pool_meta_data ON pool.meta = pool_meta_data.id\n INNER JOIN tx ON pool.registered_tx_id = tx.id\n INNER JOIN latest_block_times ON latest_block_times.hash_id = pool.hash_id\n INNER JOIN block ON tx.block = block.id AND latest_block_times.blockTime = block.time;\n\nCREATE VIEW \"StakeRegistration\" AS\nSELECT\n stake_registration.id AS \"id\",\n (\n\t SELECT stake_address.view\n\t FROM stake_address\n\t WHERE stake_address.id = stake_registration.addr_id\n ) AS \"address\",\n stake_registration.tx_id AS \"tx_id\"\nFROM stake_registration;\n\nCREATE VIEW \"Transaction\" AS\nSELECT\n block.hash AS \"blockHash\",\n tx.block_index AS \"blockIndex\",\n COALESCE(tx.fee, 0) AS fee,\n tx.hash,\n tx.id,\n block.time AS \"includedAt\",\n tx.size,\n CAST(COALESCE((SELECT SUM(\"value\") FROM tx_out WHERE tx_id = tx.id), 0) AS bigint) AS \"totalOutput\"\nFROM\n tx\nINNER JOIN block\n ON block.id = tx.block;\n\nCREATE VIEW \"TransactionInput\" AS\nSELECT\n source_tx_out.address,\n source_tx_out.value,\n tx.hash AS \"txHash\",\n source_tx.hash AS \"sourceTxHash\",\n tx_in.tx_out_index AS \"sourceTxIndex\"\nFROM\n tx\nJOIN tx_in\n ON tx_in.tx_in_id = tx.id\nJOIN tx_out AS source_tx_out\n ON tx_in.tx_out_id = source_tx_out.tx_id\n AND tx_in.tx_out_index = source_tx_out.index\nJOIN tx AS source_tx\n ON source_tx_out.tx_id = source_tx.id;\n\nCREATE VIEW \"TransactionOutput\" AS\nSELECT\n address,\n value,\n tx.hash AS \"txHash\",\n index\nFROM tx\nJOIN tx_out\n ON tx.id = tx_out.tx_id;\n\nCREATE VIEW \"Utxo\" AS SELECT\n address,\n value,\n tx.hash AS \"txHash\",\n index\nFROM tx\nJOIN tx_out\n ON tx.id = tx_out.tx_id\nLEFT OUTER JOIN tx_in\n ON tx_out.tx_id = tx_in.tx_out_id\n AND tx_out.index = tx_in.tx_out_index\nWHERE tx_in.tx_in_id IS NULL;\n\nCREATE VIEW \"Withdrawal\" AS\nSELECT\n withdrawal.amount AS \"amount\",\n withdrawal.id AS \"id\",\n (\n\t SELECT stake_address.view\n\t FROM stake_address\n\t WHERE stake_address.id = withdrawal.addr_id\n ) AS \"address\",\n withdrawal.tx_id AS \"tx_id\"\nFROM withdrawal;\n\nCREATE function utxo_set_at_block(\"hash\" hash32type)\nRETURNS SETOF \"TransactionOutput\" AS $$\n SELECT\n \"TransactionOutput\".address,\n \"TransactionOutput\".value,\n \"TransactionOutput\".\"txHash\",\n \"TransactionOutput\".index\n FROM tx\n JOIN tx_out\n ON tx.id = tx_out.tx_id\n JOIN \"TransactionOutput\"\n ON tx.hash = \"TransactionOutput\".\"txHash\"\n LEFT OUTER JOIN tx_in\n ON tx_out.tx_id = tx_in.tx_out_id\n AND tx_out.index = tx_in.tx_out_index\n WHERE tx_in.tx_in_id IS NULL\n AND tx.block \u003c= (SELECT id FROM block WHERE hash = \"hash\")\n$$ LANGUAGE SQL stable;\n"\n}\r\n[42703] FatalError: column stake_address.view does not exist"

Applying PostgreSQL schema and Hasura metadata: Attempt 9 of 10, retying...

@rhyslbw rhyslbw removed the waiting on author Have asked for more information, next action on the author label Sep 7, 2020
@rhyslbw
Copy link
Contributor

rhyslbw commented Sep 8, 2020

@vae520283995
If you are happy to try out the pre-release, master should work for you now. As per the upgrade instructions for [email protected], you will need to rebuild the DB.

@btbf
Copy link

btbf commented Sep 16, 2020

I get the same error as above, is there a solution?

/git/cardano-graphql$ docker-compose images
Container Repository Tag Image Id Size

cardano-graphql_cardano-db-sync-extended_1 inputoutput/cardano-db-sync master ae3bcae06bc1 1.001 GB
cardano-graphql_cardano-graphql_1 inputoutput/cardano-graphql 2.0.0 e3542d216c57 93.49 MB
cardano-graphql_cardano-node_1 inputoutput/cardano-node 1.19.1 263f2061b567 826.2 MB
cardano-graphql_hasura_1 inputoutput/cardano-graphql-hasura 2.0.0 f26a5e991d85 123.5 MB
cardano-graphql_postgres_1 postgres 11.5-alpine da01ecfbabe1 71.85 MB

@vae520283995
Copy link
Author

I get the same error as above, is there a solution?

/git/cardano-graphql$ docker-compose images

Container Repository Tag Image Id Size
cardano-graphql_cardano-db-sync-extended_1 inputoutput/cardano-db-sync master ae3bcae06bc1 1.001 GB
cardano-graphql_cardano-graphql_1 inputoutput/cardano-graphql 2.0.0 e3542d216c57 93.49 MB
cardano-graphql_cardano-node_1 inputoutput/cardano-node 1.19.1 263f2061b567 826.2 MB
cardano-graphql_hasura_1 inputoutput/cardano-graphql-hasura 2.0.0 f26a5e991d85 123.5 MB
cardano-graphql_postgres_1 postgres 11.5-alpine da01ecfbabe1 71.85 MB

No solution, I think this is a cardano-grapql problem, I am waiting for the next release

rhyslbw added a commit that referenced this issue Sep 16, 2020
check Hasura schema matches expected shape, as on initial startup, a
race condition exists with the metadata application

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

Successfully merging a pull request may close this issue.

3 participants