Mintplex-Labs / anything-llm

The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, and more.
https://anythingllm.com
MIT License
22.7k stars 2.29k forks source link

[BUG]: GitHub Repo Fetch Failed message appears but then proceeds without notification #2243

Open Sch0field9 opened 1 week ago

Sch0field9 commented 1 week ago

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

When fetching a specific Github repo it hangs a long time after Access token set! Recursive loading enabled! after a minute or two the message "Fetch failed" appears. Neither the GUI or Logs indicate any further processes. However after doing nothing for another minute the fetch continues and downloads the files from the repo. This does not happen on all repos

[collector] info: [Github Loader]: Access token set! Recursive loading enabled! [backend] info: [CollectorApi] fetch failed [backend] info: [TELEMETRY SENT] {"event":"extension_invoked","distinctId":"372a5230-9bfd-4c05-a653-ae4d165a0c67","properties":{"type":"github_repo","runtime":"desktop"}} [collector] info: [Github Loader]: Found 3952 source files. Saving...

Are there known steps to reproduce?

No response

timothycarambat commented 1 week ago

Is this repo public for repro?

Additionally, is there any more content to the logs or does is simply only output [backend] info: [CollectorApi] fetch failed with nothing else in that line?

Given the source have nearly 4K files, I am willing to bet this is related to downloading 4K files via the PAT and it hitting rate limits.

Sch0field9 commented 1 week ago

Those are all the logs I have. I couldn't figure out how to change the log level. The repo I had the troubles with was Github home-assistant/core:master -- (Not sure if it was core)

However, I had something similar happen when I tried it with the AnythinLLM repo. It startet way faster, but it somewhere in the middle was a fetch failed log entry, only one and it continued downloading. The Frontend had the same behaviour tough. Message came up fetch failed and no other indications that it is still downloading files.

I also suspect it has to do with large repos. My bug reports focus is more about that there is no indication to the user, less that why exactly it failed. And possibly a feature request to be able to change the log level? Since there is also no indication in the info logs, that its still processing.

timothycarambat commented 1 week ago

Adding verbose logging to the tool at least so the process can be seen in logs even if the operator/user cannot see it in UI currently. Did pull in AnythingLLM repo without errors at this time