Replit goes Hmmmm after tests

I hosted my github repo in replit and added the dot env file.

It’s working locally but in replit it only worked for 1 sec and then it goes Hmm

Hmmmm… We Couldn’t Reach Your Repl

Make sure your repl has a port open and is ready to receive HTTP traffic.

Any idea where did i mess up? Also I got slightly annoyed to reclone my repo after pushing new update to do the FCC test, any other method?

And i checked both the consoles. Got nothing

Nvm, it’s working after i cleared my database and made a minor update to my test? why tho

Hello there,

Would you mind sharing what you changed? I realise you said you checked the Replit console, but that is usually the best/only way to determine why the app crashes.

There’s nothing in the console except the normal

Listening on port 3007
Running Tests...

  Functional Tests
    ✓ Create an issue with every field: POST request to /api/issues/{project}
    ✓ Create an issue with only required fields: POST request to /api/issues/{project}
    ✓ Create an issue with missing required fields: POST request to /api/issues/{project}
    ✓ View issues on a project: GET request to /api/issues/{project}
    ✓ View issues on a project with one filter: GET request to /api/issues/{project}
    ✓ View issues on a project with multiple filters: GET request to /api/issues/{project}
    ✓ Update one field on an issue: PUT request to /api/issues/{project}
    ✓ Update multiple fields on an issue: PUT request to /api/issues/{project}
    ✓ Update an issue with missing _id: PUT request to /api/issues/{project}
    ✓ Update an issue with no fields to update: PUT request to /api/issues/{project}
    ✓ Update an issue with an invalid _id: PUT request to /api/issues/{project}
    ✓ Delete an issue: DELETE request to /api/issues/{project}
    ✓ Delete an issue with an invalid _id: DELETE request to /api/issues/{project}
    ✓ Delete an issue with missing _id: DELETE request to /api/issues/{project}

  14 passing (104ms)

This problem appeared when i make any changes to my code. But now i can get it working normally by refreshing my browser and repeat whenever i code anything. Tried using Safari instead of Chrome but it doesn’t solve anything. My other replit repo is working fine including the first project of this curriculum.

Actually i realised later that the problem isn’t solved. We know for sure it triggered because of my functional test, the program worked well without my functional test. But I can’t seem to know where I did wrong.

I’m also stuck with passing the GET, PUT, and DELETE. Only my POST and functional-tests passed the FCC tests. My program works super fine just like the FCC’s! I feel this particular challenge is so hard :smile:. Been thinking about going for the next project and skipping this one but I’m dying to know what is my mistake. Thanks for replying!

Hello again,

I managed to get your app to pass all but one test:

What I changed:

  • Commented out PORT in .env (not sure this did much, but sometimes it causes issue telling Replit where to work)
  • Moved the initial app route logic out of the DB logic:
//Sample front-end
  .get(function (req, res) {
    res.sendFile(process.cwd() + '/views/issue.html');
  //Index page (static HTML)
  .get(function (req, res) {
    res.sendFile(process.cwd() + '/views/index.html');

This was causing the app to hang, and not be able to run tests, and work.

Otherwise, looks like you just need to figure out why it is returning an array with too few elements:

expected [ Array(2) ] to have a length of 3 but got 2

Here are the tests:

Hope this helps

1 Like

Okay, i might want to investigate on this more later.

Hey actually I’ve completed the challenge this morning :laughing: . But sure i will try to fix this too. Probably a problem in the filters.

Thank you very much for your help. I’ve had conversations with some people in the forum that has same problem with me (the hmm after tests). Their solution is reloading the page and quickly run FCC test. I hope replit do something to fix this.

1 Like

Okay so it was because my program doesn’t post issues on new Project. Solved them by using await. I notice there’s no (hmm) anymore, so i guess next time I’ll always place the initial app route outside the DB to be safe on replit. Thanks!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.