Skip to main content
Bumped by Community user
Bumped by Community user
added 761 characters in body
Source Link

I always close and redeploy but Its annoying ... so i need to upgrade instead .

solana program upgrade target/deploy/program-keypair.json new_program.json owner.json -u "https://mainnet.helius-rpc.com/?api-key=7e466"

Error: Upgrading program failed: RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: invalid program argument [3 log messages]

how to fix it or to find the log messages.

this is how I deploy .

solana program deploy target/deploy/program.so -u "https://mainnet.helius-rpc.com/?api-key=7e466" --program-id new_program.json

I tried with this simple program .

use solana_program::{
    account_info::AccountInfo,
    entrypoint,
    entrypoint::ProgramResult,
    pubkey::Pubkey,
    msg,
};

// declare and export the program's entrypoint
entrypoint!(process_instruction);

// program entrypoint's implementation
pub fn process_instruction(
    program_id: &Pubkey,
    accounts: &[AccountInfo],
    instruction_data: &[u8]
) -> ProgramResult {
    // log a message to the blockchain
    msg!("Hello, world!");
    // msg!("Hello, world!");
    Ok(())
}
[package]
name = "hello_world"
version = "0.1.0"
edition = "2018"

[lib]
name = "hello_world"
crate-type = ["cdylib", "lib"]

[dependencies]
solana-program = "1.18.2"

I always close and redeploy but Its annoying ... so i need to upgrade instead .

solana program upgrade target/deploy/program-keypair.json new_program.json owner.json -u "https://mainnet.helius-rpc.com/?api-key=7e466"

Error: Upgrading program failed: RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: invalid program argument [3 log messages]

how to fix it or to find the log messages.

this is how I deploy .

solana program deploy target/deploy/program.so -u "https://mainnet.helius-rpc.com/?api-key=7e466" --program-id new_program.json

I always close and redeploy but Its annoying ... so i need to upgrade instead .

solana program upgrade target/deploy/program-keypair.json new_program.json owner.json -u "https://mainnet.helius-rpc.com/?api-key=7e466"

Error: Upgrading program failed: RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: invalid program argument [3 log messages]

how to fix it or to find the log messages.

this is how I deploy .

solana program deploy target/deploy/program.so -u "https://mainnet.helius-rpc.com/?api-key=7e466" --program-id new_program.json

I tried with this simple program .

use solana_program::{
    account_info::AccountInfo,
    entrypoint,
    entrypoint::ProgramResult,
    pubkey::Pubkey,
    msg,
};

// declare and export the program's entrypoint
entrypoint!(process_instruction);

// program entrypoint's implementation
pub fn process_instruction(
    program_id: &Pubkey,
    accounts: &[AccountInfo],
    instruction_data: &[u8]
) -> ProgramResult {
    // log a message to the blockchain
    msg!("Hello, world!");
    // msg!("Hello, world!");
    Ok(())
}
[package]
name = "hello_world"
version = "0.1.0"
edition = "2018"

[lib]
name = "hello_world"
crate-type = ["cdylib", "lib"]

[dependencies]
solana-program = "1.18.2"
Source Link

failed to upgrade solana program

I always close and redeploy but Its annoying ... so i need to upgrade instead .

solana program upgrade target/deploy/program-keypair.json new_program.json owner.json -u "https://mainnet.helius-rpc.com/?api-key=7e466"

Error: Upgrading program failed: RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: invalid program argument [3 log messages]

how to fix it or to find the log messages.

this is how I deploy .

solana program deploy target/deploy/program.so -u "https://mainnet.helius-rpc.com/?api-key=7e466" --program-id new_program.json