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

Indexer service fails to handle state channel messages #107

Closed
Jannis opened this issue Nov 13, 2020 · 4 comments
Closed

Indexer service fails to handle state channel messages #107

Jannis opened this issue Nov 13, 2020 · 4 comments
Assignees
Labels

Comments

@Jannis
Copy link
Contributor

Jannis commented Nov 13, 2020

Logs from different indexers:

"headers":{"host":"localhost:8090","accept":"application/json, text/plain, */*","content-type":"application/json","user-agent":"axios/0.19.2","x-forwarded-for":"35.246.241.146","x-forwarded-host":"service.mindheartsoul.org","x-forwarded-server":"service.mindheartsoul.org","connection":"Keep-Alive","content-length":"106083"},"err":{"type":"PushMessageError","message":"Error during pushMessage","stack":"Error: Error during pushMessage\n    at /usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/server-wallet/lib/src/wallet/wallet.js:311:19\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)","reason":"Error during pushMessage","data":{"thisWalletVersion":"@statechannels/server-wallet@1.10.1","payloadWalletVersion":"@statechannels/server-wallet@1.10.1","cause":{}}},"msg":"Failed to handle state channel message"}
.... at MessagePort.[nodejs.internal.kHybridDispatch] (internal/event_target.js:353:41)\n    at MessagePort.exports.emitMessage (internal/per_context/messageport.js:18:26)"},"msg":"Failed to handle state channel message"}
@Jannis Jannis added bug Something isn't working indexer-service statechannels labels Nov 13, 2020
@Jannis Jannis self-assigned this Nov 13, 2020
@suntzu93
Copy link

suntzu93 commented Nov 13, 2020

full log :

{"level":30,"time":1605234217835,"pid":3885993,"hostname":"suntzu-server","dbName":"graph_indexer_agent","walletVersion":"@statechannels/server-wallet@1.10.1","module":"Worker-Manager","msg":"{"level":50,"time":1605234217835,"pid":3885993,"hostname":"suntzu-server","dbName":"graph_indexer_agent","walletVersion":"@statechannels/server-wallet@1.10.1","stack":"Error: Validation Error: Unexpected property 'query' found at root.data \n at Object.validateMessage (/usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/wire-format/lib/src/validator.js:31:15)\n at Object.validatePayload (/usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/wallet-core/lib/src/serde/wire-format/deserialize.js:14:26)\n at SingleThreadedWallet.pushMessage (/usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/server-wallet/lib/src/wallet/wallet.js:309:43)\n at /usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/server-wallet/lib/src/wallet/multi-threaded-wallet/worker.js:32:215\n at time (/usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/server-wallet/lib/src/metrics.js:55:22)\n at /usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/server-wallet/lib/src/metrics.js:45:72\n at MessagePort. (/usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/server-wallet/lib/src/wallet/multi-threaded-wallet/worker.js:32:175)\n at MessagePort.[nodejs.internal.kHybridDispatch] (internal/event_target.js:353:41)\n at MessagePort.exports.emitMessage (internal/per_context/messageport.js:18:26)","type":"Error","msg":"Validation Error: Unexpected property 'query' found at root.data "}\n"}

{"level":50,"time":1605234217836,"pid":3885993,"hostname":"suntzu-server","name":"IndexerService","indexer":"0xD96d4B52CAb35cF3DF1d58765bD2eA7cb1Fb6016","operator":"0xD96d4B52CAb35cF3DF1d58765bD2eA7cb1Fb6016","indexer":"0xD96d4B52CAb35cF3DF1d58765bD2eA7cb1Fb6016","operator":"0xD96d4B52CAb35cF3DF1d58765bD2eA7cb1Fb6016","component":"Server","body":{"query":"{ indexingStatuses { subgraph } }"},"headers":{"content-type":"application/json","accept":"/","content-length":"45","user-agent":"node-fetch/1.0 (+https://github.com/bitinn/node-fetch)","accept-encoding":"gzip,deflate","connection":"close","host":"135.181.16.220"},"err":{"type":"Error","message":"Validation Error: Unexpected property 'query' found at root.data ","stack":"Error: Validation Error: Unexpected property 'query' found at root.data \n at Object.validateMessage (/usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/wire-format/lib/src/validator.js:31:15)\n at Object.validatePayload (/usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/wallet-core/lib/src/serde/wire-format/deserialize.js:14:26)\n at SingleThreadedWallet.pushMessage (/usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/server-wallet/lib/src/wallet/wallet.js:309:43)\n at /usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/server-wallet/lib/src/wallet/multi-threaded-wallet/worker.js:32:215\n at time (/usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/server-wallet/lib/src/metrics.js:55:22)\n at /usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/server-wallet/lib/src/metrics.js:45:72\n at MessagePort. (/usr/local/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphprotocol/receipt-manager/node_modules/@statechannels/server-wallet/lib/src/wallet/multi-threaded-wallet/worker.js:32:175)\n at MessagePort.[nodejs.internal.kHybridDispatch] (internal/event_target.js:353:41)\n at MessagePort.exports.emitMessage (internal/per_context/messageport.js:18:26)"},"msg":"Failed to handle state channel message"}

@Jannis
Copy link
Contributor Author

Jannis commented Nov 16, 2020

I think the problem here is a server-wallet incompatibility caused by the indexer-service depending on a different wallet than the receipt manager. This will be fixed in 0.3.7 (to be released today).

@Jannis
Copy link
Contributor Author

Jannis commented Nov 17, 2020

Should be fixed in 0.3.7-alpha.1. Let's reopen if it still happens.

@Jannis Jannis closed this as completed Nov 17, 2020
@andrewgordstewart
Copy link
Contributor

I think the problem here is a server-wallet incompatibility caused by the indexer-service depending on a different wallet than the receipt manager. This will be fixed in 0.3.7 (to be released today).

I'm not sure this is the case:

Error: Validation Error: Unexpected property 'query' found at root.data 

This error is pretty difficult to understand, because the schema-validation doesn't do a great job at explaining why it doesn't pass the validation.

I think what it means is that a payload is being pushed into the wallet where this property has a query property. No message should be pushed into the wallet that has this property.

This is the log statement, which doesn't include much information, since the original error here only includes the error. We can fix that today.

andrewgordstewart added a commit to statechannels/statechannels that referenced this issue Nov 18, 2020
See graphprotocol/indexer#107

```
> validateMessage({data: {foo: 'bar'}})
Uncaught WireFormatValidationError: Invalid message
    at validateMessage (/Users/andrewstewart/Code/magmo/monorepo/packages/wire-format/lib/src/validator.js:29:15) {
  jsonBlob: { data: { foo: 'bar' } },
  errorMessages: [ "Unexpected property 'foo' found at root.data " ]
}
```
andrewgordstewart added a commit to statechannels/statechannels that referenced this issue Nov 18, 2020
See graphprotocol/indexer#107

```
> validateMessage({data: {foo: 'bar'}})
Uncaught WireFormatValidationError: Invalid message
    at validateMessage (/Users/andrewstewart/Code/magmo/monorepo/packages/wire-format/lib/src/validator.js:29:15) {
  jsonBlob: { data: { foo: 'bar' } },
  errorMessages: [ "Unexpected property 'foo' found at root.data " ]
}
```
andrewgordstewart added a commit to statechannels/statechannels that referenced this issue Nov 19, 2020
See graphprotocol/indexer#107

```
> validateMessage({data: {foo: 'bar'}})
Uncaught WireFormatValidationError: Invalid message
    at validateMessage (/Users/andrewstewart/Code/magmo/monorepo/packages/wire-format/lib/src/validator.js:29:15) {
  jsonBlob: { data: { foo: 'bar' } },
  errorMessages: [ "Unexpected property 'foo' found at root.data " ]
}
```
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

3 participants