dev-lu / osint_toolkit

A full stack web application that combines many tools and services for security analysts into a single tool.
MIT License
479 stars 81 forks source link

Uncaught runtime errors #12

Closed Bahatte closed 11 months ago

Bahatte commented 11 months ago

Hello... i have a problem and dont know how to solve it... i tried to change docker-compose.yml but it does not work:

version: "3.8" services: backend: build: ./backend container_name: backend ports:

image

dev-lu commented 11 months ago

Please try the following compose file:

version: "3.8"
services:
  backend:
    build: ./backend
    container_name: backend
    ports:
      - "8000:8000"
  frontend:
    build:
      context: ./frontend
      args:
        - BACKEND_URL=http://10.99.199.12:8000  # Backend URL without trailing slash
    container_name: frontend
    ports:
      - "3000:3000"
    stdin_open: true
    tty: true
Bahatte commented 11 months ago

nope still the same error?

dev-lu commented 11 months ago

Please clone the repository again. There was an error when passing the backend URL to the container. It should work now.

Bahatte commented 11 months ago

Hello again. The problem is still the same with a new cloned repository.

ne0x86 commented 11 months ago

Same errors here :(

dev-lu commented 11 months ago

Please try docker compose up --buil to rebuild the images and test again.

suleimanfarouk commented 11 months ago

I just rebuild the images and started the containers but still having the same error.

dev-lu commented 11 months ago

Please have a look into your browser console to see where the frontend is trying to connect to.

ne0x86 commented 11 months ago

xhr.js:220
GET http://localhost:3000/api/apikeys/is_active net::ERR_CONNECTION_REFUSED xhr.js:220
GET http://localhost:3000/api/settings/modules/ net::ERR_CONNECTION_REFUSED 172.20.0.70/:1 Uncaught (in promise)
AxiosError {message: 'Network Error', name: 'AxiosError', code: 'ERR_NETWORK', config: {…}, request: XMLHttpRequest, …} xhr.js:220
GET http://localhost:3000/api/settings/general/ net::ERR_CONNECTION_REFUSED xhr.js:220
GET http://localhost:3000/api/settings/modules/newsfeed/ net::ERR_CONNECTION_REFUSED 172.20.0.70/:1 Uncaught (in promise)
AxiosError {message: 'Network Error', name: 'AxiosError', code: 'ERR_NETWORK', config: {…}, request: XMLHttpRequest, …} code :
"ERR_NETWORK" config :
{transitional: {…}, transformRequest: Array(1), transformResponse: Array(1), timeout: 0, adapter: ƒ, …} message :
"Network Error" name :
"AxiosError" request :
XMLHttpRequest {data: undefined, onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, …} response :
XMLHttpRequest {data: undefined, onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, …} [[Prototype]] :
Error

172.20.0.70 is docker host ip

dev-lu commented 11 months ago

Did you uncomment the argument section for the backend URL in your Docker Compose file? It should look like this for you:

version: "3.8"
services:
  backend:
    build: ./backend
    container_name: backend
    ports:
      - "8000:8000"
  frontend:
    build:
      context: ./frontend
      args:
        - BACKEND_URL=http://172.20.0.70  # Backend URL without trailing slash
    container_name: frontend
    ports:
      - "3000:3000"
    stdin_open: true
    tty: true
ne0x86 commented 11 months ago

Still not working. Same error but with 172.20.0.70 ip

Bahatte commented 11 months ago

Thanks a lot it works for me... ill close the issue. Thanks a lot for quick help!

image