huggingface / huggingface/chat-ui

Issue with stream API call staying pending, when accessing application via IP address or hostname

Open
#598 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11k
Forks
1.7k
Avg merge
21h 24m
Merged PRs (30d)
56

Description

**HELP NEEDED**
I have added a stack overflow question as well here for details
https://stackoverflow.com/questions/77576081/svelte-issue-with-api-call-staying-pending-when-accessing-application-via-ip-ad

Description:

I have forked the [chat-ui](https://github.com/huggingface/chat-ui) last month on 1st nov (new changes I have **not** incorporated) project and made several changes, including Azure AD integration, OpenAI API compatible serving layer support, and making it more container-friendly. The application works fine on localhost, but when I try to access it via an IP address, I encounter an issue.

Problem:

The backend code provides data as a stream to the frontend using the POST method. On localhost, everything works as expected, but when accessing the application via an IP address, the API call from the network stays pending until it reaches component.close() in the frontend. The issue seems to be related to the stream not being processed properly.

Additional Information:

before Adding component.close() in the stream code the windows machine was not at all returning the response and at the end it was saying promise uncaught

Network requests and responses from the browser's developer tools. Local host starts immediately and waterfall of api start getting response and stream is wring at FE correctly :

With IP it stays in pending state and when final message arrives at that time it writes everything at once

**it is working fine on mac but facing issues in windows chrome**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.