Closed adeelnaqvi172 closed 4 years ago
Your parent is empty (which is correct) and eosjs incorrectly caught that as an issue. This has since been changed in eosjs and the fix is within the edge release on NPM, but there is a workaround for the latest release: you can set the parent to '...'
(or any number of periods as long as its within 13) and the serializer will resolve that to ''
without causing the error.
Your parent is empty (which is correct) and eosjs incorrectly caught that as an issue. This has since been changed in eosjs and the fix is within the edge release on NPM, but there is a workaround for the latest release: you can set the parent to
'...'
(or any number of periods as long as its within 13) and the serializer will resolve that to''
without causing the error.
Thanks...!! working :+1: :
i am facing this error when i hit my Post API,Basically i am creating this API for propose the Multisig Transaction. And i am follow the documentation of EOSJS from offical website of EOSIO. MY naming convention is follow which is mention but still facing error
MY API IS
app.post('/propose', async (req, res) => { const actions = [{ account: 'eosio', name: 'updateauth', authorization: [{ actor: 'adeelabbasna', permission: 'active', }], data: { account: 'adeelabbasna', permission: 'active', parent: '', auth: { threshold: 1, keys: [{ key: 'EOS7BJChRpdmRbwLgdR2MPW4f7BkXye21quFxqN2Pjv8tJy6iejpF', weight: 1 }], accounts: [], waits: [] } }, }]; (async () => { const serialized_actions = await api.serializeActions(actions)
And then this error will come
UnhandledPromiseRejectionWarning: Error: Name should be less than 13 characters, or less than 14 if last character is between 1-5 or a-j, and only contain the following symbols .12345abcdefghijklmnopqrstuvwxyz at SerialBuffer.pushName (/home/adeel/Documents/EOSIO apis/Multisig Transaction/Propose/node_modules/eosjs/dist/eosjs-serialize.js:253:19) at Object.serialize (/home/adeel/Documents/EOSIO apis/Multisig Transaction/Propose/node_modules/eosjs/dist/eosjs-serialize.js:841:57) at Object.serializeStruct [as serialize] (/home/adeel/Documents/EOSIO apis/Multisig Transaction/Propose/node_modules/eosjs/dist/eosjs-serialize.js:591:28) at Object.exports.serializeActionData (/home/adeel/Documents/EOSIO apis/Multisig Transaction/Propose/node_modules/eosjs/dist/eosjs-serialize.js:1070:12) at Object.exports.serializeAction (/home/adeel/Documents/EOSIO apis/Multisig Transaction/Propose/node_modules/eosjs/dist/eosjs-serialize.js:1079:23) at Api. (/home/adeel/Documents/EOSIO apis/Multisig Transaction/Propose/node_modules/eosjs/dist/eosjs-api.js:311:71)
at step (/home/adeel/Documents/EOSIO apis/Multisig Transaction/Propose/node_modules/eosjs/dist/eosjs-api.js:49:23)
at Object.next (/home/adeel/Documents/EOSIO apis/Multisig Transaction/Propose/node_modules/eosjs/dist/eosjs-api.js:30:53)
at fulfilled (/home/adeel/Documents/EOSIO apis/Multisig Transaction/Propose/node_modules/eosjs/dist/eosjs-api.js:21:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:26207) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:26207) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
i also attached Screen shot