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

PrepareError (Deserialization) occurred when call contract function on mainnet (same call works on testnet) #9339

Closed
pvolnov opened this issue Jul 23, 2023 · 2 comments

Comments

@pvolnov
Copy link

pvolnov commented Jul 23, 2023

I try to run the method on a smart contract on mainnet and get a PrepareError (Deserialization). At the same time, the same contract successfully works on testnet

Contracts (same code hash)

Calls

all tests pass.

dependencies:

near-sdk = "4.1.1"
near-contract-standards = "4.1.1"
serde = "^1.0.36"
log = "0.4.16"

error:


Receipts: 8YDbcHrTV1CDYzhDP2ZsKvsP6BkANzKyFKacvyTGczx, GRXCQW9SykeA87fPvXvns6QpyHVxoBS3nK2qbSoaNKJ2
        Failure [giveaway.mydev.near]: Error: Error happened while deserializing the module
ServerTransactionError: Error happened while deserializing the module
    at Object.parseResultError (/opt/homebrew/lib/node_modules/near-cli/node_modules/near-api-js/lib/utils/rpc_errors.js:31:29)
    at Account.signAndSendTransactionV2 (/opt/homebrew/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:160:36)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async scheduleFunctionCall (/opt/homebrew/lib/node_modules/near-cli/commands/call.js:57:38)
    at async Object.handler (/opt/homebrew/lib/node_modules/near-cli/utils/exit-on-error.js:52:9) {
  type: 'Deserialization',
  context: undefined,
  index: 0,
  transaction_outcome: {
    block_hash: '5s6soBQiDanFQkdo4eVdVgRsmjZ37aSPVCANvtpxeab3',
    id: 'H4j1fh2BBMB4U5HGNoLyFM2FHaVUsFWiSGM9Wxt8QTwh',
    outcome: {
      executor_id: 'mydev.near',
      gas_burnt: 2428081987248,
      logs: [],
      metadata: [Object],
      receipt_ids: [Array],
      status: [Object],
      tokens_burnt: '242808198724800000000'
    },
    proof: [ [Object], [Object], [Object] ]
  }
}

Any ideas what could be the problem?

@nagisa
Copy link
Collaborator

nagisa commented Jul 24, 2023

Without investigating this very much, could it be #9143?

@nagisa
Copy link
Collaborator

nagisa commented Aug 2, 2023

I’m going to close this now that the protocol version upgrade has occurred and the suspected issue is resolved.

Please re-open if the issue persists. Thank you.

@nagisa nagisa closed this as completed Aug 2, 2023
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