# window.getSelection() is null React Error with SDK 1.9.0 when Waiting Room is on

**URL:** <https://devforum.zoom.us/t/window-getselection-is-null-react-error-with-sdk-1-9-0-when-waiting-room-is-on/42524>\
**Category:** Web\
**Created:** [February 4, 2021, 9:11am UTC](https://devforum.zoom.us/t/window-getselection-is-null-react-error-with-sdk-1-9-0-when-waiting-room-is-on/42524 "2021-02-04T09:11:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexmayo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alexmayo/32/27289_2.png) [@alexmayo](https://devforum.zoom.us/u/alexmayo)\
**Post date:** [February 4, 2021, 9:11am UTC](https://devforum.zoom.us/t/window-getselection-is-null-react-error-with-sdk-1-9-0-when-waiting-room-is-on/42524/1 "2021-02-04T09:11:32Z")

</div>

**Description**  
If waiting room is turned on with SDK 1.9.0, I am receiving an error in the console stating `window.getSelection() is null`. This only happens if the waiting room is on while the attendee is trying to join. If they are manually placed into the meeting room when the meeting is already in progress, this doesn’t happen.

**Error**

```auto
TypeError: window.getSelection() is null
    removeUserSelectStyles https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    value https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    React 10
    notify https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    notifyNestedSubs https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    notifySubscribers https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    handleChangeWrapper https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    Redux 3
    xe https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    n Redux
    handleOnMessage https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    handleOnMessage https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    onmessage https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    a https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    React 7
    notify https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    notifyNestedSubs https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    notifySubscribers https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    handleChangeWrapper https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    Redux 3
    vn https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    promise callback*vn/</< https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    vn https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    Redux 2
    value https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    x https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    D https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    y https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    promise callback*y https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    z https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    t https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    t https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    setInterval handler*join https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    success https://virtual.angel.events/648-221-650/zoom-meeting:108
    M https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    value https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    x https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    init https://source.zoom.us/zoom-meeting-1.9.0.min.js:2
    success https://virtual.angel.events/648-221-650/zoom-meeting:95
    jQuery 6
    joinSession https://virtual.angel.events/648-221-650/zoom-meeting:80
    <anonymous> https://virtual.angel.events/648-221-650/zoom-meeting:156
    setTimeout handler* https://virtual.angel.events/648-221-650/zoom-meeting:155
    react-dom.min.js:117:150

```

**Which version?**  
1.9.0

**Init Config**

```http
debug: false,
leaveUrl: 'http://localhost:80',
showMeetingHeader: false,
isSupportAV: true,
isSupportQA: true,
isShowJoiningErrorDialog: false,
showPureSharingContent: false,
sharingMode: 'fit'

```

**Join Config**

```http
debug: false,
signature: signature,
apiKey: config.apiKey,
meetingNumber: config.meetingNumber,
userName: config.userName,
userEmail: config.userEmail, 
passWord: config.passWord

```

**Screenshots**  
Video of issue: [https://streamable.com/xdl2g5](https://streamable.com/xdl2g5)

 ![Screenshot 2021-02-04 at 08.57.52](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/9/4/94fbf4d11acf9ce44c691ae607bfc4012554cd87.png)

**Device (please complete the following information):**

- Device: MacBook Pro
- OS: MacOS
- Version: 11.0
- Browser: Firefox 85.0

---

<div class="post-metadata">

**Author:** ![alexmayo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alexmayo/32/27289_2.png) [@alexmayo](https://devforum.zoom.us/u/alexmayo)\
**Post date:** [February 4, 2021, 9:14am UTC](https://devforum.zoom.us/t/window-getselection-is-null-react-error-with-sdk-1-9-0-when-waiting-room-is-on/42524/2 "2021-02-04T09:14:12Z")

</div>

After some experimentation, this only happens if the SDK is embedded in an iFrame. It’s not supported officially by Zoom, so I’ll see if there’s a workaround…

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [February 4, 2021, 11:35pm UTC](https://devforum.zoom.us/t/window-getselection-is-null-react-error-with-sdk-1-9-0-when-waiting-room-is-on/42524/3 "2021-02-04T23:35:48Z")

</div>

Thanks for sharing your findings @alexmayo ! 🙂

-Tommy

---

<div class="post-metadata">

**Author:** ![alexmayo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alexmayo/32/27289_2.png) [@alexmayo](https://devforum.zoom.us/u/alexmayo)\
**Post date:** [February 5, 2021, 7:51am UTC](https://devforum.zoom.us/t/window-getselection-is-null-react-error-with-sdk-1-9-0-when-waiting-room-is-on/42524/4 "2021-02-05T07:51:00Z")

</div>

No worries.

Just curious! Is there a reason that Zoom doesn’t officially support using iframes with the WebSDK? We’ve been using it for a while now and 99.9% of the features work exactly as expected, there are just a few edge cases like my issue above.

Cheers,  
Al

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [February 5, 2021, 10:43pm UTC](https://devforum.zoom.us/t/window-getselection-is-null-react-error-with-sdk-1-9-0-when-waiting-room-is-on/42524/5 "2021-02-05T22:43:50Z")

</div>

Hey @alexmayo ,

The Web SDK was not designed to work within an iFrame so there could be some issues. We are working to make the Web SDK more flexible to give the developer the ability to configure / customize it further, instead of having to use an iFrame. Stay tuned:

> **[Web SDK - Upcoming Changes - Stay Up To Date - Documentation](https://marketplace.zoom.us/docs/guides/stay-up-to-date/upcoming-changes/web-sdk)**
>
> Web SDK 1.9.0
> 
> The following items are scheduled to be released on February 01, 2021. Note that the release date is subject to change.
> 
> Added
> 
> Added sup...

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [March 8, 2021, 8:44am UTC](https://devforum.zoom.us/t/window-getselection-is-null-react-error-with-sdk-1-9-0-when-waiting-room-is-on/42524/6 "2021-03-08T08:44:13Z")

</div>

Closed on March 8, 2021, 8:44am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
