Can a flatpak connect by network to itself?

I’m trying to make a flatpak for an application which is 2 parts, one part is a server and one part is an electron app.

The server part, has two binaries, binary (1) that listens to port 8000 and binary (2) that manages how binary (1) starts and what host or port it listens to, and does some other things when you run it from the terminal.The problem is when I start the server by running binary (2) I get the following error:

DEBUG: Starting server listening at localhost:8000
DEBUG: Waiting for server process to start...
DEBUG: Will check health at: http://127.0.0.1:8000/api/v1/health
DEBUG: Health check attempt 1/5...
DEBUG: Making HTTP request...
DEBUG: Health check failed: Failed to connect to server at 127.0.0.1:8000

I’m trying to understand if this is normal, or I’m doing something wrong with the flatpak manifest.

I don’t think it’s a network issue, I’ve probably located the problem which has to do with building in /app insated of /usr. I will close this when I verify a fix in the code!

edit: answer for everyone wondering, yes, flatpak can connect to itself.

This topic was automatically closed after 44 hours. New replies are no longer allowed.