Nexus

TEAL compile error: "duplicate label"

Short answer: The same label name is defined more than once.

The exact message

1 error: 3: duplicate label "loop"

Source: POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03.

Why it happens

Captured with loop: written twice. The message reports the line of the second definition and the name.

How to fix it

Wording can change between node versions. All API errors · errors.json · transaction errors · SDK errors · costs