microsoft / chat-copilot

MIT License
2.07k stars 704 forks source link

Cannot send data due to lost connection or server timeout. Try refreshing this page to restart the connection. #312

Closed murdockcrc closed 8 months ago

murdockcrc commented 1 year ago

Describe the bug I am running the app on my local host. I created a devcontainer definition and run the app from there.

I run scripts/start.sh and the app starts well, without issues or errors.

However, right when the webapp loads, I see this error immediately:

Cannot send data due to lost connection or server timeout. Try refreshing this page to restart the connection.

I can type a prompt in the text box and send it, but then the app gets stuck here:

image

If I refresh the browser window, I can see a response from the model in the UI. It seems like the app is unable to handle the process of getting a response from the model as it is being generated. I do not see any errors on the frontend or backend app console messages.

On the browser's console, I only see this warning, and no other errors:

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Ref which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node

Expected behavior The app is able to render the response generated by AOAI

Platform

marcelojsilva commented 1 year ago

I get the exactly same error. Platform:

Someone can help?

asabbott commented 1 year ago

I was receiving the same error when using devcontainers within vscode until I setup a self-signed SSL certificate for localhost and switched ports of both webapp and webapi to run as HTTPS.

dehoward commented 1 year ago

@murdockcrc @marcelojsilva can you please try the suggestion above to see if it resolves your issue?

glennelliott commented 1 year ago

I'm getting this exact same issue on Mac. I tried asabbott's suggestion and I'm now using HTTPS, but the issue persists, no change.

OS: macOS 13.4.1 Chip: M1 IDE: VSCode

teresaqhoang commented 1 year ago

Hey @murdockcrc @marcelojsilva @glennelliott, apologies for the delayed reply - our team doesn't have much bandwidth for Mac/Linux testing. @matthewbolanos and I will look into testing CC with dev containers more closely next week.

Some questions I had:

tagging @dehoward for transparency since he's on our support rotation this week - can you try testing this with vscode dev containers on a windows machine?

glennelliott commented 1 year ago

Hey Teresa ... to answer your bullets in order:

I ended up deploying it all to Azure and working with it there, so as to bypass the local config challenges.

evchaki commented 8 months ago

please try this on the latest build to see if it is still happening.