Error: Failed to fetch wallet balance

Ubuntu Terminal:
dingo@DESKTOP-xxxxx:~/ic-projects/dbank$ dfx wallet --network ic redeem-faucet-coupon XXXXX-XXXXX-XXXXX
WARN: The default identity is not stored securely. Do not use it to control a lot of cycles/ICP. Create a new identity with dfx identity create and use it in mainnet-facing commands with the --identity flag
Redeemed coupon code XXXXX-XXXXX-XXXXX for 20.000 TC (trillion cycles).
dingo@DESKTOP-xxxxx:~/ic-projects/dbank$ dfx wallet --network ic balance
WARN: The default identity is not stored securely. Do not use it to control a lot of cycles/ICP. Create a new identity with dfx identity create and use it in mainnet-facing commands with the --identity flag
Error: Failed to fetch wallet balance.
Caused by: Failed to fetch wallet balance.
The Replica returned an error: code 3, message: “IC0302: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai has no query method ‘wallet_balance’”

Background:
I wrote code in VS Code. Used dfx 0.9.3. Things work locally. I want to get free cycles from dfinity to ultimately make the website live on internet. They require dfx 0.12.1. I upgraded my dfx. Then my code doesn’t work. I tried different commands (maybe even set wallet) but nothing worked. So, I deleted my project and created a new via copy+paste my code. Now website works locally with dfx 0.12.1 AND I got free cycles from dfinity because I have dfx 0.12.1. I can check the cycles balance locally. But I get the above error when I try to check cycles balance on internet computer.

I created NNS Identity Anchor. The principal at NNS is different from the principal on Ubuntu terminal.

By goal is to deploy to the ICP Network. But I run into the above error on the way and am lost.
Thank you for your help.

The canister you configured as a wallet (rwlgt-iiaaa-aaaaa-aaaaa-cai, probably with dfx identitiy --network ic set-wallet) is not a wallet. Have a look at it’s interface via this link.

Do you know into which canister you got the free cycles?

I don’t know which canister I got the free cycles. But when I run dfx start in VS Code, I get this: http://localhost:39975/_/dashboard. When I open the link in chrome I get:

When I click on the arrows, I see that each canister has a cycles balance, though different amounts. The highest amounts are in rwlgt… , r7inp…, renrk…, and qjdve…

Please note I have redeemed two coupons.

I opened the link you gave me to see the canister interface for each canister id listed in the above link. I more or less don’t understand the interface enough to figure this out. But perhaps you do.

Please keep in mind that my goal is to deploy to the IC network with free cycles and NNS. Thank you.

This is only for your local testing environment. This is completely different from mainnet. Your coupons are redeemed on mainnet.

Scroll down a little, click on ‘View did File’

I clicked on the “View did file”. There are five tabs: candid, motoko, javascript, typescript, and protobuf. I can only click and view the candid tab. What am I looking for in particular?

Actually, depending on the canister id, I can click and view other tabs, not just candid tab. For example, if I use qoctq-giaaa-aaaaa-aaaea-cai as the canister id, then I can click on all tabs in “view did file” except “protobuf” but if I use rwlgt-iiaaa-aaaaa-aaaaa-cai as the canister id, I can click only on “candid” tab.

The candid file will show you what the interface of this canister is. Do you recognize the interface? It looks like some management solution for canisters(?). If possible I’d like to figure out why you set your wallet to that canister or where your wallet went

This is the candid file for canister id: rwlgt-iiaaa-aaaaa-aaaaa-cai. I do not recognize the interface, as I am new to the ICP and am learning based on an online course. The course is a bit outdated now. Following the old methods in the course may have contributed to my problem.

type AddFirewallRulesPayload = record {
  expected_hash : text;
  scope : FirewallRulesScope;
  positions : vec int32;
  rules : vec FirewallRule;
};
type AddNodeOperatorPayload = record {
  ipv6 : opt text;
  node_operator_principal_id : opt principal;
  node_allowance : nat64;
  rewardable_nodes : vec record { text; nat32 };
  node_provider_principal_id : opt principal;
  dc_id : text;
};
type AddNodePayload = record {
  prometheus_metrics_endpoint : text;
  http_endpoint : text;
  idkg_dealing_encryption_pk : opt vec nat8;
  xnet_endpoint : text;
  committee_signing_pk : vec nat8;
  node_signing_pk : vec nat8;
  transport_tls_cert : vec nat8;
  ni_dkg_dealing_encryption_pk : vec nat8;
  p2p_flow_endpoints : vec text;
};
type AddNodesToSubnetPayload = record {
  subnet_id : principal;
  node_ids : vec principal;
};
type AddOrRemoveDataCentersProposalPayload = record {
  data_centers_to_add : vec DataCenterRecord;
  data_centers_to_remove : vec text;
};
type BitcoinFeature = record {
  status : BitcoinFeatureStatus;
  network : Network;
};
type BitcoinFeatureStatus = variant { Paused; Enabled; Disabled; Syncing };
type BlessReplicaVersionPayload = record {
  release_package_urls : opt vec text;
  node_manager_sha256_hex : text;
  release_package_url : text;
  sha256_hex : text;
  guest_launch_measurement_sha256_hex : opt text;
  replica_version_id : text;
  release_package_sha256_hex : text;
  node_manager_binary_url : text;
  binary_url : text;
};
type CanisterIdRange = record { end : principal; start : principal };
type ChangeSubnetMembershipPayload = record {
  node_ids_add : vec principal;
  subnet_id : principal;
  node_ids_remove : vec principal;
};
type CompleteCanisterMigrationPayload = record {
  canister_id_ranges : vec CanisterIdRange;
  migration_trace : vec principal;
};
type CreateSubnetPayload = record {
  unit_delay_millis : nat64;
  max_instructions_per_round : nat64;
  features : SubnetFeatures;
  max_instructions_per_message : nat64;
  gossip_registry_poll_period_ms : nat32;
  max_ingress_bytes_per_message : nat64;
  dkg_dealings_per_block : nat64;
  max_block_payload_size : nat64;
  max_instructions_per_install_code : nat64;
  start_as_nns : bool;
  is_halted : bool;
  gossip_pfn_evaluation_period_ms : nat32;
  max_ingress_messages_per_block : nat64;
  max_number_of_canisters : nat64;
  ecdsa_config : opt EcdsaInitialConfig;
  gossip_max_artifact_streams_per_peer : nat32;
  replica_version_id : text;
  gossip_max_duplicity : nat32;
  gossip_max_chunk_wait_ms : nat32;
  dkg_interval_length : nat64;
  subnet_id_override : opt principal;
  ssh_backup_access : vec text;
  ingress_bytes_per_block_soft_cap : nat64;
  initial_notary_delay_millis : nat64;
  gossip_max_chunk_size : nat32;
  subnet_type : SubnetType;
  ssh_readonly_access : vec text;
  gossip_retransmission_request_ms : nat32;
  gossip_receive_check_cache_size : nat32;
  node_ids : vec principal;
};
type DataCenterRecord = record {
  id : text;
  gps : opt Gps;
  region : text;
  owner : text;
};
type DeleteSubnetPayload = record { subnet_id : opt principal };
type EcdsaConfig = record {
  quadruples_to_create_in_advance : nat32;
  max_queue_size : opt nat32;
  key_ids : vec EcdsaKeyId;
  signature_request_timeout_ns : opt nat64;
  idkg_key_rotation_period_ms : opt nat64;
};
type EcdsaCurve = variant { secp256k1 };
type EcdsaInitialConfig = record {
  quadruples_to_create_in_advance : nat32;
  max_queue_size : opt nat32;
  keys : vec EcdsaKeyRequest;
  signature_request_timeout_ns : opt nat64;
  idkg_key_rotation_period_ms : opt nat64;
};
type EcdsaKeyId = record { name : text; curve : EcdsaCurve };
type EcdsaKeyRequest = record {
  key_id : EcdsaKeyId;
  subnet_id : opt principal;
};
type FirewallRule = record {
  ipv4_prefixes : vec text;
  direction : opt int32;
  action : int32;
  user : opt text;
  comment : text;
  ipv6_prefixes : vec text;
  ports : vec nat32;
};
type FirewallRulesScope = variant {
  Node : principal;
  ReplicaNodes;
  Subnet : principal;
  Global;
};
type Gps = record { latitude : float32; longitude : float32 };
type Network = variant { Mainnet; Regtest; Testnet };
type NodeOperatorRecord = record {
  ipv6 : opt text;
  node_operator_principal_id : vec nat8;
  node_allowance : nat64;
  rewardable_nodes : vec record { text; nat32 };
  node_provider_principal_id : vec nat8;
  dc_id : text;
};
type NodeProvidersMonthlyXdrRewards = record {
  rewards : vec record { text; nat64 };
};
type NodeRewardRate = record { xdr_permyriad_per_node_per_month : nat64 };
type NodeRewardRates = record { rates : vec record { text; NodeRewardRate } };
type PrepareCanisterMigrationPayload = record {
  canister_id_ranges : vec CanisterIdRange;
  source_subnet : principal;
  destination_subnet : principal;
};
type RecoverSubnetPayload = record {
  height : nat64;
  replacement_nodes : opt vec principal;
  subnet_id : principal;
  registry_store_uri : opt record { text; text; nat64 };
  ecdsa_config : opt EcdsaInitialConfig;
  state_hash : vec nat8;
  time_ns : nat64;
};
type RemoveFirewallRulesPayload = record {
  expected_hash : text;
  scope : FirewallRulesScope;
  positions : vec int32;
};
type RemoveNodeDirectlyPayload = record { node_id : principal };
type RemoveNodeOperatorsPayload = record {
  node_operators_to_remove : vec vec nat8;
};
type RemoveNodesPayload = record { node_ids : vec principal };
type RerouteCanisterRangesPayload = record {
  source_subnet : principal;
  reassigned_canister_ranges : vec CanisterIdRange;
  destination_subnet : principal;
};
type Result = variant { Ok : principal; Err : text };
type Result_1 = variant { Ok; Err : text };
type Result_2 = variant {
  Ok : vec record { DataCenterRecord; NodeOperatorRecord };
  Err : text;
};
type Result_3 = variant { Ok : NodeProvidersMonthlyXdrRewards; Err : text };
type RetireReplicaVersionPayload = record { replica_version_ids : vec text };
type SetFirewallConfigPayload = record {
  ipv4_prefixes : vec text;
  firewall_config : text;
  ipv6_prefixes : vec text;
};
type SevFeatureStatus = variant {
  SecureEnabled;
  Disabled;
  InsecureIntegrityEnabled;
  SecureNoUpgradeEnabled;
  InsecureEnabled;
};
type SubnetFeatures = record {
  canister_sandboxing : bool;
  sev_status : opt SevFeatureStatus;
  http_requests : bool;
  bitcoin : opt BitcoinFeature;
};
type SubnetType = variant { application; verified_application; system };
type UpdateNodeDirectlyPayload = record {
  idkg_dealing_encryption_pk : opt vec nat8;
};
type UpdateNodeOperatorConfigDirectlyPayload = record {
  node_operator_id : opt principal;
  node_provider_id : opt principal;
};
type UpdateNodeOperatorConfigPayload = record {
  node_operator_id : opt principal;
  set_ipv6_to_none : opt bool;
  ipv6 : opt text;
  node_provider_id : opt principal;
  node_allowance : opt nat64;
  rewardable_nodes : vec record { text; nat32 };
  dc_id : opt text;
};
type UpdateNodeRewardsTableProposalPayload = record {
  new_entries : vec record { text; NodeRewardRates };
};
type UpdateSubnetPayload = record {
  unit_delay_millis : opt nat64;
  max_duplicity : opt nat32;
  max_instructions_per_round : opt nat64;
  features : opt SubnetFeatures;
  set_gossip_config_to_default : bool;
  max_instructions_per_message : opt nat64;
  pfn_evaluation_period_ms : opt nat32;
  subnet_id : principal;
  max_ingress_bytes_per_message : opt nat64;
  dkg_dealings_per_block : opt nat64;
  ecdsa_key_signing_disable : opt vec EcdsaKeyId;
  max_block_payload_size : opt nat64;
  max_instructions_per_install_code : opt nat64;
  start_as_nns : opt bool;
  is_halted : opt bool;
  max_ingress_messages_per_block : opt nat64;
  max_number_of_canisters : opt nat64;
  ecdsa_config : opt EcdsaConfig;
  retransmission_request_ms : opt nat32;
  dkg_interval_length : opt nat64;
  registry_poll_period_ms : opt nat32;
  max_chunk_wait_ms : opt nat32;
  receive_check_cache_size : opt nat32;
  ecdsa_key_signing_enable : opt vec EcdsaKeyId;
  ssh_backup_access : opt vec text;
  max_chunk_size : opt nat32;
  initial_notary_delay_millis : opt nat64;
  max_artifact_streams_per_peer : opt nat32;
  subnet_type : opt SubnetType;
  ssh_readonly_access : opt vec text;
};
type UpdateSubnetReplicaVersionPayload = record {
  subnet_id : principal;
  replica_version_id : text;
};
type UpdateUnassignedNodesConfigPayload = record {
  replica_version : opt text;
  ssh_readonly_access : opt vec text;
};
service : {
  add_firewall_rules : (AddFirewallRulesPayload) -> ();
  add_node : (AddNodePayload) -> (Result);
  add_node_operator : (AddNodeOperatorPayload) -> ();
  add_nodes_to_subnet : (AddNodesToSubnetPayload) -> ();
  add_or_remove_data_centers : (AddOrRemoveDataCentersProposalPayload) -> ();
  bless_replica_version : (BlessReplicaVersionPayload) -> ();
  change_subnet_membership : (ChangeSubnetMembershipPayload) -> ();
  clear_provisional_whitelist : () -> ();
  complete_canister_migration : (CompleteCanisterMigrationPayload) -> (
      Result_1,
    );
  create_subnet : (CreateSubnetPayload) -> ();
  delete_subnet : (DeleteSubnetPayload) -> ();
  get_build_metadata : () -> (text) query;
  get_node_operators_and_dcs_of_node_provider : (principal) -> (Result_2) query;
  get_node_providers_monthly_xdr_rewards : () -> (Result_3) query;
  prepare_canister_migration : (PrepareCanisterMigrationPayload) -> (Result_1);
  recover_subnet : (RecoverSubnetPayload) -> ();
  remove_firewall_rules : (RemoveFirewallRulesPayload) -> ();
  remove_node_directly : (RemoveNodeDirectlyPayload) -> ();
  remove_node_operators : (RemoveNodeOperatorsPayload) -> ();
  remove_nodes : (RemoveNodesPayload) -> ();
  remove_nodes_from_subnet : (RemoveNodesPayload) -> ();
  reroute_canister_ranges : (RerouteCanisterRangesPayload) -> (Result_1);
  retire_replica_version : (RetireReplicaVersionPayload) -> ();
  set_firewall_config : (SetFirewallConfigPayload) -> ();
  update_firewall_rules : (AddFirewallRulesPayload) -> ();
  update_node_directly : (UpdateNodeDirectlyPayload) -> (Result_1);
  update_node_operator_config : (UpdateNodeOperatorConfigPayload) -> ();
  update_node_operator_config_directly : (
      UpdateNodeOperatorConfigDirectlyPayload,
    ) -> ();
  update_node_rewards_table : (UpdateNodeRewardsTableProposalPayload) -> ();
  update_subnet : (UpdateSubnetPayload) -> ();
  update_subnet_replica_version : (UpdateSubnetReplicaVersionPayload) -> ();
  update_unassigned_nodes_config : (UpdateUnassignedNodesConfigPayload) -> ();
}