Frequently Asked Questions

This page contains all frequently asked questions for the Solana ecosystem.

No default signer found

Why is this happening?

This happens because the you do not have any account set as default to sign the transaction.

✅ Solution Run this command in your terminal and this will update your config file to set a default signer for your project.

solana config set --keypair ~/.config/solana/devnet.json

baseAccount not provided

Why is this happening?

This happens because you did not specify the correct publicKey to the baseAccount field. Another reason why this can happen is probably because you have a typo in your code

✅ Solution Double check your code and ensure that there are no typos in your code. Here's one example of why you might get an error

❌ Code with error
// create an account keypair for our program to use
const baseAcccount = anchor.web3.Keypair.generate();
//call start_stuff_off and pass it the params it needs
const tx = await program.rpc.startStuffOff({
  accounts: {
    baseAcccount: baseAcccount.publicKey,    // This is the typo. It should be baseAccount not baseAcccount
    user: provider.wallet.publicKey,
    SystemProgram: SystemProgram.programId,
  },
  signers: [baseAcccount],
});
✅ Fix for this
// create an account keypair for our program to use
const baseAccount = anchor.web3.Keypair.generate();

// //call start_stuff_off and pass it the params it needs
const tx = await program.rpc.startStuffOff({
  accounts: {
    baseAccount: baseAccount.publicKey,    // <====== This is the fix.
    user: provider.wallet.publicKey,
    systemProgram: SystemProgram.programId,
  },
  signers: [baseAccount],
});

too few X's in template "solana-install-init"

Why is this happening?

This happens because your version of Linux does not currently support the mktemp installation command or that solana-init config doesn't currently support your linux version.

✅ Solution If you are on Ubuntu or using Ubuntu on WSL, make sure you are using version 20.04 or 22.04.

  1. You can install it on their Official website
  2. You can download it on Microsoft store
  3. Learn to set it up on Windows 11

  4. Learn to set it up on Windows 10

Unrecognized Signer Source for Anchor Build

The error you are seeing

error: Invalid value for '--program-id <PROGRAM_ID>': unrecognized signer source
There was a problem deploying: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "" }.

Why is this happening?

This happens because the path of your project contains spaces.

✅ Solution Either replace those spaces with some character or delete them.

❌ Misguided Fix If you append --program-id <your-program-id> to the command, deploy will "succeed" but then on Solana Explorer no contract is found.