aau-zid / BigBlueButton-liveStreaming

Streams a given BBB Meeting to an RTMP Server.
GNU General Public License v3.0
201 stars 160 forks source link

Fail on chat_send.click() #124

Open moan0s opened 3 years ago

moan0s commented 3 years ago

Describe the bug The streamer fails during start. It seems to be an issue with chat_send.click()

To Reproduce Steps to reproduce the behavior: Pull newest docker image, configure, try to start with docker-compose up

Expected behavior I would expect a user to join a meeting (which happens for a second, this user is called "Live") and the stream to begin (which does not happen). Also the container creashes. Here is the log


root@XXXXXX:~# docker-compose up 
Starting liveStreaming ... done
Attaching to liveStreaming
liveStreaming   | Skipping nsswrapper setup - already initialized
liveStreaming   | Starting pulseaudio...
liveStreaming   | Waiting for pulseaudio to start...
liveStreaming   | Skipping nsswrapper setup - already initialized
liveStreaming   | INFO:root:Starting browser!!
liveStreaming   | INFO:root:streaming intro...
liveStreaming   | ffmpeg version 4.3.2-0york0~18.04 Copyright (c) 2000-2021 the FFmpeg developers
liveStreaming   |   built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
liveStreaming   |   configuration: --prefix=/usr --extra-version='0york0~18.04' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libzimg --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
liveStreaming   |   libavutil      56. 51.100 / 56. 51.100
liveStreaming   |   libavcodec     58. 91.100 / 58. 91.100
liveStreaming   |   libavformat    58. 45.100 / 58. 45.100
liveStreaming   |   libavdevice    58. 10.100 / 58. 10.100
liveStreaming   |   libavfilter     7. 85.100 /  7. 85.100
liveStreaming   |   libavresample   4.  0.  0 /  4.  0.  0
liveStreaming   |   libswscale      5.  7.100 /  5.  7.100
liveStreaming   |   libswresample   3.  7.100 /  3.  7.100
liveStreaming   |   libpostproc    55.  7.100 / 55.  7.100
liveStreaming   | false: No such file or directory
liveStreaming   | INFO:root:Open BBB and hide elements!!
liveStreaming   | INFO:root:get_join_url...
liveStreaming   | INFO:root:https://bbb.hyteck.de/bigbluebutton/api/join?meetingID=89dc77555f0a37c6c61bb02b7dd1c0105c47cc84&fullName=Live&password=ooBdOwdKYjsZ&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&joinViaHtml5=true&checksum=XXXXXXXXXXXXXXXXXXXX
liveStreaming   | INFO:root:Waiting for chat input window to appear.
liveStreaming   | Traceback (most recent call last):
liveStreaming   |   File "stream.py", line 255, in <module>
liveStreaming   |     bbb_browser()
liveStreaming   |   File "stream.py", line 156, in bbb_browser
liveStreaming   |     chat_send.click()
liveStreaming   |   File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webelement.py", line 80, in click
liveStreaming   |     self._execute(Command.CLICK_ELEMENT)
liveStreaming   |   File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
liveStreaming   |     return self._parent.execute(command, params)
liveStreaming   |   File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
liveStreaming   |     self.error_handler.check_response(response)
liveStreaming   |   File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
liveStreaming   |     raise exception_class(message, screen, stacktrace)
liveStreaming   | selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <button aria-label="Send message" aria-disabled="false" class="md--Q7ug4 buttonWrapper--x8uow sendButton--Z93EzE" type="submit" position="bottom" id="tippy-51">...</button> is not clickable at point (500, 1025). Other element would receive the click: <div class="ReactModal__Overlay ReactModal__Overlay--after-open overlay--Z7FUVK">...</div>
liveStreaming   |   (Session info: chrome=89.0.4389.114)
liveStreaming   | 
liveStreaming exited with code 1

When I use the join link to join the meeting manually, this works as I would expect it (I am a live user that can hear).

I happily provide more information.

mtsonline commented 3 years ago

hi and thanks for the report. what bbb version are you using? Did you change any settings in your bbb? have you chat enabled in liveStreaming? ... cheers

moan0s commented 3 years ago

TBH I don't know how to enable chat in liveStreaming, I only changed the docker-compose.yml

 root@XXXXX:~/stream# cat docker-compose.yml 
version: '3.3'
services:
  bbb-streamer:
    image: aauzid/bigbluebutton-livestreaming
    container_name: liveStreaming
    shm_size: '2gb'
    environment:
      # BigBlueButton Server url:
      - BBB_URL=https://bbb.hyteck.de/bigbluebutton/api
      # BigBlueButton secret:
      - BBB_SECRET=XXXXXXXXXXXXXXXXXXXXXXXX
      # BigBlueButton meetingID:
      - BBB_MEETING_ID=XXXXXXXXXXXXXXXXXXx
      # start meeting (optional):
      - BBB_START_MEETING=false
      # attendee password (optional - has to be set to the attendee password of moodle/greenlight or any other frontend to allow joining via their links):
      #- BBB_ATTENDEE_PASSWORD=IVLHwOBSVmYP
      # moderator password (optional - has to be set to the moderator password of moodle/greenlight or any other frontend to allow joining via their links):
      #- BBB_MODERATOR_PASSWORD=JjeQYksarqLQ
      # meeting title (optional):
      - BBB_MEETING_TITLE=XXXXXXXXXXX
      # download / save BigBlueButton meeting
      - BBB_DOWNLOAD_MEETING=false
      # play intro file (can be a local file in videodata folder e.g. /video/intro.mp4 or a url of a mediastream e.g. https://my.intro.stream)
      - BBB_INTRO=false
      # begin the intro at position (optional, e.g. 00:00:05)
      #- BBB_BEGIN_INTRO_AT=04:40
      # end intro after (optional, e.g. 01:00:00 - after one hour)
      #- BBB_END_INTRO_AT=
      # Media server url:
      - BBB_STREAM_URL=rtmp://stream.hyteck.de/live/XXXXXXXXXXXXXXXXX/
      # Resolution to be streamed/downloaded in format WxH (default 1920x1080)
      - BBB_RESOLUTION=1920x1080
      # stream video bitrate
      - FFMPEG_STREAM_VIDEO_BITRATE=4000
      # threads used for stream (0=auto)
      - FFMPEG_STREAM_THREADS=0
      # Timezone (default: Europe/Vienna):
      - TZ=Europe/Berlin

    volumes:
      - ./videodata:/video

I changed the following (moitoring and minor things)

enableHTML5ClientLog
setHTML5ClientAsDefault
enableUFWRules

echo "  Add monitoring to nginx"
  cat <<HERE > /etc/bigbluebutton/nginx/monitoring.nginx
# BigBlueButton Exporter (metrics)
location /metrics/ {
    auth_basic "BigBlueButton Exporter";
    auth_basic_user_file /etc/nginx/.htpasswd;
    proxy_pass http://127.0.0.1:9688/;
    include proxy_params;
}

This is the full version information

root@XXXXX:~/stream# bbb-conf --version

ii  bbb-apps                              1:2.2.0-51                                      amd64        BigBlueButton applications for Red5
ii  bbb-apps-akka                         2.2.0-97                                        all          BigBlueButton Apps (Akka)
ii  bbb-apps-screenshare                  1:2.2.0-51                                      amd64        BigBlueButton screenshare module for Red5
ii  bbb-apps-sip                          1:2.2.0-11                                      amd64        BigBlueButton SIP module for Red5
ii  bbb-apps-video                        1:2.2.0-49                                      amd64        BigBlueButton video module for Red5
ii  bbb-apps-video-broadcast              1:2.2.0-8                                       amd64        BigBlueButton video broadcast module for Red5
ii  bbb-client                            1:2.2.0-40                                      amd64        BigBlueButton Flash client
ii  bbb-config                            1:2.2.0-234                                     amd64        BigBlueButton configuration utilities
ii  bbb-etherpad                          1:2.2.0-66                                      amd64        The EtherPad Lite components for BigBlueButton
ii  bbb-freeswitch-core                   2:2.2.0-113                                     amd64        BigBlueButton build of FreeSWITCH
ii  bbb-freeswitch-sounds                 1:1.6.7-6                                       amd64        FreeSWITCH Sounds
ii  bbb-fsesl-akka                        2.2.0-73                                        all          BigBlueButton FS-ESL (Akka)
ii  bbb-html5                             1:2.2.0-1114                                    amd64        The HTML5 components for BigBlueButton
ii  bbb-mkclean                           1:0.8.7-3                                       amd64        Clean and optimize Matroska and WebM files
ii  bbb-playback-presentation             1:2.2.0-35                                      amd64        BigBluebutton playback of presentation
ii  bbb-record-core                       1:2.2.0-72                                      amd64        BigBlueButton record and playback
ii  bbb-red5                              1:1.0.10-16                                     amd64        The Red5 server for BigBlueButton
ii  bbb-transcode-akka                    2.2.0-8                                         all          BigBlueButton Transcoder
ii  bbb-web                               1:2.2.0-150                                     amd64        BigBlueButton API
ii  bbb-webrtc-sfu                        1:2.2.0-110                                     amd64        BigBlueButton WebRTC SFU
ii  bigbluebutton                         1:2.2.0-5                                       amd64        Open source web conferencing platform (bbb)
ii  ffmpeg                                7:4.2.4-1ubuntu0.1bbb1~16.04.1                  amd64        Tools for transcoding, streaming and playing of multimedia files
ii  libavcodec58:amd64                    7:4.2.4-1ubuntu0.1bbb1~16.04.1                  amd64        FFmpeg library with de/encoders for audio/video codecs - runtime files
ii  libavdevice58:amd64                   7:4.2.4-1ubuntu0.1bbb1~16.04.1                  amd64        FFmpeg library for handling input and output devices - runtime files
ii  libavfilter7:amd64                    7:4.2.4-1ubuntu0.1bbb1~16.04.1                  amd64        FFmpeg library containing media filters - runtime files
ii  libavformat58:amd64                   7:4.2.4-1ubuntu0.1bbb1~16.04.1                  amd64        FFmpeg library with (de)muxers for multimedia containers - runtime files
ii  libavresample4:amd64                  7:4.2.4-1ubuntu0.1bbb1~16.04.1                  amd64        FFmpeg compatibility library for resampling - runtime files
ii  libavutil56:amd64                     7:4.2.4-1ubuntu0.1bbb1~16.04.1                  amd64        FFmpeg library with functions for simplifying programming - runtime files
ii  libopusenc0                           0.2.1-1bbb1                                     amd64        High-level API for encoding Ogg Opus audio streams
ii  libpostproc55:amd64                   7:4.2.4-1ubuntu0.1bbb1~16.04.1                  amd64        FFmpeg library for post processing - runtime files
ii  libswresample3:amd64                  7:4.2.4-1ubuntu0.1bbb1~16.04.1                  amd64        FFmpeg library for audio resampling, rematrixing etc. - runtime files
ii  libswscale5:amd64                     7:4.2.4-1ubuntu0.1bbb1~16.04.1                  amd64        FFmpeg library for image scaling and various conversions - runtime files
mtsonline commented 3 years ago

do you get any prompt / dialogue when you open the join url in your browser? Or are you getting right into the meeting?

moan0s commented 3 years ago

There is a short period where there is a "connect" window in the middle of the screen, similar to a manual login. Nothing more

mtsonline commented 3 years ago

is your bbb configured to hide the chat / public chat? do you see the chat input field after opening the meeting? what language are you seeing? cheers

moan0s commented 3 years ago

Ahh sorry my bad! I did not open the link in a private window. Both in Firefox and chromium I was prompted with a request to enable my microphone. After that everything lookd like this: image

mtsonline commented 3 years ago

sure you use the newest version of liveStreaming and the join url from the logs? You should defenitely not get a request to use the microphone when joining with listen_only forced? Please recheck your bbb settings if you disabled listen_only or did any other changes regarding echotest/microphone/...

moan0s commented 3 years ago

The version in the docker-compose.yml is 3.3 I am very sure to join the URL from the logs and visually see that bbb_listen_only_mode=true

https://bbb.hyteck.de/bigbluebutton/api/join?meetingID=XXX&fullName=Live&password=XX&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&joinViaHtml5=true&checksum=XXX

It could very well be that this is a bug on side of my BBB server. I will do an update on the weekend (I remember vaguely that this was an issue addressed in a newer release) and will come back to you.

mtsonline commented 3 years ago

it seems to be the redirect of your nginx. The url does not point to the bbb, it opens your greenlight instance. Remove the redirect for / to /b - think this should solve it. You would have to exclude the bbb urls from redirecting. hope this helps.

faust64 commented 3 years ago

Having a similar issue today (exact same trace). While I'm pretty sure I've been able to stream conferences between the same BigBlueButton (and PeerTube), a few weeks ago. Chat is enabled in conference. Disabled in bbb-streaming env. Opening the connection link in a browser, I don't see anything unusual, audio/presentation/chat are there.

I've fixed it adding an import, and catching the exception:

from selenium.common.exceptions import ElementClickInterceptedException

And catching the exception in bbb_browser:

    except ElementClickInterceptedException:
        # ignore (chat might be disabled)
        logging.info("could not find chat input or chat toggle")

Unclear what's going on ... My test streams do not include chat, as expected - though if selenium fails to click that button, then how come?

chinmay81098 commented 3 years ago

do you get any prompt / dialogue when you open the join url in your browser? Or are you getting right into the meeting?

Hey @mtsonline I am also facing the same issue but I do get a prompt window I try to join with the url which script generates.

Join URL : - https://class.videowiki.pt/bigbluebutton/api/join?meetingID=XXX&fullName=Live&password=XXX&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&joinViaHtml5=true&checksum=XXX

Prompt :- We need your permission to play Audio

Screenshot from 2021-05-21 15-47-22

I am thinking some configuration needs to changed at bbb side, but not sure if any parameter exists for this.

What do you think?

Thanks Chinmay

mtsonline commented 3 years ago

please try the newest version. We changed the elements selenium is looking for and this works for us in all bbb versions now. cheers

chinmay81098 commented 3 years ago

The version in docker.compose.yml is 3.3, this is the latest one right?

mtsonline commented 3 years ago

the version number in the docker-compose file only tells which docker-compose version is used. Please fetch the newest version from github and try with that. you can just clone the repo and make sure you use the right config in your docker-compose file - not the image but the build one. have a look at the examples if you do not know how to change this on your own. hth

andreasscherbaum commented 3 years ago

I have the same problem. The container crashes with both chat enabled and disabled, but with different error messages.

Chat in conference disabled:

DEBUG:selenium.webdriver.remote.remote_connection:GET http://127.0.0.1:46443/session/eab34bceb58fe31d5a9/element/8ae57955-681a-4fbc-8e71-38b989974f99/enabled {"id": "8ae57955-681a-4fbc-8e71-38b989974f99"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:46443 "GET /session/eab34bceb58fe31d5a9/element/8ae57955-681a-4fbc-8e71-38b989974f99/enabled HTTP/1.1" 200 15
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:46443/session/eab34bceb58fe31d5a9/elements {"using": "css selector", "value": "[id=\"chat-toggle-button\"]"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:46443 "POST /session/eab34bceb58fe31d5a9/elements HTTP/1.1" 200 12
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
Traceback (most recent call last):
  File "stream.py", line 260, in <module>
    bbb_browser()
  File "stream.py", line 163, in bbb_browser
    element = browser.find_elements_by_id('chat-toggle-button')[0]
IndexError: list index out of range

Chat in conference enabled:

DEBUG:selenium.webdriver.remote.remote_connection:GET http://127.0.0.1:32997/session/5024c6e72e2eee789b7b56/element/9588f489-d317-4b20-a6ba-a6b0fef5fb22/enabled {"id": "9588f489-d317-4b20-a6ba-a6b0fef5fb22"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:32997 "GET /session/5024c6e72e2eee789b7b56/element/9588f489-d317-4b20-a6ba-a6b0fef5fb22/enabled HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
Traceback (most recent call last):
  File "stream.py", line 260, in <module>
    bbb_browser()
  File "stream.py", line 152, in bbb_browser
    tmp_chatUrl = args.target.partition('//')[2].partition('/')[0]
AttributeError: 'NoneType' object has no attribute 'partition'

BigBlueButton Server 2.3.3 (2326)

Latest image for BigBlueButton-liveStreaming

In both cases I can use the join URL in a browser, join the conference and everything works fine.

faust64 commented 3 years ago

I haven't had the chance to deploy a BBB 2.3 yet, not sure how BigBlueButton-liveStreaming would behave, some stuff might be missing?

In the first case (line 163/get-by-id chat-toggle-button), sounds like there's an element missing. A workaround could be to go with something like:

            element = browser.find_elements_by_id('chat-toggle-button')
            if len(element) > 0:
                if element[0].is_enabled():
                    element[0].click()

Although I'm not certain I'm not breaking something, if chat is actually enabled ...

The second error you're mentioning has nothing to do with selenium, html elements or BBB versions. Could you clarify, what do you pass as a RTMP server URL? The BBB_STREAM_URL env var in your container?

I would bet it was not set - even if the value is invalid, not an URL, ... the partitions stuff should work. I think the NoneType error comes from parser.add_argument("-t","--target", help="RTMP Streaming URL") not setting any default, while your environment tries to start streaming without any rtmp address.

... Also, if your issue has nothing to do with chat.send_click(), it may be better to register a new issue?

andreasscherbaum commented 3 years ago

BBB_STREAM_URL is not set. According to here it says:

BBB_STREAM_URL - URL of your streaming server including rtmp. Leave out to disable streaming.

Since I'm just testing this setup right now, and don't have a receiver for the streaming at the moment, I left this setting disabled. The first error seems to be related to chat.send_click(), that's why I posted it here. For the second error I wasn't sure, I just spotted this while I was trying to workaround the chat problem and see if I get this working without chat.

mtsonline commented 3 years ago

Hi,

ah, thanks for this. someone requested to remove the exact url of the stream that is posted into the chat. due to the split on tis url, it is no longer possible to leave it blank. an if above the line with partition() should do the trick i guess, but there might be other parts where it is used.

2.3 should work well in the master branch, we tested and used it multiple times with 2.3 beta and stable versions.

andreasscherbaum commented 3 years ago

What exactly does this mean? Do I need to have a streaming endpoint all the time how? And set BBB_STREAM_URL?

mtsonline commented 3 years ago

yes, unless you add the if. what would you want to do with this script if not streaming? This is the main feature of this. ;-)

andreasscherbaum commented 3 years ago

Testing the server side of things first. There is also the BBB_DOWNLOAD_MEETING, I expected to get a copy of the recording in videodata.

andreasscherbaum commented 3 years ago

Ok, I installed an endpoint, and changed the if. Unfortunately this does not seem to be enough:

DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:51055/session/925e62f8fd56ff367a8d091c/element {"using": "css selector", "value": "[id=\"message-input\"]"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:51055 "POST /session/925e62f8fd56ff367a8d091c/element HTTP/1.1" 200 88
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:51055/session/925e62f8fd56ff367a8d091c/elements {"using": "css selector", "value": "[aria-label=\"Send message\"]"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:51055 "POST /session/925e62f8fd56ff367a8d091c/elements HTTP/1.1" 200 90
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:GET http://127.0.0.1:51055/session/925e62f8fd56ff367a8d091c/element/db46871d-221d-4898-8b8f-961f4772f8f4/enabled {"id": "db46871d-221d-4898-8b8f-961f4772f8f4"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:51055 "GET /session/925e62f8fd56ff367a8d091c/element/db46871d-221d-4898-8b8f-961f4772f8f4/enabled HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:GET http://127.0.0.1:51055/session/925e62f8fd56ff367a8d091c/element/b3b4884c-2586-4834-9d54-73fcf039bad5/enabled {"id": "b3b4884c-2586-4834-9d54-73fcf039bad5"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:51055 "GET /session/925e62f8fd56ff367a8d091c/element/b3b4884c-2586-4834-9d54-73fcf039bad5/enabled HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:51055/session/925e62f8fd56ff367a8d091c/element/db46871d-221d-4898-8b8f-961f4772f8f4/value {"text": "This meeting is streamed to: xxx.xxx.xxx.xxx:1935", "value": ["T", "h", "i", "s", " ", "m", "e", "e", "t", "i", "n", "g", " ", "i", "s", " ", "s", "t", "r", "e", "a", "m", "e", "d", " ", "t", "o", ":", " ", "xxx", ".", "xxx", ".", "xxx", ".", "xxx", ":", "1", "9", "3", "5"], "id": "db46871d-221d-4898-8b8f-961f4772f8f4"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:51055 "POST /session/925e62f8fd56ff367a8d091c/element/db46871d-221d-4898-8b8f-961f4772f8f4/value HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:51055/session/925e62f8fd56ff367a8d091c/element/b3b4884c-2586-4834-9d54-73fcf039bad5/click {"id": "b3b4884c-2586-4834-9d54-73fcf039bad5"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:51055 "POST /session/925e62f8fd56ff367a8d091c/element/b3b4884c-2586-4834-9d54-73fcf039bad5/click HTTP/1.1" 400 591
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
INFO:root:could not find chat input or chat toggle
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:51055/session/925e62f8fd56ff367a8d091c/elements {"using": "css selector", "value": "button[aria-label^=\"Users and messages toggle\"]"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:51055 "POST /session/925e62f8fd56ff367a8d091c/elements HTTP/1.1" 200 90
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:GET http://127.0.0.1:51055/session/925e62f8fd56ff367a8d091c/element/024dd004-7b7d-48c1-bee1-c79edf046dbf/enabled {"id": "024dd004-7b7d-48c1-bee1-c79edf046dbf"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:51055 "GET /session/925e62f8fd56ff367a8d091c/element/024dd004-7b7d-48c1-bee1-c79edf046dbf/enabled HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:51055/session/925e62f8fd56ff367a8d091c/element/024dd004-7b7d-48c1-bee1-c79edf046dbf/click {"id": "024dd004-7b7d-48c1-bee1-c79edf046dbf"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:51055 "POST /session/925e62f8fd56ff367a8d091c/element/024dd004-7b7d-48c1-bee1-c79edf046dbf/click HTTP/1.1" 400 551
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
Traceback (most recent call last):
  File "stream.py", line 260, in <module>
    bbb_browser()
  File "stream.py", line 178, in bbb_browser
    element.click()
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webelement.py", line 80, in click
    self._execute(Command.CLICK_ELEMENT)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
    return self._parent.execute(command, params)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <button aria-label="Users and messages toggle" aria-disabled="false" class="md--Q7ug4 buttonWrapper--x8uow btn--Z25OApd" aria-expanded="true" accesskey="U">...</button> is not clickable at point (610, 28). Other element would receive the click: <div class="ReactModal__Overlay ReactModal__Overlay--after-open overlay--Z7FUVK">...</div>
  (Session info: chrome=91.0.4472.77)
mtsonline commented 3 years ago

did you change any settings in your bbb server? e.g. disable chat/public chat/userlist ...? Are you using the current master of the bbb-streaming checked out from github?

andreasscherbaum commented 3 years ago

The only change I have is "defaultGuestPolicy=ASK_MODERATOR", but that should not affect anything, and I have a moderator in the room anyway (to watch what is happening). I have the latest update from the repository, sans the change in stream.py with the if ... I started testing this yesterday, I'm on "master", and the last update in "master" is 18 days ago.

mtsonline commented 3 years ago

thanks. moderator approval should work since the last few changes, prior it broke the streaming. Hard to say what is happening here exactly.

Wehn you open the join url from the logs, do you see the chat area and user area / is the send message input field and button visible? Does any popup request some user interaction?

You could try to comment most of the env vars in the docker-compose file only leaving the important ones. It may be an misconfiguration / some var not being handled correctly after some updates. Sorry, no more ideas at the moment

mtsonline commented 3 years ago

a fix for the click error handling was merged, can you please test and confirm if it solves your problem?

andreasscherbaum commented 3 years ago

This partly fixes my problem, as in: it's no longer crashing on startup. However I have this in the log:

INFO:root:could not find chat input or chat toggle
INFO:root:could not find users and messages toggle

And the stream shows that the chat pane is open, the welcome message is typed in, but never sent. The cursor is idling in the input field.

DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:57443/session/e2bba2617ae371c7e895da7/element/370b8bbb-a228-4c74-9f30-33632513775a/value {"text": "This meeting is streamed to: xxx.xxx.xxx.xxx:1935", "value": ["T", "h", "i", "s", " ", "m", "e", "e", "t", "i", "n", "g", " ", "i", "s", " ", "s", "t", "r", "e", "a", "m", "e", "d", " ", "t", "o", ":", " ", "xxx", ".", "xxx", ".", "xxx", ".", "xxx", ":", "1", "9", "3", "5"], "id": "370b8bbb-a228-4c74-9f30-33632513775a"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:57443 "POST /session/e2bba2617ae371c7e895da7/element/370b8bbb-a228-4c74-9f30-33632513775a/value HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:57443/session/e2bba2617ae371c7e895da7/element/5dcd1bb7-b844-4662-9bde-47bb952cd3f8/click {"id": "5dcd1bb7-b844-4662-9bde-47bb952cd3f8"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:57443 "POST /session/e2bba2617ae371c7e895da7/element/5dcd1bb7-b844-4662-9bde-47bb952cd3f8/click HTTP/1.1" 400 590
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
INFO:root:could not find chat input or chat toggle

When I use the join URL in a browser I'm able to send text messages in the chat.

mtsonline commented 3 years ago

only idea I have is, thath you open the source of the meeting page after joining with the join url of the streaming. and compare the ID / labels the streaming searches. Maybe something was renamed? ... are you using bbb 2.3.3 and did you customize anything?

andreasscherbaum commented 3 years ago

@mtsonline What exactly am I looking for? And will it help if I give you access to the meeting room?

andreasscherbaum commented 3 years ago

I'm using BBB 2.3.3, fresh install using the install script. No modifications at all on the website, only some config settings are changed (like the meeting stays open a while longer). Can't find anything out of the ordinary, but I don't have an earlier version available to compare with.

faust64 commented 3 years ago

The logs you posted last week may be an hint. First, it writes the message:

DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:57443/session/e2bba2617ae371c7e895da7/element/370b8bbb-a228-4c74-9f30-33632513775a/value {"text": "This meeting is streamed to: xxx.xxx.xxx.xxx:1935", "value": ["T", "h", "i", "s", " ", "m", "e", "e", "t", "i", "n", "g", " ", "i", "s", " ", "s", "t", "r", "e", "a", "m", "e", "d", " ", "t", "o", ":", " ", "xxx", ".", "xxx", ".", "xxx", ".", "xxx", ":", "1", "9", "3", "5"], "id": "370b8bbb-a228-4c74-9f30-33632513775a"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:57443 "POST /session/e2bba2617ae371c7e895da7/element/370b8bbb-a228-4c74-9f30-33632513775a/value HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request

We can see it goes through an http POST, that returned a 200 code. And then, it tries to click the send button:

DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:57443/session/e2bba2617ae371c7e895da7/element/5dcd1bb7-b844-4662-9bde-47bb952cd3f8/click {"id": "5dcd1bb7-b844-4662-9bde-47bb952cd3f8"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:57443 "POST /session/e2bba2617ae371c7e895da7/element/5dcd1bb7-b844-4662-9bde-47bb952cd3f8/click HTTP/1.1" 400 590
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
INFO:root:could not find chat input or chat toggle

And for some reason, that one returns a 400 code. The click is done using a chat_send element, that is initialized with:

        chat_send = browser.find_elements_by_css_selector('[aria-label="Send message"]')[0]

The chat write / chat send block is a conditional, if chat_send.is_enabled(). So we could assume chat_send is somewhat properly initialized.

If I connect to demo.bigbluebutton.org, create a test room (I'm not certain they're using 2.3.3, TBH) ... Right click on the chat send button, "Inspect", look around:

inspectbbbsendbutton

There's that button:

<button aria-label="Send message" aria-disabled="false" class="md--Q7ug4 buttonWrapper--x8uow sendButton--Z93EzE" type="submit" data-test="sendMessageButton" position="bottom" id="tippy-46"><span class="button--Z2dosza md--Q7ug4 primary--1IbqAO circle--Z2c8umk"><i class="icon--2q1XXw icon-bbb-send"></i></span><span class="label--Z12LMR3 hideLabel--2vEtaU">Send message</span></button>

Which seems to be consistent with the browser.find_elements_by_css_selector('[aria-label="Send message"]')[0] we have in stream.py.

I would assume this element is also present, in your case. Otherwise I'm not sure why go into the if block that should submit a message. Although I'm unclear why you would get an error trying to click the post button.

mtsonline commented 3 years ago

thanks Samuel for pointing out where we stand. Maybe we should ask some questions ... Is the streaming on the same server as the BBB? Is a firewall active? Did you change something in nginx? Or have you set up any other security tools?

philou511 commented 2 years ago

do you get any prompt / dialogue when you open the join url in your browser? Or are you getting right into the meeting?

Hey @mtsonline I am also facing the same issue but I do get a prompt window I try to join with the url which script generates.

Join URL : - https://class.videowiki.pt/bigbluebutton/api/join?meetingID=XXX&fullName=Live&password=XXX&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&joinViaHtml5=true&checksum=XXX

Prompt :- We need your permission to play Audio

Screenshot from 2021-05-21 15-47-22

Hello, I also have this same problem : when I try the full URL from liveStreaming into a browser, I have this popup window, and in the command line I see these errors :

INFO:root:Waiting for chat input window to appear. Traceback (most recent call last): File "stream.py", line 262, in <module> bbb_browser() File "stream.py", line 190, in bbb_browser browser.execute_script("document.getElementById('container').setAttribute('style','margin-bottom:30px');") File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 636, in execute_script 'args': converted_args})['value'] File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.JavascriptException: Message: javascript error: Cannot read property 'setAttribute' of null (Session info: chrome=91.0.4472.77)

I have BBB 2.5 installed... but it is still compatable with _userdata-bbb_skip_checkaudio=true as I see in the documentation pages of BBB... Thank you for your help.