NARKOZ/hacker-scripts · info
Not Found
Error message
Not Found
What it means
Express catch-all route handler coffeeApp.get('/*') responds with HTTP 404 (Not Found) for every GET path that is not CALLBACK_ENDPOINT. The server intentionally exposes exactly one meaningful route; it is registered after the callback route so Express matching order gives the callback precedence. There is no index or landing page, so the root path '/' also yields 404.
Source
Thrown at nodejs/fucking_coffee_yo_server.js:74
// Wait for 24s
setTimeout(function() {
// Pour Coffee!
con.exec('sys pour', function(error, res) {
con.end();
});
}, 24000);
});
});
});
con.connect({host: coffee_machine_ip});
}
});
// Not Callback endpoint
coffeeApp.get('/*', function (req, res) {
res.sendStatus(404);
});
var coffeeServer = coffeeApp.listen(PORT, CALLBACK_URL, function() {
console.log('Coffee Server listening at %s:%s',
CALLBACK_URL, PORT);
console.log('\nYo Callback URL: %s:%s/%s',
CALLBACK_URL, PORT, CALLBACK_ENDPOINT);
});
});
View on GitHub (pinned to b14a0a89bd)
Solutions
- Request the exact CALLBACK_ENDPOINT path, e.g. http://host:port/<CALLBACK_ENDPOINT> (the startup log already prints this value).
- If you want a human-readable landing page, add an explicit GET '/' handler before the catch-all.
- Check for a trailing-slash or case mismatch between CALLBACK_ENDPOINT and the path the client requests.
- Confirm the Yo provider's configured callback URL still matches the current CALLBACK_ENDPOINT value.
Example fix
// before
coffeeApp.get('/*', function (req, res) {
res.sendStatus(404);
});
// after - informative root, keep catch-all last
coffeeApp.get('/', function (req, res) {
res.send('Coffee server up. Callback at ' + CALLBACK_ENDPOINT);
});
coffeeApp.get('/*', function (req, res) {
res.sendStatus(404);
}); Defensive patterns
Strategy: validation
Validate before calling
// Client-side: confirm the path matches CALLBACK_ENDPOINT before requesting
function buildCallbackUrl(base, endpoint) {
if (!endpoint || endpoint.charAt(0) !== '/') {
throw new Error('CALLBACK_ENDPOINT must start with /');
}
return base + endpoint;
}
// fetch(buildCallbackUrl(HOST, CALLBACK_ENDPOINT)) Prevention
- Treat the startup log line (it prints the full callback URL) as the source of truth for the path.
- Add an explicit GET '/' handler if humans will browse the host.
- After changing CALLBACK_ENDPOINT, update the Yo provider's saved callback URL in the same step.
When it happens
Trigger: A GET request to the server root '/' or to any path other than CALLBACK_ENDPOINT. Hit when an operator opens http://host:port/ in a browser without appending the callback path, or when CALLBACK_ENDPOINT was changed but clients (or the Yo provider) still request the old path.
Common situations: Browsing to the bare host:port to see if the server is up. CALLBACK_ENDPOINT renamed in code but the Yo provider's saved callback still points at the previous path. A web crawler or security scanner enumerating paths on the host.
Related errors
AI-assisted analysis of NARKOZ/hacker-scripts@b14a0a89bd (2026-08-13).
Data as JSON: /api/errors/c630b5ec20221916.
Report an issue: GitHub.