Root CauseWhat broke, why, and the fix.

The timeout did not mean the text was missing

· browser automation, debugging, web forms
ⓘ Operated by TechAthletes. Every post here is a bug we hit in our own work — symptom, root cause, fix. Nothing is sponsored and we are not paid to mention any tool.

What we hit

While filling a submission form with browser automation, we ran into related problems in the description editor and the keyword field. The description command timed out even though the text had finished entering. The keyword field accepted rapid entries but joined separate keywords into a single incorrect chip.

In both cases the page's actual state was a more reliable source of truth than the sequence of commands we had sent. In the description editor, the automation reported a timeout while the requested text was already present. In the keyword field, issuing separate entries did not keep the resulting keywords separate.

The description editor was a WYSIWYG field, with support for bold, italic, links, bullets, and numbered lists. It did not support Markdown headings, tables, or code blocks. We converted the tables and code blocks in our listing text to plain text before entering it.

That addressed the content format. It did not address how the editor handled the input.

What we assumed

Our input approach depended on the automation and the page keeping pace with each other. For the description, we sent the long text through the automation’s type command. For keywords, we sent type followed by Return, repeatedly.

The assumption to correct was that the command result could stand in for the field result. A timeout looks like a reason to send the text again. Separate keyword-entry commands look like they should produce separate keyword chips.

Neither interpretation was reliable here. Before deciding what to do next, we needed to distinguish what the automation reported from what the page contained. That distinction mattered because another input command would act on the field in its current state, including any text that had already arrived.

What was actually true

We sent 2,400 characters to the description editor with type. The editor was heavy, and CDP timed out after 30 seconds. Despite that timeout, the input itself had completed.

The timeout therefore did not establish that the description was missing. Resending the text in response to the error would produce duplicate input. The relevant check was the visible editor: had the text gone in? In this case, it had.

The keyword field exposed the same need to inspect the result, through a different failure. When we sent type and Return in rapid succession, the page’s React state could not keep up. The separate keywords variants and urp became the combined chip variantsurp.

That was a concrete mismatch between our inputs and the page’s output. We had supplied separate keywords, but the field had produced a joined value. Looking only at the intended sequence would miss the incorrect chip.

The description and keyword problems were related, but their immediate causes called for different changes. The description needed a different way to deliver the long text. The keyword field needed time between entries.

The fix

For the description, we put the text on the clipboard with pbcopy and pasted it with cmd+v. The paste went in immediately and preserved the line breaks.

This gave us a working way to enter the prepared plain text. It also left the verification rule intact: a timeout from the earlier typing attempt was a reason to inspect the editor before sending anything again. Switching input methods did not make duplicate input a useful recovery step.

For the keywords, we paused for three seconds before and after each entry. With those pauses, all 14 keywords landed correctly.

The check was the resulting set of chips. Separate commands were our intended input; separate, correct chips were the result we needed to see. The pauses allowed the page’s state to keep up with the entries.

The lesson

We learned to read the resulting page state before retrying browser automation. A timeout tells us the automation gave up; it does not tell us the requested work did not happen. We need to check both whether input arrived and whether the page represented it correctly before choosing the next action.

Root Cause is written while shipping small software products — you can see them at TechAthletes.

All posts →

Get new posts by email

We email you only when a new post goes up here. You can unsubscribe at any time.

Privacy policy