# Cycles wallet issue: no query method wallet\_api\_version

**URL:** <https://forum.dfinity.org/t/cycles-wallet-issue-no-query-method-wallet-api-version/28935>\
**Category:** Command Line Tools\
**Tags:** dfx\
**Created:** [March 26, 2024, 1:10pm UTC](https://forum.dfinity.org/t/cycles-wallet-issue-no-query-method-wallet-api-version/28935 "2024-03-26T13:10:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [March 26, 2024, 1:10pm UTC](https://forum.dfinity.org/t/cycles-wallet-issue-no-query-method-wallet-api-version/28935/1 "2024-03-26T13:10:36Z")

</div>

Hey all

TLDR: Using a very old (older than ~September 2021) cycles wallet doesn’t work with recent dfx versions. Solutions are either upgrading the wallet wasm (see instructions below) or waiting for a new dfx version

As a result of rolling out the [change to error codes](https://forum.dfinity.org/t/changing-some-error-codes/28171) we discovered a problem with how agent-rs detects cycle wallet versions. A typical error looks like this:

```auto
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
 Failed while trying to install all canisters.
  Failed to install wasm module to canister 'frontend'.
   Failed to construct wallet canister caller: The replica returned a replica error: reject code CanisterError, reject message IC0536: Canister <your cycles wallet principal> has no query method 'wallet_api_version', error code Some("IC0536")

```

This happens because the error code is used to figure out the wallet version in case no version is explicitly returned by the wallet. Only wallets older than [version 0.2.0](https://github.com/dfinity/cycles-wallet/blob/main/CHANGELOG.md#020---2021-09-03) (released on September 3, 2021) do not have this function.

## How to fix it

There are two options to fix this problem:

1. Wait for a dfx version that includes a patched Rust agent (will be released soon)
2. Upgrade the cycles wallet:

- Download the [latest cycles wallet wasm](https://github.com/dfinity/sdk/blob/0.18.0/src/distributed/wallet.wasm)
- Upgrade the cycles wallet: `dfx canister --network ic install <cycles wallet id> --wasm <path to wallet.wasm> --mode upgrade`
