Nexus

algosdk "Incorrect number of method arguments. Expected 2, got 1"

Short answer: addMethodCall received a different number of methodArgs than the ABI method declares.

The exact message

Incorrect number of method arguments. Expected 2, got 1

Source: Error, captured locally with algosdk 3.9.0 on 2026-12-03.

Why it happens

The capture called a two-argument method with one argument. The message states the expected and the received counts. Note that arguments the SDK fills in for you (such as a transaction argument) still count in the method's argument list.

How to fix it

Wording can change between SDK versions. All SDK errors · errors.json · node errors · x402 errors.