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

Canister has no query method '__motoko_async_helper' #4837

Open
vporton opened this issue Dec 29, 2024 · 2 comments
Open

Canister has no query method '__motoko_async_helper' #4837

vporton opened this issue Dec 29, 2024 · 2 comments

Comments

@vporton
Copy link

vporton commented Dec 29, 2024

Please use this repository to reprise the bug.

The following command produces a non-understandable error:

$ dfx deploy main && dfx canister call main main '()'
...
Error: Failed query call.
Caused by: The replica returned a rejection error: reject code CanisterReject, reject message Error from Canister fokw4-aeaaa-aaaaa-qaa3a-cai: Canister has no query method '__motoko_async_helper'..
Check that the method being called is exported by the target canister. See documentation: http://internetcomputer.org/docs/current/references/execution-errors#method-not-found, error code Some("IC0406")

Code extract:

import frontend "canister:frontend";

actor class Main() = this {
  public composite query func main() : async () {
    let b = this.f();
    let c = frontend.get({key = "/index.html"; accept_encodings = ["identity"]});
    ignore {{b0 = await b; c0 = await c}};
  };

  public query func f(): async () {};
};

My guess is that frontend may be written in Rust and not contain __motoko_async_helper.

@vporton
Copy link
Author

vporton commented Dec 29, 2024

$ moc --version
Motoko compiler 0.13.5+ (source v1dvjb2h-nhmkbsj8-k5v6kp5x-1gxvi6dg)

@vporton
Copy link
Author

vporton commented Dec 29, 2024

Oh, sorry, the example wasn't minimal. Corrected.

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

No branches or pull requests

1 participant