Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Response.json: Body has already been consumed #1044

Open
ProjectMoon opened this issue Jan 8, 2025 · 0 comments
Open

[FIX] Response.json: Body has already been consumed #1044

ProjectMoon opened this issue Jan 8, 2025 · 0 comments
Labels
fix Fix something that isn't working as expected

Comments

@ProjectMoon
Copy link

ProjectMoon commented Jan 8, 2025

Describe the bug

Seems to be related to or caused by #1035. While working through a response, the web app will print out Uncaught (in promise) TypeError: Response.json: Body has already been consumed.. Then it just sits there, and nothing more happens. The spinner just keeps spinning, and the thought process does not advance, nor does it create a response.

To Reproduce

It seems to happen when reading pages via the free Jina API, and those pages taking a long time to be processed. The server logs are something like this (I've removed a bunch of info logs about page loads and context stuffing warnings):

[09:04:23.650689] DEBUG    khoj.processor.tools.online_search: Extracting relevant information from web page at 'https://arxiv.org/abs/2207.11823' took: 31.422 seconds                                 
[09:04:23.653590] INFO     khoj.processor.tools.online_search: Reading web page with Jina at 'https://www.sciencetimes.com/articles/60200/20250107/plutos-largest-moon-formed-kiss-capture-colision-scientists-discover.htm' took: 32.110 seconds                                                           
[09:05:09.848899] DEBUG    khoj.processor.tools.online_search: Extracting relevant information from web page at 'https://www.sciencetimes.com/articles/60200/20250107/plutos-largest-moon-formed-kiss-capture-collision-scientists-discover.htm' took: 46.194 seconds                  
[09:05:31.629136] INFO     khoj.processor.tools.online_search: Reading web page with Jina at 'https://www.astronomy.com/science/astronomers-have-a-new-theory-for-why-uranus-spins-on-its-side/' took: 100.085 seconds                                              

Screenshots

The UI:

image

Browser console:

image

Platform

  • Server: Self-Hosted Docker
  • Client: WebApp
  • OS: Linux

If self-hosted

  • Server Version [e.g. 1.0.1]: 1.33.2
  • Anonymous Mode: Disabled
  • Search API: Searxng
  • Web scraper: Jina free (no API key set)

Additional context

This happens whether or not research mode is enabled. Other information:

  • Using ollama 0.5.4
  • Quinn 2.5 14b instruct with a 30k context size
  • AMD RX 6800 XT, with 96% of the model loaded into VRAM by ollama and 4% on the CPU.
  • It runs fine up until it starts extracting content from webpages with Jina, and then somewhere along the way the API call breaks down in the client.
@ProjectMoon ProjectMoon added the fix Fix something that isn't working as expected label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix something that isn't working as expected
Projects
None yet
Development

No branches or pull requests

1 participant