Skip to content
This repository was archived by the owner on Oct 4, 2024. It is now read-only.

Failed to verify accountId. [-32700] Parse error: Failed parsing args: missing field account_id #909

Closed
armujahid opened this issue Dec 29, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@armujahid
Copy link

Describe the bug
CLI shows Failed to verify accountId. [-32700] Parse error: Failed parsing args: missing field account_id

To Reproduce
Steps to reproduce the behavior:

  1. run near login
  2. login/select account from wallet.testnet.near.org
  3. http://127.0.0.1:5001/?account_id=...... link shows unable to connect error
  4. CLI shows Failed to verify accountId. [-32700] Parse error: Failed parsing args: missing field account_id

Expected behavior
CLI should login with selected account

Screenshots
image

Desktop (please complete the following information):

  • OS: Manjaro
  • Version: latest rolling

Additional context
node v16.13.1
near-cli v3.1.0
tested with both Firefox and Chrome. CLI crashes with that error even before account selection and redirection to that http://127.0.0.1:5001/?account_id=...... link

@armujahid armujahid added the bug Something isn't working label Dec 29, 2021
@volovyks
Copy link
Collaborator

volovyks commented Jan 4, 2022

Works on my PC. Arch, Node 16, NEAR CLI 3.1.0.
If it's not resolved yet, try reinstalling. Make sure that there are no ENV variables that can affect your setup.

@armujahid
Copy link
Author

Yes. Unable to reproduce this issue next day after restarting my PC. Closing this.
May be this issue has something to do with ledger since I was trying to use ledger account with CLI when this issue started occurring. And that issue was even occurring with non-ledger account.

@adamk72
Copy link

adamk72 commented May 23, 2022

I dug into this and added a comment in #946: #946 (comment); hopefully it will help future devs with the same problem.

@armujahid
Copy link
Author

@adamk72 CLI should throw meaningful error like unable to bind to port in that case. Because current error message is confusing and misleading.

@Zaniyar
Copy link

Zaniyar commented Nov 11, 2022

I get this error not on the near CLI - the login there works. But I have the same error in the frontend when I try to call a method on the contract, " Failed parsing args: missing field account_id" but the account_id is there when I log it:

    myContract.nftSupply(wallet.accountId)
      .then(success)
      .catch(x=>{console.log("supply error",x)})
    
  console.log("my args",args)

Output:


> my args: Object: account_id: "blabla.testnet"[[Prototype]]: Object
> 
> App.js:100 supply error Error: [-32700] Parse error: Failed parsing args: missing field `account_id`
>     at json-rpc-provider.js:329:31
>     at async parcelRequire.register.e.exports.default (exponential-backoff.js:7:15)
>     at async f.sendJsonRpc (json-rpc-provider.js:304:15)
>     at async f.query (json-rpc-provider.js:116:13)
>     at async $3875d6d9a9da9cc6$export$bcca3ea514774656.viewMethod (near-wallet.js:70:26)
>     at async $2081698ec9a6d70e$export$eabe01de1e942655.nftSupply (near-interface.js:3:14)

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

No branches or pull requests

4 participants