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

'The given account is owned by a different program than expected' #3

Closed
micku92 opened this issue Feb 20, 2022 · 3 comments
Closed

Comments

@micku92
Copy link

micku92 commented Feb 20, 2022

I'm trying to get the repository setup with the instructions. I'm following the steps exactly:

  1. Install dependencies and run anchor build. Copying the Program Id.
  2. Modify lib.rs and anchor.tom to use the new Program Id string
  3. run anchor deploy to deploy on devnet
  4. execute command node client.js --program <Program Id> --feed 5zxs8888az8dgB5KauGEFoPuMANtrKtkpFiFRmo3cSa9

I get the following error:

node client.js --program 6mNYkLEbzxkjLdF73oLZtDZLaTkbhjzjmkLTD6VBUQV6 --feed 5zxs8888az8dgB5KauGEFoPuMANtrKtkpFiFRmo3cSa9
Running client...
priceFeedAccount public key: HLyaJrffarpjj8i4S17r6V1oXX5PncmicWcva8bfwEPU
user public key: M1YDPWDPromi4SDKkZ8RD6VhSgzFwFUQF53ypVX7yCM
Transaction simulation failed: Error processing Instruction 0: custom program error: 0xbbf
    Program 6mNYkLEbzxkjLdF73oLZtDZLaTkbhjzjmkLTD6VBUQV6 invoke [1]
    Program log: Instruction: Execute
    Program 11111111111111111111111111111111 invoke [2]
    Program 11111111111111111111111111111111 success
    Program log: Custom program error: 0xbbf
    Program 6mNYkLEbzxkjLdF73oLZtDZLaTkbhjzjmkLTD6VBUQV6 consumed 10343 of 1400000 compute units
    Program 6mNYkLEbzxkjLdF73oLZtDZLaTkbhjzjmkLTD6VBUQV6 failed: custom program error: 0xbbf
/Users/andy/dev/solana-starter-kit/node_modules/@project-serum/anchor/dist/cjs/error.js:40
            return new ProgramError(errorCode, errorMsg, errorCode + ": " + errorMsg);
                   ^

ProgramError: 3007: The given account is owned by a different program than expected
    at Function.parse (/Users/andy/dev/solana-starter-kit/node_modules/@project-serum/anchor/dist/cjs/error.js:40:20)
    at Object.rpc [as execute] (/Users/andy/dev/solana-starter-kit/node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.js:38:61)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async main (/Users/andy/dev/solana-starter-kit/client.js:39:12) {
  code: 3007,
  msg: 'The given account is owned by a different program than expected'
}

Node.js v17.5.0

Is the onchain program working, and if so what am I doing wrong here?

@bcruddy
Copy link

bcruddy commented Mar 21, 2022

Running into the same issue. It looks like your priceFeedAccount has 0 transactions. Same for the pubkey I got back here.

@pappas999
Copy link
Collaborator

Hi @bcruddy and @micku92 , can you please try again based on our latest set of instructions in the readME and the docs, and let me know if the issue still occurs? I believe it should be resolved now with the latest code base

@pappas999
Copy link
Collaborator

Hi @bcruddy and @micku92 , I'm going to close this assuming that the latest code base doesn't cause this issue, as i can't replicate it. Feel free to comment here if this is not the case

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

3 participants