solana-developers / program-examples

A repository of Solana program examples
574 stars 176 forks source link

anchor test `basic/account-data` meet this problem #40

Open DaviRain-Su opened 1 year ago

DaviRain-Su commented 1 year ago
(node:28858) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
    1) Create the address info account
    2) Read the new account's data

  0 passing (81ms)
  2 failing

  1) Account Data!
       Create the address info account:
     Error: AnchorError caused by account: address_info. Error Code: AccountNotInitialized. Error Number: 3012. Error Message: The program expected this account to be already initialized.
      at Function.parse (node_modules/@project-serum/anchor/src/error.ts:167:14)
      at translateError (node_modules/@project-serum/anchor/src/error.ts:276:35)
      at MethodsBuilder.rpc [as _rpcFn] (node_modules/@project-serum/anchor/src/program/namespace/rpc.ts:35:29)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  2) Account Data!
       Read the new account's data:
     Error: Account does not exist ESowwGuph5bQso9ycdi7R7hKNvirUpYErzfU19ATdZhb
      at AccountClient.fetch (node_modules/@project-serum/anchor/src/program/namespace/account.ts:154:13)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Ayomide57 commented 1 year ago

You need to add the code and other thing relating to the issue