langflow icon indicating copy to clipboard operation
langflow copied to clipboard

frontend ws port, The parameter is hard coded?

Open av8dtop opened this issue 2 years ago • 12 comments

use docker-compser.yml frontend > port > 5999:3000

error : 192.168.1.103:3000/ws' failed: WebSocketClient @ bundle.js:12

websocket port, The parameter is hard coded?

av8dtop avatar May 14 '23 03:05 av8dtop

websocket port is selected like this

        process.env.NODE_ENV === "development"
          ? `ws://localhost:7860/chat/${id.current}`
          : `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.host
          }/chat/${id.current}`;

you need to check if your backend is hosted right in your machine, so this code can find the websocket

anovazzi1 avatar May 15 '23 21:05 anovazzi1

#308

av8dtop avatar May 16 '23 12:05 av8dtop

Hey, @av8dtop. The issue you mentioned seems to be fixed in dev. Could you try it out by running make dev build=1?

In development, we start frontend and backend separately so we need to point the frontend app to a specific URL. When serving the static files we can get the window.location.host.

ogabrielluiz avatar May 16 '23 12:05 ogabrielluiz

@ogabrielluiz UI IS OK, but only bug by ws, WebSocket connection to 'ws://localhost:7860/chat/a18bc694-4e43-41a3-b09e-e04c1af06e9b' failed: connectWS @ index.tsx:176

There was an error on web connection, please: Refresh the page Use a new flow tab Check if the backend is up

av8dtop avatar May 16 '23 12:05 av8dtop

Could you try removing the tab and adding a new one?

Also, how are you running the application?

ogabrielluiz avatar May 16 '23 13:05 ogabrielluiz

@ogabrielluiz YES vmware -> ubuntu -> docker

av8dtop avatar May 16 '23 13:05 av8dtop

I currently use docker-compose.yml simply, can you help me or are there any other ways that will not cause WS errors?

av8dtop avatar May 27 '23 05:05 av8dtop

probably there is an error related to the docker network system and the VMware, can you try running it not inside a VMware or outside the docker?

anovazzi1 avatar Jun 01 '23 01:06 anovazzi1

I'm experiencing the same issue when running from docker from a server in my local network. When trying to interact with the platform, the following errors show in the logs:

2023-06-10 15_26_48-LangFlow

The containers were created via: clone https://github.com/logspace-ai/langflow.git cd langflow/ docker-compose up --build -d

It seem like the "localhost" address is incorrectly being configured by the frontend application. In my case, I believe it should be pointing to the remote server in my local network.

Best Regards

iguy0 avatar Jun 10 '23 19:06 iguy0

hi, I'v done the debug on this issues, the location of it to fix follow Frontend/src/models/chatmodel/index.tsx Line 115

Busy on every, may someone do it and merge LOL

qq1499412503 avatar Jul 02 '23 09:07 qq1499412503

Thank u

av8dtop avatar Jul 02 '23 16:07 av8dtop

@ogabrielluiz merge thank u

av8dtop avatar Jul 03 '23 14:07 av8dtop

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 17 '23 15:08 stale[bot]