Troubleshooting
6 min read
Most "it should work!" moments have a short, specific cause. Here are the ones we see most, and how to read your way out of them.
"My Run passed but Submit failed"
This is the single most common one, and it almost always means your code is correct on the visible samples but not on the hidden suite, which deliberately includes the cases the samples leave out:
- Edge cases: empty input, a single element, all-equal elements, negatives, the maximum
value, an empty string,
nullwhere it's allowed. - Scale: inputs large enough that an inefficient solution times out even though it's
logically right. If the failing test name mentions a large
n, this is your problem; see Writing fast C#.
Open the Tests tab and select Only failing when it appears. Read the quality scorecard, test name, status, and budget or rule detail before changing code. Then add the nastiest small custom input you can think of and Run it.
A test says Timeout
A timeout means your code exceeded the per-test time budget. It ran, it may even be correct, but not fast enough. Nine times out of ten the cause is complexity, not a slow line. An O(n²) approach on a large hidden input cannot be tuned into passing; it has to become O(n log n) or O(n). Start with the three questions in Writing fast C#.
A test says Error
The grader caught an unhandled exception. The result shows the exception type and message; read it first, it's usually decisive:
| Exception | Usual cause |
|---|---|
NullReferenceException |
An input or intermediate value was null and you dereferenced it. |
IndexOutOfRangeException |
An off-by-one, or you assumed a non-empty collection. |
ArgumentException / FormatException |
Parsing input that isn't in the shape you assumed. |
OverflowException or a wrong huge number |
An int that should have been a long. |
StackOverflowException |
Unbounded recursion; add the base case or go iterative. |
It won't compile
Compile errors come back with the full compiler diagnostics, and they show up inline in the editor as red underlines. A few platform-specific gotchas, beyond ordinary typos:
- You renamed
Solutionor the entry method. The grader binds to them by name. Keep the class and method signature exactly as the starter gives them. See The editor & runtime. - A missing
using. Implicit usings aren't on; add the namespace yourself at the top. - You reached for a NuGet package or
unsafe. Neither is available. Use the base class library only, andunsafeis disabled by design. - You wrote a
Main/ top-level statements. Submissions are a library; put the logic in the method instead.
The hidden test won't show me its input
That is intentional, not a bug. Hidden tests reveal their name, status, timing, and applicable budget or rule evidence, but never the input, expected output, or your output. Read the test name; it points at the kind of case you are missing.
My console output disappeared
Console.WriteLine output is shown when you Run, next to the return value. Submit hides
it. Grading reports pass/fail, timing, and allocations, not your trace. If you need to see
what your code printed, Run it.
My code reset itself
Your in-progress code autosaves per puzzle, in this browser. Two things clear it: hitting reset (which deliberately restores the original starter), and clearing your browser's site data (which wipes the local save). If a puzzle looks blank when you expected your work, you most likely reset it. Use Reveal solution to study a correct version, then Reset and try again.
Remember that in-progress puzzle code is saved in the current browser. Signed-in solved history follows the account, but unfinished buffers do not automatically move to a different browser or device.
I reached a limit unexpectedly
Run, Submit, and Reveal have separate allowances on Free. Running samples does not spend a submission, but it does use the run allowance. Revealing does not spend a run or submission, but it does use the reveal allowance.
Read the limit message and the usage indicator in the Playground header. It identifies the relevant allowance and reset. If a paid plan still shows a Free limit after checkout, refresh once, then open Account & billing and confirm that the plan card shows the paid plan and an active status.
A learning path did not advance
A path step completes only after a clean Submit. Run, hints, and Reveal do not complete it. Open the path detail page and check which exercise is the next incomplete step. If the puzzle shows solved but the signed-in path does not update, refresh the path page so it can reconcile the latest history.
A Lab will not start
First confirm that Labs appears in the app and that the selected Lab is included in your plan. During workspace preparation:
- use Retry if the preparation screen reports a temporary failure;
- if another Lab session is active, use the offered action to end it before starting this one;
- keep the preparation page open until the workspace is ready;
- after a session has ended, use Reload to create a fresh workspace.
If the editor alone fails to load, choose Reload editor. The Lab session can remain healthy even when the browser editor needs another attempt.
A Lab check will not pass
Check lists every requirement it evaluated. Fix each failed row, then Check again. Make sure unsaved
changes were sent by selecting Check, Build, Run, or Ctrl/Cmd + S. In terminal-led Labs, confirm
that a guide command was sent to the intended terminal and has finished before checking.
Next remains locked until the current lesson's checks pass. Showing the solution changes the file but does not bypass Check.
Billing controls are missing
Manage billing appears for an account with a paid subscription. Free accounts see View plans instead. If the plan card shows Past due or Paused, open the customer portal and follow its payment instructions. If the portal cannot open after retrying, contact support from the email used for the Katabench account.
Still stuck?
If something still looks wrong, email support@katabench.com with the puzzle, path, course, Lab, or lesson name; the action you selected; the exact message; and whether a retry changed it. For billing, write from the address used by your Katabench account. Never send a password or full payment-card number.