Hi, I'm trying to deploy my app to google cloud ru...
# cloud
a
Hi, I'm trying to deploy my app to google cloud run when trying to run the frontend and backend in 2 services, each one of them was built with docker. To connect between the frontend and the backend, i put in the frontend service env vars : NEXT_PUBLIC_AGENT_SERVER_URL AGENT_SERVER_URL they both got the backend service url. My code uses react and python. The backend has agent that can join a conversation if button is getting pressed. the conversations are in rooms. The problem: It's working well locally. And, when running the services in google cloud, the frontend url is working well, but when clicking on the 'add agent' button (inside a room), it gives error : Error adding agent to room: Failed to fetch TypeError: Failed to fetch. However, When i open the URL of the deployed backend , it return "OK". But, i did an endpoint /health that returns 200 status to show that the backend server is alive. But, on production, when trying to access it, it returns 404. locally its working. I don't know if the backend service deployed and running well, or maybe the services aren't connected well to each other. Or maybe there is another problem I'm missing. On the logs of the backend service there is a loop, but maybe it happens because the agent didn't need to join a call:
Copy code
DEFAULT 2025-10-04T18:58:47.447493Z initializing process
DEFAULT 2025-10-04T18:58:57.747503Z 2025-10-04 18:58:57,748 - livekit.agents - INFO - killing process
DEFAULT 2025-10-04T18:58:57.747622Z killing process
DEFAULT 2025-10-04T18:58:58.647543Z 2025-10-04 18:58:57,749 - livekit.agents - ERROR - error initializing process
ERROR 2025-10-04T18:58:58.647595Z Traceback (most recent call last): File "/usr/local/lib/python3.11/asyncio/tasks.py", line 500, in wait_for return fut.result() ^^^^^^^^^^^^ File "/app/.venv/lib/python3.11/site-packages/livekit/agents/ipc/channel.py", line 47, in arecv_message return _read_message(await dplx.recv_bytes(), messages) ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.11/site-packages/livekit/agents/utils/aio/duplex_unix.py", line 35, in recv_bytes len_bytes = await self._reader.readexactly(4) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/streams.py", line 750, in readexactly await self._wait_for_data('readexactly') File "/usr/local/lib/python3.11/asyncio/streams.py", line 543, in _wait_for_data await self._waiter
DEFAULT 2025-10-04T18:58:58.647598Z asyncio.exceptions.CancelledError
DEFAULT 2025-10-04T18:58:58.647602Z The above exception was the direct cause of the following exception:
ERROR 2025-10-04T18:58:58.647615Z Traceback (most recent call last): File "/app/.venv/lib/python3.11/site-packages/livekit/agents/ipc/proc_pool.py", line 167, in _proc_spawn_task await proc.initialize() File "/app/.venv/lib/python3.11/site-packages/livekit/agents/ipc/supervised_proc.py", line 169, in initialize init_res = await asyncio.wait_for( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/tasks.py", line 502, in wait_for raise exceptions.TimeoutError() from exc
DEFAULT 2025-10-04T18:58:58.647618Z TimeoutError
DEFAULT 2025-10-04T18:58:58.848165Z error initializing process
(edited)
@refined-appointment-81829 I really need help with that 🙏