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

Collaboration Features Not Working #26

Closed
ryanraposo opened this issue Sep 3, 2023 · 6 comments
Closed

Collaboration Features Not Working #26

ryanraposo opened this issue Sep 3, 2023 · 6 comments

Comments

@ryanraposo
Copy link

ryanraposo commented Sep 3, 2023

Trying to get this to work on an Ubuntu 20.04 EC2 instance. I have a subdomain I'd like to use.

docker-compose.yaml

services:
  frontend:
    image: excalidraw:v0.1.0-b35a2c3-dirty
    ports:
      - 80:80

  storage:
    image: excalidraw-storage-backend:v0.1.0-b35a2c3-dirty
    restart: always
    environment: # docs https://github.com/alswl/excalidraw-storage-backend#environement-variables
      - PORT=8081
    ports:
      - 8081:8081

  room:
    image: excalidraw-room:v0.1.0-b35a2c3-dirty
    ports:
      - 8082:80

excalidraw.env.production

REACT_APP_BACKEND_V2_GET_URL=https://0.0.0.0/api/v2/
REACT_APP_BACKEND_V2_POST_URL=https://0.0.0.0/api/v2/po>

REACT_APP_LIBRARY_URL=https://libraries.excalidraw.com
REACT_APP_LIBRARY_BACKEND=https://us-central1-excalidra>

REACT_APP_HTTP_STORAGE_BACKEND_URL=http://0.0.0.0:8081/>
REACT_APP_STORAGE_BACKEND=http

REACT_APP_PORTAL_URL=                           
# Fill to set socket server URL used for collaboration.
# Meant for forks only: excalidraw.com uses custom REAC>
REACT_APP_WS_SERVER_URL=http://0.0.0.0:8082

REACT_APP_FIREBASE_CONFIG='{}'

# production-only vars
REACT_APP_GOOGLE_ANALYTICS_ID=foo

REACT_APP_PLUS_APP=https://app.excalidraw.com

Here's my output:

$ sudo docker compose up
[+] Running 3/0
 ✔ Container excalidraw-collaboration-frontend-1  Created0.0s 
 ✔ Container excalidraw-collaboration-room-1      Running0.0s 
 ✔ Container excalidraw-collaboration-storage-1   Running0.0s 
Attaching to excalidraw-collaboration-frontend-1, excalidraw-collaboration-room-1, excalidraw-collaboration-storage-1
excalidraw-collaboration-frontend-1  | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
excalidraw-collaboration-frontend-1  | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
excalidraw-collaboration-frontend-1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
excalidraw-collaboration-frontend-1  | 10-listen-on-ipv6-by-default.sh: info: IPv6 listen already enabled
excalidraw-collaboration-frontend-1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
excalidraw-collaboration-frontend-1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
excalidraw-collaboration-frontend-1  | /docker-entrypoint.sh: Configuration complete; ready for start up
excalidraw-collaboration-frontend-1  | 2023/09/03 11:43:29 [notice] 1#1: using the "epoll" event method
excalidraw-collaboration-frontend-1  | 2023/09/03 11:43:29 [notice] 1#1: nginx/1.21.6
excalidraw-collaboration-frontend-1  | 2023/09/03 11:43:29 [notice] 1#1: built by gcc 10.3.1 20211027 (Alpine 10.3.1_git20211027) 
excalidraw-collaboration-frontend-1  | 2023/09/03 11:43:29 [notice] 1#1: OS: Linux 5.15.0-1043-aws
excalidraw-collaboration-frontend-1  | 2023/09/03 11:43:29 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
excalidraw-collaboration-frontend-1  | 2023/09/03 11:43:29 [notice] 1#1: start worker processes
excalidraw-collaboration-frontend-1  | 2023/09/03 11:43:29 [notice] 1#1: start worker process 25
excalidraw-collaboration-frontend-1  | 2023/09/03 11:43:29 [notice] 1#1: start worker process 26
excalidraw-collaboration-frontend-1  | 127.0.0.1 - - [03/Sep/2023:11:43:59 +0000] "GET / HTTP/1.1" 200 3751 "-" "Wget" "-"
@alswl
Copy link
Owner

alswl commented Sep 3, 2023

Any error messages?

@ryanraposo
Copy link
Author

I did just add a STORAGE_URI, and now I'm getting

3/2023, 12:44:51 PM   ERROR [StorageService] Error: connect ECONNREFUSED 127.0.0.1:6379

'redis-cli ping' works. Same default port.

@ryanraposo
Copy link
Author

When I try to get a share link:

undefined is not an object (evaluating 'window.crypto.subtle.generateKey')

When I click 'Live collaboration...' 'Start session' is greyed out.

@ryanraposo
Copy link
Author

I think I'm closer now? back to redis, using auth... redis seems to be configured correctly. I'm using the elastic ip of my ec2 instance in place of localhost (or 0.0.0.0) and there are few/no errors.

I can't manage live collaboration, though. Not that I can see. Am I not using room correctly? BTW, I'm visiting the ip directly, as in 1.2.3.4 (after swapping it for localhost in the env/compose files)

redis seems prepared to manage scenes etc, but how do I go this crucial step further?

@yinhuihe
Copy link

yinhuihe commented Sep 4, 2023

Live collaboration requires the https protocol, using Nginx

@alswl
Copy link
Owner

alswl commented Nov 11, 2023

@yinhuihe is right.
Use HTTPS or use http://localhost .

@alswl alswl closed this as completed Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants