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] CORS issue #970

Open
12 tasks
huachuman opened this issue Nov 10, 2024 · 2 comments
Open
12 tasks

[FIX] CORS issue #970

huachuman opened this issue Nov 10, 2024 · 2 comments
Labels
fix Fix something that isn't working as expected

Comments

@huachuman
Copy link

huachuman commented Nov 10, 2024

Describe the bug

Access to fetch at 'https://app.khoj.dev/api/content?client=obsidian' from origin 'app://obsidian.md' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
app.khoj.dev/api/content?client=obsidian:1

  Failed to load resource: net::ERR_FAILED

plugin:khoj:1437

 Uncaught (in promise) TypeError: Failed to fetch

at updateContentIndex (plugin:khoj:1091:28)
at async eval (plugin:khoj:1432:39)

To Reproduce

do a manual sync

Screenshots

image

Platform

  • Server:
    • Cloud-Hosted (https://app.khoj.dev)
    • Self-Hosted Docker
    • Self-Hosted Python package
    • Self-Hosted source code
    • [ x ] Not sure. I also have the khoj app but gave up on it because it doesn't seem to work well. but this bug is about obsidian, not the app version.
  • Client:
    • [ x ] Obsidian
    • Emacs
    • Desktop app
    • Web browser
    • WhatsApp
  • OS:
    • [ x ] Windows
    • macOS
    • Linux
    • Android
    • iOS

If self-hosted

  • Server Version [e.g. 1.0.1]:

Additional context

Add any other context about the problem here.

@huachuman huachuman added the fix Fix something that isn't working as expected label Nov 10, 2024
@sabaimran
Copy link
Member

Hi @huachuman , where did you see the errors? Are they in the developer console, did you get a notification, or somewhere else? Can you also make sure you're on the latest obsidian plugin? To upgrade:

1. Open Community plugins tab in Obsidian settings
2. Click the Check for updates button
3. Click the Update button next to Khoj, if available

I'm not able to reproduce the error, so trying to understand how you might be encountering it.

Can you check in https://app.khoj.dev/settings > Files > Manage whether you have any data indexed?

@huachuman
Copy link
Author

huachuman commented Nov 11, 2024

So that error I get in the Obsidian console.

I can confirm that I'm on the latest version of the plugin (updated 9 days ago)

The only things I see in the files on https://app.khoj.dev/settings is a single PDF I uploaded a while ago for testing. I don't see anything in my obsidian vault there. I have also confirmed that the API key matches the one I have in Obsidian.

Could it have something to do with this?
image

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

2 participants