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

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

Open
faisal00813 opened this issue Mar 1, 2022 · 6 comments
Labels
bug Something isn't working T-dev-tools

Comments

@faisal00813
Copy link

faisal00813 commented Mar 1, 2022

Describe the bug Unable to login. Near-cli is failing with error: Failed to verify accountId. [-32700] Parse error: Failed parsing args: missing field account_id

To Reproduce Steps to reproduce the behaviour:

  1. Create an account in near-wallet
  2. Install near-cli version 3.2.0 on OSX
  3. try near login

Expected behavior Should wait for the browser to authenticate

Screenshots

Desktop (please complete the following information):

  • OS: macOS Monterey
  • Version 12.1
@faisal00813 faisal00813 added the bug Something isn't working label Mar 1, 2022
@faisal00813
Copy link
Author

Seems to be related to this

@pablofelipe01
Copy link

@faisal00813 did you fix it?

@faisal00813
Copy link
Author

No.
Still facing the same issue on Mac.

@adamk72
Copy link

adamk72 commented May 19, 2022

I'm experiencing the same issue. Is there a way/need to generate the keys for .near-credentials/testnet/*.json such that it matches the public_key param that is being passed up to the browser?

I notice that I don't have any public/private key paring on my local machine that matches the public_key param passed with the URL, e.g. https://wallet.testnet.near.org/login/?referrer=NEAR+CLI&public_key=ksjdflaksjdf&success_url=http%3A%2F%2F127.0.0.1%3A5001.

edit: Also it seems weird to have the success results point to a localhost server when nothing is running on that port.

@adamk72
Copy link

adamk72 commented May 19, 2022

According to this site: https://www.near-sdk.io/zero-to-hero/basics/set-up-skeleton,

When you typed near login, NEAR CLI generated a key pair: a private and public key. It kept the private key tucked away in a JSON file and sent the public key as a URL parameter to NEAR Wallet. The URL is long and contains other info instructing NEAR Wallet to "add a full access key" to the account. Our browser's local storage had a key (created when the account was made) that is able to do several things, including adding another key. It took the public key from the URL parameter, used it as an argument, and voilà: the testnet account has an additional key!

This apparently isn't happening, because no files are being added to .near-credentials. Yet somehow, it's generating a public key to add to the URL.

@adamk72
Copy link

adamk72 commented May 23, 2022

I looked into the near-cli source code and found that there was a callback using port 5000. My Mac (Monterey 12.3.1) was using port 5000 already, which I couldn't kill off and which in turn led me to a quick Google search. All the articles basically say this:
Screen Shot 2022-05-23 at 13 33 36
Did so, and now I'm able to use near login successfully.

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

No branches or pull requests

3 participants