3Alan / DocsMind

🤖 DocsMind allows you to chat with your docs and summarize your docs, support pdf, md.
https://docs-mind.alanwang.site
GNU Affero General Public License v3.0
176 stars 75 forks source link

404 error #5

Closed beralc closed 1 year ago

beralc commented 1 year ago

I'm getting this error: {"message":"404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."}

image

What could the issue be?

3Alan commented 1 year ago

As the information you provided is limited, I cannot analyze the cause of the error. Please provide the log located at api-src/app.log and the client error (browser console) so that I can better understand the issue.

3Alan commented 1 year ago

What is the URL you requested that resulted in a 404 error? Have you followed the steps in the README to start both the frontend and backend programs? Can you provide a screen recording?

beralc commented 1 year ago

Thanks so much for helping. When I type yarn dev, I get the localhost version which works, but I can't upload files. When I try to install the backend, this is what happens: https://youtu.be/HYaljBcHomc

Maybe I'm doing something wrong?

3Alan commented 1 year ago

Access http://127.0.0.1:5173/ instead of http://127.0.0.1:5000/. 5000 is the entrance of the backend service.

beralc commented 1 year ago

I get the same 404 error

image
3Alan commented 1 year ago

I'm not sure why your backend service has so many ports like 5173 and 5000. It didn't seem like a problem with the project at that time. Maybe you can try killing all the ports and restarting to see if it helps.

beralc commented 1 year ago

I killed all the ports and used port 5000, still getting the 404

image
beralc commented 1 year ago

I don't know if what causing the issue is that I haven't put a vite_services_url in the env file. But I don't know where to get it from. Could that be causing the issue?

3Alan commented 1 year ago

Access http://127.0.0.1:5173/ instead of http://127.0.0.1:5000/. 5000 is the entrance of the backend service.

No, vite_services_url is only used in production environment, and it seems that you are currently running it locally. The 404 error when accessing 5000 indicates that your backend service has been successfully started, but you cannot access it directly through the browser.

Perhaps you are not very familiar with how the front-end and back-end work together. Firstly, 5000 is a back-end service that you cannot access directly. It only provides services to the UI. As a user, you need to use the app (5173) through the UI.

beralc commented 1 year ago

Thanks for your help. I still don't get how I should access the UI. I tried to access :5173 but I get a "site can't be reached" error. I don't understand what I'm doing wrong.

3Alan commented 1 year ago

Did you execute "yarn dev"?

beralc commented 1 year ago

I did, but it doesn't let me upload files.

3Alan commented 1 year ago

Can you see the default markdown and ask questions?

beralc commented 1 year ago

No. it looks like this:

image
3Alan commented 1 year ago

Open the browser console and refresh the page to see what errors there are

beralc commented 1 year ago
image image
3Alan commented 1 year ago

visit page in an Incognito window and view console errors

beralc commented 1 year ago
image image
beralc commented 1 year ago

I restarted everything, and now I can see the default document, and chat with it. But I can't upload my own

image
3Alan commented 1 year ago

Please provide the error message that occurred when you uploaded.

beralc commented 1 year ago

There is no error message. Nothing happens when i drag a file, and when it won't let me select a file when i click on "Click or drag file to this area to upload" I'm attaching a screenshot of the console.

image
3Alan commented 1 year ago

Is the file you uploaded a markdown file? Currently, only .md files are supported

beralc commented 1 year ago

This happens when i try to upload a text I converted to MD

image

And this when I upload some other md files.

image
3Alan commented 1 year ago

The first error is a known bug caused by the lack of a title in your file. Please try adding a title to your .md file as shown below:

# your md title

I will fix the second error as soon as possible.

beralc commented 1 year ago

Thanks so much for your help. It's greatly appreciated.

3Alan commented 1 year ago

The latest code has fixed the second error. https://github.com/3Alan/chat-markdown/issues/6#issue-1683061337

beralc commented 1 year ago

I got the latest code, and I'm getting the other error again, and I can't see the default content:

image
3Alan commented 1 year ago

I don't know why you keep encountering this issue. Perhaps your port 5000 is being used by another application, so you can only try changing it to another port. Use "flask run --reload --port=8080" to run the backend on the new port, and then replace all instances of ":5000" in the code globally with the new port.

beralc commented 1 year ago

it randomly started working. Is there an issue with the .env file? It doesn't seem to read it. I put it in the main folder.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 3 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 3 days with no activity.