question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

eos.contract doesn't work, account_missing error

See original GitHub issue

eos : dawn4.2 scatter : 4.0.3

when I call eos.contract, it gives account_missing error. I think code is correct… and I set all scatter things correctly. (identity, key pair, account…) Is it just version missmatch problem? or should I modify the code?

code :


const eosOptions = {};
const eos = scatter.eos( network, Eos.Localnet, eosOptions );
scatter.getIdentity({ accounts:[network] }).then(id => {
  const account = id.accounts.find(account => account.blockchain === 'eos');
  const options = {
                          authorization: [
                              `${account.name}@${account.authority}`,
                          ]
                      };

  eos.contract(MY_CONTRACT).then(contract => {
      contract.myAction(...args, options);
  })
})

error :

{type: "account_missing", message: "Missing required accounts, repull the identity", code: 402, isError: true} code : 402 isError : true message : "Missing required accounts, repull the identity" type : "account_missing"

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
alexpmorriscommented, Jun 23, 2018

It also took me a quite a bit of effort to solve this due to all the outdated examples.

As such, I just wanted to share what finally worked for me, for use with the jungle testnet. This example demonstrates multiple transfers wrapped into a single transaction.

However, issue still remains that you can’t access http from an https site. If anyone knows of an active https rpc-node for jungle testnet, please share! 😃

var network = {blockchain:'eos', protocol: "http", host: 'ayeaye.cypherglass.com', port:8888, chainId:'038f4b0fc8ff18a4f0842a8f0564611f6e96e8535901dd45e43ac8691a1c4dca'}

scatter.getIdentity({accounts:[network]}).then(identity=>{ 
  const account = identity.accounts.find(acc=>acc.blockchain==='eos'); 
  const eos = window.scatter.eos(network, Eos, {broadcast:true, chainId:'038f4b0fc8ff18a4f0842a8f0564611f6e96e8535901dd45e43ac8691a1c4dca'}, "http"); 
  const requiredFields = {accounts:[network]};
  eos.contract('eosio.token', {requiredFields}).then(contract => {
    contract.transaction(tx => {
      tx.transfer('abcabcabc123', 'abcabcabc321', '1.1234 EOS', '');
      tx.transfer('abcabcabc123', 'abcabcabc321', '1.4321 EOS', '');
    }).then(trx => { console.log("trx", trx); });
  });
});
3reactions
nsjamescommented, Jun 1, 2018

There’s two cases which could return this error.

The account specified is not attached to the network specified https://github.com/EOSEssentials/Scatter/blob/master/src/services/SignatureService.js#L62

The name@permission is incorrect or not included in the messages.authorization from the EOS transaction when collected. https://github.com/EOSEssentials/Scatter/blob/master/src/services/SignatureService.js#L72

payload.messages
    .map(message => message.authorization
        .map(auth => `${auth.actor}@${auth.permission}`))

It’s possible something has changed with the latest eosjs or EOSIO. I am pulling latest master and checking.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EOS Studio - Contract helloworld and and account helloworld ...
Rebooted studio again and this time I got my helloworld contract and account back. Weird shit goin on. However my remaining problem is...
Read more >
Mitigating Lost Transactions on EOSIO
Nodeos is a transaction validator application that ships with EOSIO. Node operators use it to operate nodes on the chain.
Read more >
Require inline action be sent by contract, and not account
After a lot of experimentation, I finally understand how permissions work in EOSIO! EOS Permission Model - Overview. An account can have various ......
Read more >
EOS SDK Error Codes | Epic Online Services Developer
Numeric Code Code Return Cause/Reason 1 EOS_NoConnection /** Failed due to no connection */ 2 EOS_InvalidCredentials /** Failed login due to invalid credentials */ 3 EOS_InvalidUser...
Read more >
EOS troubleshooting - Exodus Support
Why do I get an error about keys not providing access? ... If you ever used your Exodus EOS account in another EOS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found