Guides
Short fixes for problems I have hit, each checked against the versions it names.
Find a fix
Narrow the list: pick a technology, then a version, then the error you see. Pick any to skip a step. Or type after the cursor, paste an error, or try help.
Nothing here matches. cd / goes back to every guide.
Type to narrow the choices and the guides, or paste an error. Tab completes, ↑ ↓ choose, Enter opens, Backspace on an empty line goes back a step, Esc clears. Commands: cd .., cd /, cd <name>, clear and help.
Error or symptom
- a form submits fine but does not clear or reset afterwards
- a javascript: link in the report is clickable
- a pipeline ending in grep -q exits with status 141 under set -o pipefail
- a remote check reports a regular file as not a file, or a directory as not a directory
- a shell assertion fails even though the text it searches for is present
- could not find `net` in `actix_rt`
- error occurred while decoding column "total_visits": mismatched types; Rust type `i64` (as SQL type `INT8`) is not compatible with SQL type `NUMERIC`
- Evaluating a string as JavaScript violates the following Content Security Policy directive because 'unsafe-eval' is not an allowed source of script: script-src 'self'
- scraped text renders as HTML instead of text
- stat -c '%F' prints normal fil or katalog instead of regular file or directory
- summary figures read 0 while the table underneath has real rows
- unresolved import `actix_rt::net`
- any
Matching guides
6 of 6
-
grep -q exits 141 under set -o pipefail, even when it matches
Under set -o pipefail, piping a large payload into grep -q can fail the whole pipeline even though grep found what it was looking for. Swapping the pipe for a here string fixes it.
-
htmx hx-on fails: unsafe-eval is not an allowed source of script
Under a Content-Security-Policy with script-src 'self', htmx compiles hx-on attributes into a function at runtime and the browser refuses to run it. Moving the same code into a script file as an event listener fixes it.
-
sqlx: Rust type i64 is not compatible with SQL type NUMERIC
A SUM() over a BIGINT column comes back as NUMERIC in PostgreSQL, and sqlx refuses to decode that into an i64 field. Casting the sum to BIGINT in the query fixes it.
-
stat -c %F reports the wrong file type under a non-English locale
GNU stat translates its %F file-type field, so code that matches the English words regular file or directory misreads every path once the locale is, say, Swedish. Pinning LC_ALL=C on the stat call fixes it.
-
cargo build fails but cargo test passes: could not find net in actix_rt
After a dependency bump, a plain cargo build stopped with could not find net in actix_rt while cargo test kept passing. actix-server 2.8.0 never asks for the actix-rt features it needs, and updating it to 2.9.5, which does, fixes the build.
-
Scraped text runs as HTML in a generated report
My web scraper wrote scraped titles and links straight into its HTML report, so a page could slip its own markup or a javascript: link into the file. One shared escape function, plus a rule that only http and https addresses become links, fixed it.