webamon-org / Democracy

Our mission is to democratize threat intelligence, making it accessible, collaborative, and secure for everyone. This open-source community release provides a platform where users can contribute, share, and benefit from collective knowledge, strengthening global cybersecurity efforts.
https://hunt.webamon.co.uk
Apache License 2.0
6 stars 0 forks source link

Running locally - This site can’t be reached - macOS #25

Closed psyklopp closed 1 month ago

psyklopp commented 1 month ago

OS: macOS Monterey 12.5.1

Followed the steps:

  1. Cloned the repo (v0.2.3)
  2. Added the API key to yml file
  3. Ran docker-compose up
version: '3.8'

services:
  console:
    build: ./Console
    ports:
      - "3030:3030"

  sandbox:
    build: ./Sandbox
    ports:
      - "5000:5000"
    environment:
      - queue_worker=true
      - community=true
      - webamon_apikey=my_API_key

I navigate to localhost:3030 in browser (Chrome and Safari). And it says site cannot be reached.

In the terminal, the last note is console-1 | webpack compiled with 27 warnings, which is expected (as seen in the video 3x Commands, 3x Minutes)

psyklopp commented 1 month ago

There are warnings but I also the following in the beginning.

I can share them in separate file too (if the following looks ugly)

console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/anchor-tag-builder.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/anchor-tag-builder.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/autolinker.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/autolinker.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/html-tag.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/html-tag.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/htmlParser/parse-html.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/htmlParser/parse-html.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/index.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/index.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/match/email-match.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/email-match.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/match/hashtag-match.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/hashtag-match.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/match/index.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/index.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/match/match.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/match.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/match/mention-match.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/mention-match.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/match/phone-match.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/phone-match.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/match/url-match.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/url-match.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/matcher/email-matcher.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/email-matcher.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/matcher/hashtag-matcher.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/hashtag-matcher.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/matcher/index.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/index.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/matcher/matcher.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/matcher.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/matcher/mention-matcher.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/mention-matcher.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/matcher/phone-matcher.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/phone-matcher.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/matcher/tld-regex.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/tld-regex.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/matcher/url-match-validator.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/url-match-validator.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/matcher/url-matcher.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/url-matcher.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/regex-lib.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/regex-lib.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/truncate/truncate-end.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/truncate/truncate-end.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/truncate/truncate-middle.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/truncate/truncate-middle.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/truncate/truncate-smart.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/truncate/truncate-smart.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/utils.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/utils.ts'
console-1  | 
console-1  | Failed to parse source map from '/app/node_modules/autolinker/src/version.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/version.ts'

Note: I am able to login using my API key online at hunt.webamon.co.uk

I have shared the full output in a txt file: terminal-output.txt

webamon-org commented 1 month ago

Why port 3030? Does it work on 3000? Wait a few minutes and attempt it. React/npm needs to load

webamon-org commented 1 month ago

Ports 3000 is binded, the configuration has been changed to break this. Bind a different port to 300 If required, you have changed the internally used ports

psyklopp commented 1 month ago

A different project on docker is using port 3000 so I had to change it. Will try to free it and then check later.

Update: The default configuration is needed for the project to work properly.

Now it starts successfully on Chrome. Though localhost:3000/login/ gives the following error on Safari.

Uncaught runtime errors:

ERROR
Can't find variable: content_type_noop
@http://localhost:3000/static/js/bundle.js:219205:34
@http://localhost:3000/static/js/bundle.js:219203:3
./node_modules/swagger-ui-react/swagger-ui-es-bundle-core.js@http://localhost:3000/static/js/bundle.js:225064:2
@http://localhost:3000/static/js/bundle.js:327863:35
__webpack_require__@http://localhost:3000/static/js/bundle.js:327284:36
fn@http://localhost:3000/static/js/bundle.js:327521:28
./node_modules/swagger-ui-react/index.mjs@http://localhost:3000/static/js/bundle.js:321798:88
@http://localhost:3000/static/js/bundle.js:327863:35
__webpack_require__@http://localhost:3000/static/js/bundle.js:327284:36
fn@http://localhost:3000/static/js/bundle.js:327521:28
./src/scenes/docs/index.js@http://localhost:3000/static/js/bundle.js:4094:93
@http://localhost:3000/static/js/bundle.js:327863:35
__webpack_require__@http://localhost:3000/static/js/bundle.js:327284:36
fn@http://localhost:3000/static/js/bundle.js:327521:28
./src/App.js@http://localhost:3000/static/js/bundle.js:23:89
@http://localhost:3000/static/js/bundle.js:327863:35
__webpack_require__@http://localhost:3000/static/js/bundle.js:327284:36
fn@http://localhost:3000/static/js/bundle.js:327521:28
./src/index.js@http://localhost:3000/static/js/bundle.js:4011:81
@http://localhost:3000/static/js/bundle.js:327863:35
__webpack_require__@http://localhost:3000/static/js/bundle.js:327284:36
@http://localhost:3000/static/js/bundle.js:328445:56
global code@http://localhost:3000/static/js/bundle.js:328447:12

Safari has a lot of issues many times so won't open a issue regarding this.

Thanks for the help.

webamon-org commented 1 month ago

Update: the default configuration is not needed. Please be accurate in your assumptions. Follow the 3 installation steps and everything works. If need to change the configuration for a service, change the Dockerfile not the docker compose. Issue closed (user error)