Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoints not working as expected - Intermitent 500 errors + ghost endpoints #1641

Open
CRBroughton opened this issue Dec 10, 2024 · 5 comments

Comments

@CRBroughton
Copy link

CRBroughton commented Dec 10, 2024

Hi there, just been playing around with Encore as I'm looking for a new back-end solution. Started with your built in hello world example and copied over the endpoint to create a new one in the same hello.ts service file, but I'm getting the following issue:

Screencast.from.10-12-24.08.47.48.webm

Seemingly any endpoint I create can cause this behaviour. I've also noticed that endpoints I create, and then delete will sometimes still appear in the list of endpoints despite no longer existing. Just started using Encore today so presumably I'm on the latest version.

Edit: The part about the endpoints randomly returning 500's only seems to happen through the Encore UI. When I restart my PC the issue disappears, which to me suggests that there's some sort of background service that isn't properly restarting or taking into account the new endpoints / code generation issues.

Edit II: Can confirm killing the encore processes results in the same proper behaviour; The endpoints now properly return 200's and are no longer flaky (seems to be the daemon process that's left running in the background, maybe this should reboot on code change?). Obviously isn't a good solution to have to manually kill the process.

Bit of a side note (something I just noticed) but after closing down the running application, the front end seems to continue to believe the application is still running (the green dot in the top-left never changes, has this an active Websocket or SSE connection?).

Ghost endpoints video:

Screencast.from.10-12-24.12.34.10.webm
@bombitmanbomb
Copy link

bombitmanbomb commented Dec 24, 2024

I have also been consistently getting this issue.

When you CTRL+C kill the shell the process remains until manually terminated 100% of the time.

Windows 10 Pro N - 22H2 build 19045.5247

@bombitmanbomb
Copy link

it would appear that the node instances are also left behind
image

@marcuskohlberg
Copy link
Member

Thanks for reporting, we'll take a look at this issue!

@fredr
Copy link
Member

fredr commented Jan 13, 2025

I've been trying to reproduce this, but without any success. Do you also have lots of node.exe processes left @CRBroughton ?

Could you in a separate terminal run encore daemon -f. That forces the daemon to run in the foreground and output all logs in the terminal, and then reproduce the problem, and post the logs here or in a gist if there are many.

Also, what node version (run node --version) and what encore version (run encore version) are you running? You can update to the latest encore version by running encore version update

@CRBroughton
Copy link
Author

Apologies for not replying yet, work is busy; I can attempt to reproduce this again tomorrow (with any updates to encore that have come out since then) and get back to you, as I'm fairly certain this was a reoccurring issue when I last tried it and I really want encore to be a viable solution to my next set of projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants