Skip to content

Troubleshooting

archcoder-jd edited this page Sep 30, 2026 · 1 revision

Troubleshooting

Real problems hit while setting up Fadeout, and how each was fixed.

/api/... returns 404 Not Found

Cause: requests aren't reaching the Node.js app. The web server looks for a real folder called api and doesn't find one.

Fix:

  • Check the app exists in cPanel's Node.js screen and that Create was clicked
  • Check its Application URL is the subdomain with api as the path
  • Check the subdomain's folder has a hidden .htaccess file with lines starting Passenger. If not, restart or recreate the app so cPanel writes it again

/api/... returns 503 Service Unavailable

Cause: the app is connected but crashes when it starts.

Fix: open stderr.log in the app's folder (~/fadeout-api/). The last lines show the exact error and line number. Fix it, redeploy, and restart the app.

Errors found this way during setup:

Error in stderr.log Cause Fix
ProcessingInstruction is not defined Editor autocomplete replaced process with ProcessingInstruction Change it back to process.env.TMDB_TOKEN
http is not defined The first line, const http = require("http");, was missing Restore the line

Tip: press Esc to close VS Code's suggestion list before continuing to type. Tab and Enter both accept the highlighted suggestion.

Invalid API key (status_code 7)

Cause: the proxy works, but TMDB rejected the token.

Fix:

  • Use the API Read Access Token (long, starts with eyJ), not the shorter API Key
  • In .env, write TMDB_TOKEN=token with no quotes and no spaces around =
  • Restart the server after changing .env or the cPanel environment variable

API_KEY is not defined in the browser console

Cause: the const API_KEY lines were removed from the front end, but other lines still used API_KEY.

Fix: remove every API_KEY, apiKey and api_key reference from the front-end scripts. The proxy supplies the key, so the browser doesn't need one.

Old errors still showing after a fix

Cause: the browser is using cached copies of the old files.

Fix: hard refresh with Cmd + Shift + R.

zsh: command not found: node

Cause: Node.js isn't installed on the Mac. It's only on the server.

Fix: brew install node, or download the LTS installer from nodejs.org. Close and reopen the terminal afterwards.

Push rejected with 403 "Permission denied to [other account]"

Cause: the Mac's saved GitHub login belongs to a different account than the one that owns the repo.

Fix: push using an SSH shortcut for the right account, or put the username in the address, for example https://archcoder-jd@github.com/archcoder-jd/Fadeout.git, and sign in with a personal access token for that account.

Clone this wiki locally