cardano-explorer-app icon indicating copy to clipboard operation
cardano-explorer-app copied to clipboard

Blocks page doesn't show if assets aren't synced

Open disassembler opened this issue 3 years ago • 0 comments

After updating to the unreleased cardano-graphql that separates asset synchronization into a background service, the front page of the explorer-app and epochs page responds, but blocks page does not with the below errors.

I suggest we make the explorer-app take a null field for Token.Asset and display something like unavailable for any elements utilizing it rather than failing on the page with the current error:

SORRY, WE COULD NOT FIND ANY RESULTS MATCHING:
0adc4d836e1ee49b1f51ba916995bdfd797c2f5ac881500671f2679daa10b6a9
Uncaught (in promise) Error: Cannot return null for non-nullable field Token.asset.: {"response":{"errors":[{"message":"Cannot return null for non-nullable field Token.asset.","locations":[{"line":74,"column":7}],"path":["blocks",0,"transactions",0,"inputs",0,"tokens",0,"asset"],"extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"stacktrace":["Error: Cannot return null for non-nullable field Token.asset.","    at completeValue (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:560:13)","    at completeValueCatchingError (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:495:19)","    at resolveField (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:435:10)","    at executeFields (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:275:18)","    at collectAndExecuteSubfields (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:713:10)","    at completeObjectValue (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:703:10)","    at completeValue (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:591:12)","    at completeValueCatchingError (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:495:19)","    at /nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:618:25","    at Array.forEach (<anonymous>)"]}}},{"message":"Cannot return null for non-nullable field Token.asset.","locations":[{"line":74,"column":7}],"path":["blocks",0,"transactions",0,"inputs",1,"tokens",0,"asset"],"extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"stacktrace":["Error: Cannot return null for non-nullable field Token.asset.","    at completeValue (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:560:13)","    at completeValueCatchingError (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:495:19)","    at resolveField (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:435:10)","    at executeFields (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:275:18)","    at collectAndExecuteSubfields (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:713:10)","    at completeObjectValue (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:703:10)","    at completeValue (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:591:12)","    at completeValueCatchingError (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:495:19)","    at /nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:618:25","    at Array.forEach (<anonymous>)"]}}},{"message":"Cannot return null for non-nullable field Token.asset.","locations":[{"line":95,"column":7}],"path":["blocks",0,"transactions",0,"outputs",0,"tokens",0,"asset"],"extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"stacktrace":["Error: Cannot return null for non-nullable field Token.asset.","    at completeValue (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:560:13)","    at completeValueCatchingError (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:495:19)","    at resolveField (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:435:10)","    at executeFields (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:275:18)","    at collectAndExecuteSubfields (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:713:10)","    at completeObjectValue (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:703:10)","    at completeValue (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:591:12)","    at completeValue (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:557:21)","    at completeValueCatchingError (/nix/store/1wlwx3v55y3fm6i2jcy9zilx59i2s59i-cardano-graphql-7.0.2/node_modules/graphql/execution/execute.js:495:19)","    at /nix/store/1wlwx3v5

disassembler avatar Dec 19 '22 22:12 disassembler