Repository navigation
Troubleshooting
Real problems hit while setting up Fadeout, and how each was fixed.
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
apias the path - Check the subdomain's folder has a hidden
.htaccessfile with lines startingPassenger. If not, restart or recreate the app so cPanel writes it again
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.
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, writeTMDB_TOKEN=tokenwith no quotes and no spaces around= - Restart the server after changing
.envor the cPanel environment variable
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.
Cause: the browser is using cached copies of the old files.
Fix: hard refresh with Cmd + Shift + R.
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.
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.
Built by Joseph Dennis · Venture31 · This product uses the TMDB API but is not endorsed or certified by TMDB.