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

[BUG] Queries fail with "Unknown query cursor" #5085

Closed
nxsaken opened this issue Sep 18, 2024 · 4 comments
Closed

[BUG] Queries fail with "Unknown query cursor" #5085

nxsaken opened this issue Sep 18, 2024 · 4 comments
Labels
Bug Something isn't working

Comments

@nxsaken
Copy link
Contributor

nxsaken commented Sep 18, 2024

OS and Environment

macOS m1

GIT commit hash

e680397

Minimum working example / Steps to reproduce

With the client SDK:

fn all(iroha: &Client) {
  iroha
    .query(FindDomains)
    .execute()
    .unwrap();
}

fn single(iroha: &Client, domain: DomainId) {
  iroha
    .query(FindDomains)
    .filter_with(|dom| dom.id.eq(domain))
    .execute_single()
    .unwrap();
}

With the client CLI:

$ iroha --config <PATH_TO_CONFIG_TOML> domain list all

Actual result

All:

called `Result::unwrap()` on an `Err` value: Validation(QueryFailed(UnknownCursor))

Single:

called `Result::unwrap()` on an `Err` value: QueryError(Validation(QueryFailed(UnknownCursor)))

CLI:

Error: Failed to run the command
├╴at client_cli/src/main.rs:211:34
│
╰─▶ Failed to get all accounts
    ├╴at client_cli/src/main.rs:210:10
    ├╴Query validation error
    ├╴Query execution failed
    ╰╴Unknown query cursor

Expected result

The object(s) or an appropriate error is returned

Logs

Who can help to reproduce?

@DCNick3

Notes

No response

@nxsaken nxsaken added the Bug Something isn't working label Sep 18, 2024
@nxsaken
Copy link
Contributor Author

nxsaken commented Sep 18, 2024

With #5086:

$ iroha --config <PATH_TO_CONFIG_TOML> domain list all

Error: Failed to run the command
├╴at crates/iroha_cli/src/main.rs:211:34
│
╰─▶ Failed to get all accounts
    ├╴at crates/iroha_cli/src/main.rs:210:10
    ├╴Query validation error
    ├╴Query execution failed
    ╰╴The server's cursor does not match the provided cursor.

@nxsaken
Copy link
Contributor Author

nxsaken commented Sep 18, 2024

Turned out to be a conflict between dockerized irohad and a bare-metal one left over from old pytests running in the background.

@nxsaken nxsaken closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2024
@DCNick3
Copy link
Contributor

DCNick3 commented Sep 18, 2024

Turned out to be a conflict between dockerized irohad and a bare-metal one left over from old pytests running in the background.

Hm, so one request went to one server and another to the other? Did they manage to simultaneously listen on the same port?

UPD: Or was it actually just a version mismatch? (I think older iroha will give you the UnknownCursor error when it can't decode the request)

@nxsaken
Copy link
Contributor Author

nxsaken commented Sep 18, 2024

Yeah, just a version mismatch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants