helium / helium-wallet-rs

Rust implementation of a helium wallet CLI
Apache License 2.0
258 stars 114 forks source link

Error: error decoding response body: expected value at line 1 column 1 (on `hotspots add`) #341

Closed sprijk closed 1 year ago

sprijk commented 1 year ago

Version 2.0.0-rc.3

helium-wallet hotspots add --mode data-only --commit iot <TXN>
Wallet Password: [hidden]
Error: error decoding response body: expected value at line 1 column 1

Caused by:
    expected value at line 1 column 1

Is there a way to get more debug logs?

jthiller commented 1 year ago

Hi @sprijk, This is fixed up in https://github.com/helium/helium-wallet-rs/pull/338 You can build from that source to get the Hotspot onboarded.

Do note, however, that asserting location of the data-only Hotspot is still in-progress.

sprijk commented 1 year ago

ha thanks

I did that, and it seems to go a step further.

however, I now get:

$ helium-wallet hotspots add --mode data-only iot <TXN>
Wallet Password: [hidden]
{
  "err": {
    "InstructionError": [
      0,
      {
        "Custom": 3012
      }
    ]
  },
  "logs": [
    "Program hemjuPXBpNvggtaUnN1MwT3wrdhttKEfosTcc2P9Pg8 invoke [1]",
    "Program log: Instruction: OnboardDataOnlyIotHotspotV0",
    "Program log: AnchorError caused by account: dc_burner. Error Code: AccountNotInitialized. Error Number: 3012. Error Message: The program expected this account to be already initialized.",
    "Program hemjuPXBpNvggtaUnN1MwT3wrdhttKEfosTcc2P9Pg8 consumed 8485 of 200000 compute units",
    "Program hemjuPXBpNvggtaUnN1MwT3wrdhttKEfosTcc2P9Pg8 failed: custom program error: 0xbc4"
  ],
  "accounts": null,
  "unitsConsumed": 0,
  "returnData": null
}
Error: Transaction simulation failed

Not sure if this error is of any value.

madninja commented 1 year ago

@sprijk that means you don't have DC in the wallet that you're using to pay for the onboarding

sprijk commented 1 year ago

@madninja thanks, that worked. however it outputs: Error: Transaction failed xxxxx

madninja commented 1 year ago

@madninja thanks, that worked. however it outputs: Error: Transaction failed xxxxx

you'll have to look at the signature of the transaction and post some details to get help.. Hard to tell from that what happened on chain

sprijk commented 1 year ago

it seems the gateway is now present in my wallet:

helium-wallet hotspots list
{
  "address": "xxx",
  "hotspots": [
    {
      "key": "xxx",
      "name": "round-eggplant-chinchilla"
    }
  ]
}
madninja commented 1 year ago

@sprijk oh was that a timeout error in the Transaction failed? If so, we've seen that, haven't found a way to avoid it yet (cc @ChewingGlass )

otherwise it looks like your DO hotspot is on chain now..

sprijk commented 1 year ago

it was a Transaction failed indeed. but I'll try to find out now how to determine the gateway is actually registered and online on the network 🙂

sprijk commented 1 year ago

the logs of the Dragino LPS8-N at least shows uplink messages from my nearby devices! so this looks very good. thanks for all the help and the updates to helium_gateway and helium-wallet!

asprakash commented 1 year ago

Hi. I am also facing the same issue. Using 2.0.0.rc.3 version helium wallet and trying to add data-only hotspot. I found the recommended fix #338 Kindly help to configure for devnet.

TIA.

asprakash commented 12 months ago

I was able to fixed by compiling the latest source with 2.0.0.rc4. Now I can able to add the DO on the wallet.