wapps Posted 4 hours ago Posted 4 hours ago I have a web project in development. It connects to a hosted database and a hosted email. At home I use WAMP and VS Code Terminal node server.js for testing. At home the project works: connects to the database and sends email. I opened a HelioHost, Johnny server account to test the project online, because Helio supports node.js, and is free. In my first attempt I got the connection to the database to work, but not the email. I reset the account to try to start again. Now the email works but not the database connection. When I open the website, https://wapps.helioho.st, using Chrome incognito browser, and try to I get the following errors: displayed on the page: Unexpected token '<', "<!DOCTYPE "... is not valid JSON; console: Failed to load resource: the server responded with a status of 404 (Not Found) users/login:1. I am not getting any log error messages. The node version I am using at home is 18.20.5 and on Helio 18.20.8. The only changes I knowingly made between the first attempt and the reset was code affecting the email function (which is working now after the reset). I do have an .env file in the root directory, which I find is needed to make the email function work. I eliminated it to try the database connection and got the same errors. I have double, tripled and quadruple checked the environmental variables I inputted into the Plesk Node.js page. “I work a lot with Grok AI to resolve issues. This has us both stumped. I gave Grok the code for the following files: login.html, server.js and .env (to verify the environmental variables). Grok’s responses: 404 Not Found for /users/login: On HelioHost, a 404 error can also occur if the Node.js application hasn't been properly deployed, if the Apache server isn't routing requests to your Node.js app, or if there's an issue with the application setup in Plesk. Unexpected token '<', "<!DOCTYPE "... is not valid JSON: This error occurs because the client expects a JSON response from /users/login, but the server is returning an HTML page (likely a Plesk 404 error page or a default page). This happens when the Node.js app isn't handling the request, and Apache/Plesk serves a fallback HTML page. No Log Error Messages: The absence of log errors could mean that the Node.js app isn't even processing the request (e.g., Apache isn't forwarding requests to the app), or the logging middleware (morganMiddleware or logger) isn't capturing errors correctly.” I wondering if my service on Helio is functioning. PLEASE, ANY HELP WOULD BE MUCH APPRECIATED. Otherwise I will try to reset and try again. Quote
KazVee Posted 2 hours ago Posted 2 hours ago Request has also been sent via email but it's a lot more readable in this thread here. Also more details provided in the user's 2nd email here. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.