mconf / bigbluebot

BigBlueButton bots
MIT License
58 stars 29 forks source link

bigbluebot - Installation step #11

Closed aguerson closed 4 years ago

aguerson commented 4 years ago
1) create bigbluebutton user
adduser bigbluebutton
2) create sub dir
mkdir -p /opt/bigbluebutton/bbb-bot
3) change rights
chown -R bigbluebutton:bigbluebutton /opt/bigbluebutton/bbb-bot
chmod 1770 /opt/bigbluebutton/bbb-bot
4) install few packages
apt-get update
apt-get install nodejs
apt-get install npm
apt-get install firefox
5) clone the repo
su - bigbluebutton
git clone git://github.com/mconf/bigbluebot.git /opt/bigbluebutton/bbb-bot/
6) modify the "name" in package.json to bbbbot
7) install the librairies
npm i bigbluebot

... Then I had this error

npm i bigbluebot
loadDep:puppeteer → resol
loadDep:ws → request     
bbbbot@1.3.6 /opt/bigbluebutton/bbb-bot
└── bigbluebot@1.3.6  extraneous

npm WARN ws@7.3.1 requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN ws@7.3.1 requires a peer of utf-8-validate@^5.0.2 but none was installed.
aguerson commented 4 years ago

OK google is your friend

npm i --save-dev ws
npm i --save-dev bufferutil
npm i --save-dev utf-8-validate

and then

npm i bigbluebot
aguerson commented 4 years ago

OK a new problem

node run.js 
internal/util.js:209
    throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
    at promisify (internal/util.js:209:11)
    at Object.<anonymous> (/opt/bigbluebutton/bbb-bot/node_modules/extract-zip/index.js:11:18)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/opt/bigbluebutton/bbb-bot/node_modules/bigbluebot/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:48:39)
aguerson commented 4 years ago
OK the problem is the nodejs version so

apt-get remove nodejs --purge
apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
apt -y install nodejs

now I have

 ~$node --version
v12.18.4
 ~$npm --version
6.14.6

su - bigbluebutton

npm i bigbluebot

> puppeteer@5.3.0 install /opt/bigbluebutton/bbb-bot/node_modules/puppeteer
> node install.js

Downloading Chromium r800071 - 128.4 Mb [====================] 100% 0.0s 
Chromium (800071) downloaded to /opt/bigbluebutton/bbb-bot/node_modules/puppeteer/.local-chromium/linux-800071
+ bigbluebot@1.3.6
added 6 packages from 16 contributors, removed 9 packages, updated 3 packages and audited 62 packages in 14.48s

6 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
aguerson commented 4 years ago
bigbluebutton@xxx:/opt/bigbluebutton/bbb-bot$ node run.js 
INFO    2020-09-21T21:11:12.041Z Bots: 10
INFO    2020-09-21T21:11:12.043Z Life: 60 seconds
INFO    2020-09-21T21:11:12.043Z Fetching EN locale

Nothing....
aguerson commented 4 years ago
OK I tested an issue 
/opt/bigbluebutton/bbb-bot$ node test.js 
(node:13592) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
[13603:13603:0921/232647.862860:ERROR:browser_main_loop.cc(1426)] Unable to open X display.

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

    at onClose (/opt/bigbluebutton/bbb-bot/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
    at ChildProcess.<anonymous> (/opt/bigbluebutton/bbb-bot/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:184:79)
    at ChildProcess.emit (events.js:327:22)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
(node:13592) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:13592) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
aguerson commented 4 years ago

Can we launch the bbb bot without X display ? ( like https://github.com/aau-zid/BigBlueButton-liveStreaming )

Regards, Aurélien.

pedrobmarin commented 4 years ago

Hi @aguerson .

You can. You probably need just some extra dependencies for chromium to work. You can take a look in this project https://github.com/mconf/charms/tree/v2.2/bionic/mconfless, in particular this install script https://github.com/mconf/charms/blob/v2.2/bionic/mconfless/hooks/install.

aguerson commented 4 years ago

I will try tomorrow morning ;) I will reply this issue next thanks

aguerson commented 4 years ago

I can't use Juju, because I use OpenVZ. In https://github.com/aau-zid/BigBlueButton-liveStreaming, the chrome driver is used to use the browser without X display. Is there something similar with chromium you can adapt to your project ?

pedrobmarin commented 4 years ago

You don't need to use Juju. Just take a look on the extra dependencies at the install script.

Em ter, 22 de set de 2020 03:42, Aurélien GUERSON notifications@github.com escreveu:

I can't use Juju, because I use OpenVZ. In https://github.com/aau-zid/BigBlueButton-liveStreaming, the chrome driver is used to use the browser without X display. Is there something similar with chromium you can adapt to your project ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mconf/bigbluebot/issues/11#issuecomment-696538614, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANSFXQOKO2CGQRPM2MK5NTSHBBNVANCNFSM4RU6N7TQ .

aguerson commented 4 years ago

OK I installed the packages

apt-get install -y gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

And I read https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix

But if I launch node run.js, always the same

node run.js 
INFO    2020-09-22T08:08:03.994Z Bots: 10
INFO    2020-09-22T08:08:03.997Z Life: 60 seconds
INFO    2020-09-22T08:08:03.997Z Fetching EN locale

I will check the value about the sandbox...

aguerson commented 4 years ago

OK Maybe I approach from the problem

Before, In the variable

BIGBLUEBOT_HOST

I used

https://hostname.domain/

and it didn't work

now I try with

https://hostname.domain/bigbluebutton/api

Below my error

node run.js 
INFO    2020-09-22T08:15:58.477Z Bots: 10
INFO    2020-09-22T08:15:58.479Z Life: 60 seconds
INFO    2020-09-22T08:15:58.479Z Creating room
ERROR   2020-09-22T08:15:58.532Z Error: Request failed with status code 404
    at createError (/opt/bigbluebutton/bbb-bot/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/opt/bigbluebutton/bbb-bot/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/opt/bigbluebutton/bbb-bot/node_modules/axios/lib/adapters/http.js:244:11)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1220:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  config: {
    url: 'https://hostname.domain/bigbluebutton/api/bigbluebutton/api/create?attendeePW=ap&meetingID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&moderatorPW=mp&record=true&checksum=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy',
    method: 'get',
    headers: {
      Accept: 'application/json, text/plain, */*',
      'User-Agent': 'axios/0.20.0'
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    data: undefined
  },
  request: ClientRequest {
    _events: [Object: null prototype] {
      socket: [Function],
      abort: [Function],
      aborted: [Function],
      connect: [Function],
      error: [Function],
      timeout: [Function],
      prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: true,
      _SNICallback: null,
      servername: 'hostname.domain',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 10,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'hostname.domain',
      _readableState: [ReadableState],
      readable: true,
      _maxListeners: undefined,
      _writableState: [WritableState],
      writable: false,
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(asyncId)]: 8,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object]
    },
    connection: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: true,
      _SNICallback: null,
      servername: 'hostname.domain',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 10,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'hostname.domain',
      _readableState: [ReadableState],
      readable: true,
      _maxListeners: undefined,
      _writableState: [WritableState],
      writable: false,
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(asyncId)]: 8,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object]
    },
    _header: 'GET /bigbluebutton/api/bigbluebutton/api/create?attendeePW=ap&meetingID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&moderatorPW=mp&record=true&checksum=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy HTTP/1.1\r\n' +
      'Accept: application/json, text/plain, */*\r\n' +
      'User-Agent: axios/0.20.0\r\n' +
      'Host: hostname.domain\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _onPendingData: [Function: noopPendingOutput],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 443,
      protocol: 'https:',
      options: [Object],
      requests: {},
      sockets: [Object],
      freeSockets: {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'GET',
    insecureHTTPParser: undefined,
    path: '/bigbluebutton/api/bigbluebutton/api/create?attendeePW=ap&meetingID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&moderatorPW=mp&record=true&checksum=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      readable: false,
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      socket: [TLSSocket],
      connection: [TLSSocket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      headers: [Object],
      rawHeaders: [Array],
      trailers: {},
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 404,
      statusMessage: '',
      client: [TLSSocket],
      _consuming: false,
      _dumped: false,
      req: [Circular],
      responseUrl: 'https://hostname.domain/bigbluebutton/api/bigbluebutton/api/create?attendeePW=ap&meetingID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&moderatorPW=mp&record=true&checksum=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy',
      redirects: [],
      [Symbol(kCapture)]: false
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    _redirectable: Writable {
      _writableState: [WritableState],
      writable: true,
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 0,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function],
      _currentRequest: [Circular],
      _currentUrl: 'https://hostname.domain/bigbluebutton/api/bigbluebutton/api/create?attendeePW=ap&meetingID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&moderatorPW=mp&record=true&checksum=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'user-agent': [Array],
      host: [Array]
    }
  },
  response: {
    status: 404,
    statusText: '',
    headers: {
      server: 'nginx/1.10.3 (Ubuntu)',
      date: 'Tue, 22 Sep 2020 08:15:58 GMT',
      'content-type': 'application/json;charset=UTF-8',
      'transfer-encoding': 'chunked',
      connection: 'close',
      'x-application-context': 'application:production:8090'
    },
    config: {
      url: 'https://hostname.domain/bigbluebutton/api/bigbluebutton/api/create?attendeePW=ap&meetingID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&moderatorPW=mp&record=true&checksum=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy',
      method: 'get',
      headers: [Object],
      transformRequest: [Array],
      transformResponse: [Array],
      timeout: 0,
      adapter: [Function: httpAdapter],
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      validateStatus: [Function: validateStatus],
      data: undefined
    },
    request: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      socket: [TLSSocket],
      connection: [TLSSocket],
      _header: 'GET /bigbluebutton/api/bigbluebutton/api/create?attendeePW=ap&meetingID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&moderatorPW=mp&record=true&checksum=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'User-Agent: axios/0.20.0\r\n' +
        'Host: hostname.domain\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _onPendingData: [Function: noopPendingOutput],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      insecureHTTPParser: undefined,
      path: '/bigbluebutton/api/bigbluebutton/api/create?attendeePW=ap&meetingID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&moderatorPW=mp&record=true&checksum=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    data: {
      timestamp: 1600762558521,
      status: 404,
      error: 'Not Found',
      message: 'No message available',
      path: '/bigbluebutton/api/bigbluebutton/api/create'
    }
  },
  isAxiosError: true,
  toJSON: [Function: toJSON]
}

Any ideas ?

aguerson commented 4 years ago

What do you mean by BIGBLUEBOT_ENDPOINT=wss://your.browser.websocket ?

like wss://chromium.websocket ? I did not understand

pedrobmarin commented 4 years ago

The correct host would be https://hostname.domain.

Em ter, 22 de set de 2020 05:34, Aurélien GUERSON notifications@github.com escreveu:

What do you mean by BIGBLUEBOT_ENDPOINT=wss://your.browser.websocket ?

like wss://chromium.websocket ? I did not understand

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mconf/bigbluebot/issues/11#issuecomment-696584498, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANSFXQX7KQ4RZJICHVF47DSHBOR7ANCNFSM4RU6N7TQ .

pedrobmarin commented 4 years ago

Maybe try to run it in your local machine first to see how everything works and then adapt it to your vm infrastructure.

Em ter, 22 de set de 2020 05:38, Pedro Beschorner Marin < pedrobmarin@gmail.com> escreveu:

The correct host would be https://hostname.domain.

Em ter, 22 de set de 2020 05:34, Aurélien GUERSON < notifications@github.com> escreveu:

What do you mean by BIGBLUEBOT_ENDPOINT=wss://your.browser.websocket ?

like wss://chromium.websocket ? I did not understand

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mconf/bigbluebot/issues/11#issuecomment-696584498, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANSFXQX7KQ4RZJICHVF47DSHBOR7ANCNFSM4RU6N7TQ .

aguerson commented 4 years ago

OK I try something else I used remote X display over ssh

Now Chrome is opened but a new problem occured

node run.js 
INFO    2020-09-22T08:55:24.976Z Bots: 1
INFO    2020-09-22T08:55:24.978Z Life: 60 seconds
INFO    2020-09-22T08:55:24.978Z Creating room
INFO    2020-09-22T08:55:25.100Z Fetching EN locale
INFO    2020-09-22T08:55:33.655Z Solon Schulist: join https://hostname.domain at xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DEBUG   2020-09-22T08:55:36.789Z Solon Schulist: notice [aria-label^="Options"]
DEBUG   2020-09-22T08:55:38.802Z Solon Schulist: [aria-label^="Join audio modal"] is visible
DEBUG   2020-09-22T08:55:38.802Z Solon Schulist: skip audio join
INFO    2020-09-22T08:55:38.802Z Solon Schulist: perform audio modal listen
DEBUG   2020-09-22T08:55:38.802Z Solon Schulist: click [aria-label^="Listen only"]
WARN    2020-09-22T08:55:57.047Z Solon Schulist: [aria-label^="Leave audio"] is not visible
FAIL    2020-09-22T08:55:57.048Z Solon Schulist: audio modal listen

Are you sure about the aria-label=Listen only ? I saw the selection between micro or listen , but nothing appened...

amguirado73 commented 4 years ago

OK I try something else I used remote X display over ssh

Now Chrome is opened but a new problem occured

node run.js 
INFO  2020-09-22T08:55:24.976Z Bots: 1
INFO  2020-09-22T08:55:24.978Z Life: 60 seconds
INFO  2020-09-22T08:55:24.978Z Creating room
INFO  2020-09-22T08:55:25.100Z Fetching EN locale
INFO  2020-09-22T08:55:33.655Z Solon Schulist: join https://hostname.domain at xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DEBUG     2020-09-22T08:55:36.789Z Solon Schulist: notice [aria-label^="Options"]
DEBUG     2020-09-22T08:55:38.802Z Solon Schulist: [aria-label^="Join audio modal"] is visible
DEBUG     2020-09-22T08:55:38.802Z Solon Schulist: skip audio join
INFO  2020-09-22T08:55:38.802Z Solon Schulist: perform audio modal listen
DEBUG     2020-09-22T08:55:38.802Z Solon Schulist: click [aria-label^="Listen only"]
WARN  2020-09-22T08:55:57.047Z Solon Schulist: [aria-label^="Leave audio"] is not visible
FAIL  2020-09-22T08:55:57.048Z Solon Schulist: audio modal listen

Are you sure about the aria-label=Listen only ? I saw the selection between micro or listen , but nothing appened...

The only way that It works is modifying lib/pool.js:

const args = [ --lang=${browser.lang}, --disable-dev-shm-usage, --no-user-gesture-required, // --use-fake-ui-for-media-stream, // --use-fake-device-for-media-stream, ];

pedrobmarin commented 4 years ago

The only way that It works is modifying lib/pool.js:

const args = [ --lang=${browser.lang}, --disable-dev-shm-usage, --no-user-gesture-required, // --use-fake-ui-for-media-stream, // --use-fake-device-for-media-stream, ];

This doesn't make any sense to me. Could you share the script you are running?

amguirado73 commented 4 years ago

This is my script:

/**

const bigbluebot = require('./index.js')

let actions = async page => { await bigbluebot.audio.modal.listen(page) //await bigbluebot.audio.modal.microphone(page) // await bigbluebot.video.join(page) await bigbluebot.chat.send(page) }

bigbluebot.run(actions)

pedrobmarin commented 4 years ago
INFO    2020-09-22T12:12:58.306Z Bots: 1
INFO    2020-09-22T12:12:58.307Z Life: 60 seconds
INFO    2020-09-22T12:12:58.307Z Fetching EN locale
INFO    2020-09-22T12:13:01.280Z Dawson Sanford: join https://test.bigbluebutton.org at Demo Meeting
DEBUG   2020-09-22T12:13:10.354Z Dawson Sanford: notice [aria-label^="Options"]
DEBUG   2020-09-22T12:13:12.366Z Dawson Sanford: [aria-label^="Join audio modal"] is visible
DEBUG   2020-09-22T12:13:12.367Z Dawson Sanford: skip audio join
INFO    2020-09-22T12:13:12.367Z Dawson Sanford: perform audio modal listen
DEBUG   2020-09-22T12:13:12.367Z Dawson Sanford: click [aria-label^="Listen only"]
DEBUG   2020-09-22T12:13:15.431Z Dawson Sanford: [aria-label^="Leave audio"] is visible
PASS    2020-09-22T12:13:15.431Z Dawson Sanford: audio modal listen
INFO    2020-09-22T12:14:15.433Z Dawson Sanford: leaving
aguerson commented 4 years ago

Works for me too !!

Thanks. Be careful, there are two differents files. It depends what you use

There is lib/pool.js and there is node_modules/bigbluebot/lib/pool.js

Now I will try with many bots !

Regards, Aurélien.

aguerson commented 4 years ago

OK guys, now I passed a next step to this issue. At the beginning, I wanted to launch bots. I can do it now. BUT, bigbluebot doesn't use the new capabilitie of BBB https://docs.bigbluebutton.org/2.2/customize.html with "userdata-bbb". I want to use greenlight ( like in my production env ), so I decided to try. Basically, with this code, you can't create a meeting with greenlight and try to join/add bots, because the code want to create the room. So I checked how the bot is used in the famous project https://github.com/aau-zid/BigBlueButton-liveStreaming, and I found this kind of url

https://hostname.domain/bigbluebutton/api/join?meetingID=idididididididididididididididididid&fullName=Live&password=blablabla&userdata-bbb_auto_join_audio=true&userdata-bbb_enable_video=true&userdata-bbb_listen_only_mode=true&userdata-bbb_force_listen_only=true&userdata-bbb_skip_check_audio=true&checksum=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I decided to modify this value ( forcing it ) in the file /opt/bigbluebutton/bbb-bot/node_modules/bigbluebot/lib/api.js

const getURL = (action, params) => {
  const query = buildQuery(params);
  const checksum = calculateChecksum(action, query);
  const host = config.url.host;
  const api = config.api.path;
  const url = `https\:\/\/hostname.domain/bigbluebutton/api/join?meetingID=idididididididididididididididididid&fullName=Live&password=blablabla&userdata-bbb_auto_join_audio=true&userdata-bbb_enable_video=true&userdata-bbb_listen_only_mode=true&userdata-bbb_force_listen_only=true&userdata-bbb_skip_check_audio=true&checksum=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`;

  return url;
};

and it works like a charm !!!

So now, I have to verify if I can use it with many random bots.

You will see my results in the next reply ;)

I hope it could help someone

Regards, Aurélien.

pedrobmarin commented 4 years ago

Hi @aguerson . I'm sorry you are struggling to understand how this lib works and I'm even more sorry on reading things like this one:

BUT, bigbluebot is old coded (it seems like), maybe used by "mconf" dev teams, and it is using the demo of BBB.

I have no idea who you are or what's your background at this subject and, so far, I tried to help you solve a problem you created yourself. If this project is not helping you the way you think things should work, build your own.

I recommend you to be more respectful at your messages. I'm sure if you knew what mconf does you would.

aguerson commented 4 years ago

As I said by mail, there is a big misunderstanding indeed. What I was trying to translate is that the code that is being used does not use the new features that have been brought in lately by the BBB development team. => https://docs.bigbluebutton.org/2.2/customize.html Of course I respect the code that was made by the developers of mconf and you. I really thank you for it. I have used BBB for 8 months, and it is a really good project ! Let me finish the issue and published my tests. If you allow me to apologize for these remarks, inappropriate.

Thanks you again @pedrobmarin for you confiance ;), and really sorry for my translation :'(

aguerson commented 4 years ago

I close this issue to open a new one with the good instructions, and maybe some help from you ;)