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

Error Code: AccountNotInitialized. Error Number: 3012. Error Message: The program expected this account to be already initialized. #366

Closed
kelleygo opened this issue May 22, 2024 · 26 comments · Fixed by #373

Comments

@kelleygo
Copy link

helium-wallet hotspots update --commit --lat=36.093--lon=-96.0685--elevation=15 --gain=1.5 iot 14kedPQtBpcwqcYfoz2789TVLwor9LCFrn1Dug9BHMnWwnt8ZK7
Wallet Password: [hidden]
{
"error": "["Program ComputeBudget111111111111111111111111111111 invoke [1]","Program ComputeBudget111111111111111111111111111111 success","Program ComputeBudget111111111111111111111111111111 invoke [1]","Program ComputeBudget111111111111111111111111111111 success","Program hemjuPXBpNvggtaUnN1MwT3wrdhttKEfosTcc2P9Pg8 invoke [1]","Program log: Instruction: UpdateIotInfoV0","Program log: AnchorError caused by account: iot_info. Error Code: AccountNotInitialized. Error Number: 3012. Error Message: The program expected this account to be already initialized.","Program hemjuPXBpNvggtaUnN1MwT3wrdhttKEfosTcc2P9Pg8 consumed 7804 of 199700 compute units","Program hemjuPXBpNvggtaUnN1MwT3wrdhttKEfosTcc2P9Pg8 failed: custom program error: 0xbc4"]",
"result": "error"
}

helium-wallet --version
helium-wallet 2.0.0-rc.7

One of my new hotspot APP operations entered the link and skipped positioning. The positioning failed in the wallet command line. Please help solve this problem. The error is as above. Thank you.

@kelleygo
Copy link
Author

There is also an error when executing on the command line: helium-wallet hotspots list
Error: decode: decode: no entity key found

Caused by:
decode: no entity key found

@madninja
Copy link
Member

This looks like either the hotspot or the wallet is not actually on chain. It's likely related to the same error in your other filed bug.. what is the hotspot key 14kedPQtBpcwqcYfoz2789TVLwor9LCFrn1Dug9BHMnWwnt8ZK7? is that a solana addresss of a hotspot key?

@kelleygo
Copy link
Author

Yes, this is the hotspot key 14kedPQtBpcwqcYfoz2789TVLwor9LCFrn1Dug9BHMnWwnt8ZK7,Using the command line helium-wallet hotspots update fails to locate successfully

@kelleygo
Copy link
Author

I guarantee that there is no problem with this hotspot. It has been connected to the link on the maker APP, but no positioning operation has been performed. I hope to locate it through the command line, because this can be accurate to the longitude and latitude.

@madninja
Copy link
Member

madninja commented May 24, 2024

This works for me:

$ helium-wallet  hotspots info 14kedPQtBpcwqcYfoz2789TVLwor9LCFrn1Dug9BHMnWwnt8ZK7
{
  "key": "14kedPQtBpcwqcYfoz2789TVLwor9LCFrn1Dug9BHMnWwnt8ZK7",
  "name": "virtual-fiery-goldfish",
  "owner": "51CNfV6UowLL3ARXCeu3nc65F4S9xsCWgmSvM4PWvgLB",
  "info": {
    "iot": {
      "asset": "BgEupSxzR7AcAhSGyHYEUAv5fmGLc5omywC6EYmrF3k1",
      "mode": "full",
      "gain": 1.2,
      "elevation": 15,
      "location": "8c64a46060711ff",
      "geo": {
        "lat": 14.582734638118804,
        "lng": 100.45070281938267
      },
      "location_asserts": 1
    }
  }
}

@madninja
Copy link
Member

Are you sure your wallet you are paying the update with there is actually on chain and initialized with some SOL?

@madninja
Copy link
Member

There is also an error when executing on the command line: helium-wallet hotspots list Error: decode: decode: no entity key found

Caused by: decode: no entity key found

Please submit this as a separate issue.. mixing issues is confusing

@kelleygo
Copy link
Author

kelleygo commented May 25, 2024

The changed hotspot has been located through the wallet on the mobile phone, so it is valid. After entering the onboarding and before locating, the command line input is invalid. Error:
helium-wallet hotspots info 14kedPQtBpcwqcYfoz2789TVLwor9LCFrn1Dug9BHMnWwnt8ZK7
Error: decode: decode: no entity key found

Caused by:
decode: no entity key found

But now this device can no longer have this error, unless it is a new device, I guarantee that it can be reproduced

@kelleygo
Copy link
Author

Using a command line wallet is convenient, but it doesn’t work properly

@madninja
Copy link
Member

The changed hotspot has been located through the wallet on the mobile phone, so it is valid. After entering the onboarding and before locating, the command line input is invalid. Error: helium-wallet hotspots info 14kedPQtBpcwqcYfoz2789TVLwor9LCFrn1Dug9BHMnWwnt8ZK7 Error: decode: decode: no entity key found

Caused by: decode: no entity key found

But now this device can no longer have this error, unless it is a new device, I guarantee that it can be reproduced

That’s likely a bug yes but it’s not the one you reported for this issue. I’m asking if you can create separate issues for different bugs

@madninja
Copy link
Member

Using a command line wallet is convenient, but it doesn’t work properly

i agree but as mentioned clear separate issues would help!

@kelleygo
Copy link
Author

I understand what you said helium-wallet hotspots list and helium-wallet hotspots update --commit --lat=36.093--lon=-96.0685--elevation=15 --gain=1.5 iot 14kedPQtBpcwqcYfoz2789TVLwor9LCFrn1Dug9BHMnWwnt8ZK7 are two problems, then my most I hope that the priority is to solve the positioning problem. Return to the problem itself: Error Code: AccountNotInitialized. Error Number: 3012. Do you need me to provide any other information?

@madninja
Copy link
Member

I understand what you said helium-wallet hotspots list and helium-wallet hotspots update --commit --lat=36.093--lon=-96.0685--elevation=15 --gain=1.5 iot 14kedPQtBpcwqcYfoz2789TVLwor9LCFrn1Dug9BHMnWwnt8ZK7 are two problems, then my most I hope that the priority is to solve the positioning problem. Return to the problem itself: Error Code: AccountNotInitialized. Error Number: 3012. Do you need me to provide any other information?

Just to clarify, that error occured after the hotspot was onboarded but before it was asserted? Or does it happen every time you try to assert a new location/gain for that hotspot?

@kelleygo
Copy link
Author

Regarding the need for SOL, this is my first time positioning this device. What I understand is that it does not require SOL. I also have 0.001385SOL in my wallet. My wallet address: 51CNfV6UowLL3ARXCeu3nc65F4S9xsCWgmSvM4PWvgLB

@madninja
Copy link
Member

madninja commented May 25, 2024

All transactions require SOL to pay for transaction fees beyond the location update cost itself.. and that 0.001 SOL is not enough to create the account/address used to store the lat/lon for that hotspot

@kelleygo
Copy link
Author

Error Code: AccountNotInitialized. Error Number: 3012. This error does not seem to indicate insufficient SOL transaction fees. It occurs after the hotspot was onboarded but before it was asserted

@madninja
Copy link
Member

Error Code: AccountNotInitialized. Error Number: 3012. This error does not seem to indicate insufficient SOL transaction fees. It occurs after the hotspot was onboarded but before it was asserted

Errors are very obscure on Solana as to what caused them.. I'll try to reproduce this but I can tell you your transaction would have failed because of not enough SOL.

@kelleygo
Copy link
Author

Yes, I get this error every time I try, It occurs after the hotspot was onboarded but before it was asserted

@madninja
Copy link
Member

And you initially onboarded it with what maker app? because it's odd that it onboarded this hotspot without a location/gain

@kelleygo
Copy link
Author

I am using RisingHF app, version: v2.0.4, the download address is as follows
https://risinghf-resource.oss-cn-shenzhen.aliyuncs.com/app/RisingHF%20Hotspots%20v2.0.4.apk

@kelleygo
Copy link
Author

Hello, has the phenomenon recurred? In order to solve the problem, I will be happy to provide you with other helpful information, if you need it.

@kelleygo
Copy link
Author

I would like to add that my wallet command line operating environment is a Docker container
cat /etc/os-release
PRETTY_NAME="Ubuntu Jammy Jellyfish (development branch)"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

@madninja
Copy link
Member

madninja commented Jun 1, 2024

Unfortunately I don't have a full hotspot that has this issue. I've retried this with a dataonly hotspot, but it does not exhibit the problem you describe

@kelleygo
Copy link
Author

kelleygo commented Jun 2, 2024

I recently tried to repeat this problem with a new device, please pay attention!

@madninja
Copy link
Member

madninja commented Jun 2, 2024

I recently tried to repeat this problem with a new device, please pay attention!

I'm not sure I understand what you are saying.. How to pay attention to or debug a hotspot onboarding I don't control?

@madninja
Copy link
Member

This should be fixed with #373

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

Successfully merging a pull request may close this issue.

2 participants