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

500 internal when calling jsonRPC API #196

Open
akbariandev opened this issue Nov 24, 2023 · 26 comments
Open

500 internal when calling jsonRPC API #196

akbariandev opened this issue Nov 24, 2023 · 26 comments

Comments

@akbariandev
Copy link

I tried to use testnet swagger to call JsonRPC method. But always got error "error": "LITE_SERVER_UNKNOWN: cannot apply external message to current state : Failed to unpack account state".

The message contains some value for deploying NFT collection contract. the base of source code has been provided by https://github.com/coalus/MintyTON and the contract is based on testnet.

@barinbritva
Copy link

I have the same issue with the same example of MintyTON. Even though I've created an API token

@tina1998612
Copy link

same error

@davaeiha
Copy link

davaeiha commented Apr 3, 2024

I tried to use testnet swagger to call JsonRPC method. But always got error "error": "LITE_SERVER_UNKNOWN: cannot apply external message to current state : Failed to unpack account state".

The message contains some value for deploying NFT collection contract. the base of source code has been provided by https://github.com/coalus/MintyTON and the contract is based on testnet.

I have this error with testnet when excuting function accept_message()

@Desablero
Copy link

Same problem

@Almazatun
Copy link

I have faced the same issue

@can-er
Copy link

can-er commented Apr 24, 2024

Hi Team, I'm facing the same problem when creating a wallet :

    data: {
      ok: false,
      error: 'LITE_SERVER_UNKNOWN: cannot apply external message to current state : Failed to unpack account state',
      code: 500
    }

@taiking
Copy link

taiking commented Apr 24, 2024

I have faced the same issue

@Ludwintor
Copy link

same issue when trying to send a batch of messages with highload wallet v3

@feitian124
Copy link

same error when try https://github.com/coalus/MintyTON

@Algoritm211
Copy link

Algoritm211 commented May 9, 2024

Same error, any solutions?

@amirghdev
Copy link

same error any solutions?

@SaD1sT1337
Copy link

same issue

@csyr
Copy link

csyr commented May 15, 2024

if anyone who resolved this issue , please help to tell us your solution . thank you

@nooxx
Copy link

nooxx commented May 22, 2024

I had the same issue when deploying a wallet. I fixed it by sending some TON to the wallet before deploying it.

@DimFirsov
Copy link

the error means that wallet isn't deployed
Failed to unpack account state

@mois-ilya
Copy link

mois-ilya commented Jun 24, 2024

In my case, with this error, it helped me to simply top up my account balance on the test network

For most transactions on the network, you need to make a transaction that costs something. And if you make a transaction from an account whose balance is zero, you will receive this error

@Chidiebere95
Copy link

Same error when I try this

     try {
      const transfer = await wallet.methods
       .transfer({
        secretKey: keyPair.secretKey,
        toAddress: 'UQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqEBI',
        amount: TonWeb.utils.toNano('0.01'),
        seqno,
        payload: 'Hello world',
        sendMode: 3,
     })
    .send();

    console.log('Transfer here: ', transfer);
    } catch (error) {
   console.log('error here', error);
   }

@phi-khanh2k
Copy link

same issue

@Janibek6119
Copy link

Setting archival=true solved it for me when I did getTransactions

API's Swagger hinted it here

By default getTransaction request is processed by any available liteserver. If archival=true only liteservers with full history are used.
Default value : false

@insomniaqenal
Copy link

вся проблема в том, что вы не указываете тип разворачиваемого кошелька, укажите ваш тип при создании
const WalletClass = tonweb.wallet.all["v4R2"];

@yuanzd123
Copy link

it's because the wallet version does not match. Need to use V4 version if you follow the demo

@netpoe
Copy link

netpoe commented Nov 11, 2024

When working with a TON Testnet wallet, you should "unpack" the wallet mnemonics like this:

// Convert mnemonics to private key
let mnemonics = process.env.ADMIN_TON_WALLET_SEED!.split(" ");
let keyPair = await mnemonicToPrivateKey(mnemonics);

const workchain = 0;
const wallet = WalletContractV5R1.create({
  publicKey: keyPair.publicKey,
  workchain,
  walletId: {
    networkGlobalId: -3, // Important!!, this is the testnet walletId context. Set this to remove the unpack error.
  },
});

If you search the resulting address in https://testnet.tonviewer.com/, you should see the matching address.

NOTE: This is assuming that your wallet contract is already deployed: https://docs.ton.org/v3/guidelines/smart-contracts/howto/wallet#--external-and-internal-messages

@Blockchain-Oracle
Copy link

howdy guys happy coding...
"LITE_SERVER_UNKNOWN" when you get this error its means the wallet your trying to transfer from (with keyPair) is not deployed yet , you need atleast 0.01 ton for a wallet to be deployed in ton (this applies to both testnet and mainnet)

@mrtnetwork
Copy link

I encountered the same issue on the TON testnet when an account remains idle for a few months. I believe this might be related to the node or missing account transactions. In the case of my Jetton account, its state changed to 'frozen,' although my wallet is still active

@jashan12002
Copy link

i am getting the same error if any body solution to this problem please notify me

@nhannh-senspark
Copy link

nhannh-senspark commented Dec 21, 2024

Hey guys. You may need to specify that it is a testnet wallet:
From their documentation on creating a wallet contract from mnemonics: https://docs.ton.org/v3/guidelines/dapps/cookbook

let wallet = WalletContractV5R1.create({
        publicKey: keyPair.publicKey,
        workChain: 0, // Usually you need a workchain 0
        walletId: {
            networkGlobalId: -3, // -239 is mainnet, -3 is testnet
        },
    });
});

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