EOSIO / eosjs

General purpose library for the EOSIO blockchain.
http://eosio.github.io/eosjs
MIT License
1.43k stars 462 forks source link

Getting error : -Missing ATOMIC_ATTRIBUTE in pair_string_ATOMIC_ATTRIBUTE when using basic-usage/00_browser.md #962

Open sudhird81 opened 3 years ago

sudhird81 commented 3 years ago

Version of EOSJS eosjs@16.0.9/lib/eos.min.js

Describe the bug

This piece of code throwing below error :

const result = await eos.transaction({
                actions: [{
                    account: 'atomicassets',
                    name: 'transfer',
                    authorization: [{
                        actor: user.accountName,
                        permission: 'active',
                    }],
                    data: formData,
                }]
            }, {
                blocksBehind: 3,
                expireSeconds: 30,
            });

Got Following Error when trying to hit

Caught exception: Error: [
    "Unrecognized type or struct ATOMIC_ATTRIBUTE.variant_int8_int16_int32_int64_uint8_uint16_uint32_uint64_float32_float64_string_INT8_VEC_INT16_VEC_INT32_VEC_INT64_VEC_UINT8_VEC_UINT16_VEC_UINT32_VEC_UINT64_VEC_FLOAT_VEC_DOUBLE_VEC_STRING_VEC",
    "Missing ATOMIC_ATTRIBUTE in pair_string_ATOMIC_ATTRIBUTE.fields.value"
]

To Reproduce Simply referred this https://github.com/EOSIO/eosjs/blob/master/docs/basic-usage/00_browser.md

Expected behavior It should work and do the transfer token.

Screenshots image

Thanks in advance for your help.

sanaraufx commented 3 years ago

Have you tried this on a more modern version of eosjs (example: v22)? Is there a reason why you're using eosjs v16.0.9?