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

Development server for the web interface is stuck on a loading screen. #1053

Open
12 tasks
SunnyWan59 opened this issue Jan 9, 2025 · 4 comments
Open
12 tasks
Labels
fix Fix something that isn't working as expected

Comments

@SunnyWan59
Copy link

Describe the bug

When I try and run the development server, I am getting the error ECONNREFUSED. When I connect to localhost:3000, I am only met with a loading screen.

To Reproduce

Steps to reproduce the behavior:

I ran

yarn install
yarn dev

Screenshots

If applicable, add screenshots to help explain your problem.
Screenshot 2025-01-09 at 2 02 34 AM

Platform

  • Server:
    • Cloud-Hosted (https://app.khoj.dev)
    • Self-Hosted Docker
    • Self-Hosted Python package
    • Self-Hosted source code
  • Client:
    • Obsidian
    • Emacs
    • Desktop app
    • [ X] Web browser
    • WhatsApp
  • OS:
    • Windows
    • [ X] macOS
    • Linux
    • Android
    • iOS

If self-hosted

  • Server Version [e.g. 1.0.1]:

Additional context

Here the erorr message in my terminal:

(node:51389) [DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead.
(Use node --trace-deprecation ... to show where the warning was created)
Failed to proxy http://localhost:42110/static/assets/icons/khoj_lantern.ico AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
Failed to proxy http://localhost:42110/api/settings?detailed=true AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
Failed to proxy http://localhost:42110/api/v1/user AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
Failed to proxy http://localhost:42110/api/chat/options AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
Failed to proxy http://localhost:42110/static/khoj.webmanifest AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
Failed to proxy http://localhost:42110/api/chat/options AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
✓ Compiled /_error in 412ms (10186 modules)
Failed to proxy http://localhost:42110/static/khoj.webmanifest AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
Failed to proxy http://localhost:42110/static/assets/icons/khoj_lantern.ico AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}
AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 42110
},
Error: connect ECONNREFUSED 127.0.0.1:42110
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 42110
}
]
}

@SunnyWan59 SunnyWan59 added the fix Fix something that isn't working as expected label Jan 9, 2025
@sabaimran
Copy link
Member

sabaimran commented Jan 9, 2025

Hey @SunnyWan59 ! It looks like your front end node server is running, but you'll also have to start the backend khoj server to get it going end to end.

See the instructions here -- https://docs.khoj.dev/contributing/development/

If you're just making frontend changes, you can use Khoj on docker as your backend as well.

@LumenYoung
Copy link

LumenYoung commented Jan 9, 2025

Same problem here when I'm trying to run the khoj's docker compose with either the cloud or the normal one. It seems I can get the following error from the console of the loading web:

image

You can check the problem with my domain k.lumeny.io as well. In my case everything inside the compose are running correctly. Their log looks healthy and no error message every shows in the console

@SunnyWan59
Copy link
Author

Hey @SunnyWan59 ! It looks like your front end node server is running, but you'll also have to start the backend khoj server to get it going end to end.

See the instructions here -- https://docs.khoj.dev/contributing/development/

If you're just making frontend changes, you can use Khoj on docker as your backend as well.

Thanks!

@debanjum
Copy link
Member

Hey @LumenYoung, your issue maybe different from the original issue. Can you share more details of your setup? For example your (redacted) docker-compose.yml file.

The CSP error is due to security restrictions on where resources from where content can be loaded. You may not need to set KHOJ_DOMAIN to your domain name (k.lumeny.io) in your docker-compose.yml, if you haven't done that already

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

4 participants