open-wa / wa-automate-docker

💬 🤖 The easiest way to turn your WhatsApp into an API. Be sure to 🌟 this repository for updates!
106 stars 31 forks source link

Data dir doesnt exist, creating...: /sessions/_IGNORE_session #61

Closed hasanbasri1993 closed 1 year ago

hasanbasri1993 commented 1 year ago

here my docker-compose.yaml

version: "3.9"
services:

  browser:
    image: browserless/chrome:latest
    hostname: browser
    init: true
    volumes:
      - "/home/ubuntu/dulido-open-wa/sessions:/sessions"
    ports:
      - "3000:3000"
    deploy:
      replicas: 1
      update_config:
        parallelism: 1
        delay: 10s
      restart_policy:
        condition: on-failure
    environment:
      CONNECTION_TIMEOUT: -1
      KEEP_ALIVE: 'true'
      WORKSPACE_EXPIRE_DAYS: 1
      ENABLE_CORS: 'true'
      CHROME_REFRESH_TIME: 86400000
      DEFAULT_BLOCK_ADS: 'true'
      FUNCTION_ENABLE_INCOGNITO_MODE: 'true'
      ENABLE_XVBF: 'true'
      CHROME_PATH: '/usr/bin/google-chrome'
      USE_CHROME_STABLE: 'true'
      NODE_ENV: 'production'

  owa:
    image: openwa/wa-automate:latest
    hostname: owa
    init: false
    restart: on-failure
    volumes:
      - "/home/ubuntu/dulido-open-wa/sessions:/sessions"
    depends_on:
      - browser
    ports:
      - "8002:8002"
    environment:
      WA_BROWSER_WS_ENDPOINT: 'ws://browser:3000'
      WA_DISABLE_SPINS: 'true'
      # Uncomment next line and add the session data base64 string to authenticate the session without the need to scan it again
      # WA_SESSION_DATA: ''

volumes:
  sessions:
You can also authenticate the session at: http://localhost:8002
- Starting
- Version: 4.55.2
- Initializing WA
- Using custom chromium args with multi device will cause issues! Please remove them: 
- Launching Browser
- MD Enabled, turning off incognito mode.
- Data dir: /sessions/_IGNORE_session
- Data dir doesnt exist, creating...: /sessions/_IGNORE_session
Error: EACCES: permission denied, mkdir '/sessions/_IGNORE_session'

Thanks u

smashah commented 1 year ago

you don't need to use the browserless image/compose anymore.

hasanbasri1993 commented 1 year ago
You can also authenticate the session at: http://localhost:8002
- Starting
- Version: 4.55.2
- Initializing WA
- Using custom chromium args with multi device will cause issues! Please remove them: 
- Launching Browser
- MD Enabled, turning off incognito mode.
- Data dir: /sessions/_IGNORE_session
- Data dir doesnt exist, creating...: /sessions/_IGNORE_session
Error: EACCES: permission denied, mkdir '/sessions/_IGNORE_session'

i run like this docker run -d -p 8080:8080 --name dulido-open-wa -v /home/ubuntu/dulido-open-wa/sessions/:/sessions openwa/wa-automate

smashah commented 1 year ago

try:

docker run -d -p 8080:8080 --name dulido-open-wa -v /home/ubuntu/dulido-open-wa/sessions/:/sessions:Z openwa/wa-automate

or try creating the docker volume first then mounting it

hasanbasri1993 commented 1 year ago

still not work, pemission denied But i success using pm2