# Debugging Web SDK: Problem when page reload and rerun init() then errorCode: 3008?

**URL:** <https://devforum.zoom.us/t/debugging-web-sdk-problem-when-page-reload-and-rerun-init-then-errorcode-3008/44033>\
**Category:** Web\
**Created:** [February 23, 2021, 8:59am UTC](https://devforum.zoom.us/t/debugging-web-sdk-problem-when-page-reload-and-rerun-init-then-errorcode-3008/44033 "2021-02-23T08:59:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alucard001](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alucard001/32/23340_2.png) [@alucard001](https://devforum.zoom.us/u/alucard001)\
**Post date:** [February 23, 2021, 8:59am UTC](https://devforum.zoom.us/t/debugging-web-sdk-problem-when-page-reload-and-rerun-init-then-errorcode-3008/44033/1 "2021-02-23T08:59:04Z")

</div>

Hi all

- I am currently doing a developement using Zoom Web SDK with Zoom sample web app, like this:

```auto
ZoomMtg.init({
    ...
    success: function(res){
        ZoomMtg.join({...})
    },
    error: function(res){...},
});

```

- Since I am doing development, I need to refresh the page a few times

- Which means, the Zoom `meetingNumber` is different each time after refresh

- Here is the scenario: When the page first load, I can create, init and join a meeting as host,

- When I refresh again, I got an error 3008 `Please join meeting first!`, which is normal as I am being seen as doing concurrent meeting

- Now here is my question:

Thank you very much in advance

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [February 23, 2021, 9:56pm UTC](https://devforum.zoom.us/t/debugging-web-sdk-problem-when-page-reload-and-rerun-init-then-errorcode-3008/44033/2 "2021-02-23T21:56:39Z")

</div>

Hey @alucard001,

Thank you for reaching out to the Zoom Developer Forum. First, make sure that when you are attempting to join the meeting you change the role you’re using to `1` and regenerate your signature.

If you would like to leave a meeting when you refresh the page, the best option is to add an event listener to the `unload` or `beforeUnload` events. Within your event listener, you can try calling the `ZoomMtg.leaveMeeting()` function.

I hope that helps! Let me know if you have any questions.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![alucard001](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alucard001/32/23340_2.png) [@alucard001](https://devforum.zoom.us/u/alucard001)\
**Post date:** [February 24, 2021, 12:32am UTC](https://devforum.zoom.us/t/debugging-web-sdk-problem-when-page-reload-and-rerun-init-then-errorcode-3008/44033/3 "2021-02-24T00:32:32Z")

</div>

Hi Max. Yes I am using role 1 when refresh. And since I am using role 1, I got a new meeting id with new sig, and it kept showing the error that I cannot join a new meeting.

Regard to the unload event, I’ll try that and see how it works.

Thank you.

---

<div class="post-metadata">

**Author:** ![alucard001](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alucard001/32/23340_2.png) [@alucard001](https://devforum.zoom.us/u/alucard001)\
**Post date:** [February 24, 2021, 9:25am UTC](https://devforum.zoom.us/t/debugging-web-sdk-problem-when-page-reload-and-rerun-init-then-errorcode-3008/44033/4 "2021-02-24T09:25:43Z")

</div>

Hi Max

The problem is fixed now. Thank you. I use `beforeunload` to do `leaveMeeting()`.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [February 25, 2021, 12:15am UTC](https://devforum.zoom.us/t/debugging-web-sdk-problem-when-page-reload-and-rerun-init-then-errorcode-3008/44033/5 "2021-02-25T00:15:26Z")

</div>

Hey @alucard001,

I’m glad to hear that resolved your issue! Please don’t hesitate to reach out if you encounter any further issues or questions.

Thanks,  
Max

---

<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 27, 2021, 10:15am UTC](https://devforum.zoom.us/t/debugging-web-sdk-problem-when-page-reload-and-rerun-init-then-errorcode-3008/44033/6 "2021-03-27T10:15:46Z")

</div>

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