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

Unexpectedly encountered null for non-optional in get_account response #33

Closed
theblockstalk opened this issue Aug 23, 2022 · 1 comment

Comments

@theblockstalk
Copy link
Contributor

In a developer environment, I have deployed the eosio.bios account but not a token.

When I call api.v1.chain.get_account("account_name") I receive an account response such as the one below

{
   "account_name": "xprq3ryq2ewx",
   "head_block_num": 153,
   "head_block_time": "2022-08-23T19:11:48.500",
   "privileged": false,
   "last_code_update": "1970-01-01T00:00:00.000",
   "created": "2022-08-23T19:10:57.000",
   "ram_quota": -1,
   "net_weight": -1,
   "cpu_weight": -1,
   "net_limit": {
      "used": -1,
      "available": -1,
      "max": -1
   },
   "cpu_limit": {
      "used": -1,
      "available": -1,
      "max": -1
   },
   "ram_usage": 3898,
   "permissions": [...],
   "total_resources": null,
   "self_delegated_bandwidth": null,
   "refund_request": null,
   "voter_info": null,
   "rex_info": null,
   "subjective_cpu_bill_limit": {
      "used": 0,
      "available": 0,
      "max": 0
   }
}

as you can see, several items have a null value, which when processed are causing the following error

Unexpectedly encountered null for non-optional

      at decodeObject (node_modules/@greymass/eosio/src/serializer/decoder.ts:244:6)

I am using @greymass/eosio-core 0.6.2. It seems to me that the library should work for all chains, even if not fully initialized with a resource token. Hope this helps.

@aaroncox
Copy link
Member

aaroncox commented Sep 5, 2022

Resolved in c2ceafa - published in 0.6.4.

@aaroncox aaroncox closed this as completed Sep 5, 2022
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

No branches or pull requests

2 participants