Hi loic — thanks for the clear report, this helps a lot. I see you’re reporting a SolanaError when calling signer.signTransactions() while trying to create an SPL token account. From your message I pulled these details:
- SDK Details: MetaMask Embedded Wallets (Web3Auth)
- Web3Auth / Embedded SDK version: @web3auth/node-sdk ^5.0.0 (plus @web3auth/base ^9.7.0)
- Platform / Framework: Node.js
- Solana libs: @solana/web3.js ^1.98.4, @solana/spl-token ^0.4.14
- Code link you provided: privatebin link to index.js (you mentioned error at line 67)
To help the support team reproduce and resolve this quickly, please provide only the missing / relevant items below (you may already have some in the PrivateBin file — paste them here if easier):
- Exact error text / stack trace you see in the Node console (copy/paste). You referenced line 67, but I can’t open the PrivateBin — I need the error message here.
- The initialization & login snippet you use for Web3Auth / MetaMask Embedded (how you instantiate the wallet object and any login/connect call).
- The snippet where you build the transaction(s) and call signer.signTransactions() (or signTransaction/signAllTransactions) — include how many transactions you pass and their types (Transaction object vs serialized bytes).
- Which cluster are you targeting (devnet / testnet / mainnet) and the RPC endpoint.
- Any Node console logs around the call, and whether you’re setting feePayer and recentBlockhash on the Transaction(s).
Why I ask / likely causes and quick checks you can try now
- Common causes for SolanaError when signing transactions:
- The Transaction has no recentBlockhash or feePayer set — the wallet will often require these before signing. Fix: set tx.feePayer and tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash.
- Passing the wrong type to the signer (e.g., serialized Uint8Array instead of Transaction objects, or mixing signed/unsigned txs). Ensure you pass Transaction instances (or the exact shape your signer expects).
- Using the wrong signer method for your wallet (some wallets expose signTransaction or signAllTransactions rather than signTransactions). Check the wallet API you have from Web3Auth / Embedded SDK.
- The payer / signer publicKey is not set or the wallet is not fully authenticated/connected.
Suggested minimal example pattern (Node + @solana/web3.js) — ensure your code follows these steps:
- build Transaction: let tx = new Transaction().add(…instructions…);
- set fee payer and recentBlockhash: tx.feePayer = payerPublicKey; tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash;
- sign via wallet API (method name depends on implementation):
- if your signer supports signTransaction: signed = await signer.signTransaction(tx);
- if signAllTransactions / signTransactions accepts an array: signedArray = await signer.signAllTransactions([tx]);
- send: await connection.sendRawTransaction(signed.serialize());
Helpful docs
- MetaMask docs: https://docs.metamask.io/
- Web3Auth docs (Node / Solana examples): Introduction | Documentation | Web3Auth
- Solana Transaction basics: https://docs.solana.com/developing/programming-model/transactions
If you can paste the three short things requested above (exact console error, the init/login code, and the transaction + signer call), I’ll read them and give a targeted fix (or a patch you can copy/paste). If you prefer, paste the relevant section of your PrivateBin file directly here.
Note: This response was generated by an AI bot and may require further verification. The MetaMask Community Team has tracked this issue and will be responding as soon as possible.
Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. MetaMask Developer Office Hours