# Screen Sharing Error on Mac Safari 18.0.1 After Canceling Permission

**URL:** <https://devforum.zoom.us/t/screen-sharing-error-on-mac-safari-18-0-1-after-canceling-permission/123595>\
**Category:** Web\
**Tags:** video-sdk\
**Created:** [December 30, 2024, 4:10am UTC](https://devforum.zoom.us/t/screen-sharing-error-on-mac-safari-18-0-1-after-canceling-permission/123595 "2024-12-30T04:10:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Betil](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@Betil](https://devforum.zoom.us/u/Betil)\
**Post date:** [December 30, 2024, 4:10am UTC](https://devforum.zoom.us/t/screen-sharing-error-on-mac-safari-18-0-1-after-canceling-permission/123595/1 "2024-12-30T04:10:38Z")

</div>

I’m experiencing an issue with screen sharing on Mac Safari Version 18.0.1 (20619.1.26.31.7). After clicking “Cancel” on the initial screen share permission dialog, all subsequent screen sharing attempts fail with the following error:  
{type: ‘INVALID\_OPERATION’, reason: ‘user deny screen share’}  
However, the permission was allowed as picture shown.  
Here are the relevant details:

- Device type: Mac
- Browser: Safari 18.0.1 (20619.1.26.31.7)
- Error code: INVALID\_OPERATION
- Troubleshooting steps taken:
  - Attempted multiple screen share initiations
  - Verified the issue occurs consistently after initial denial

Below is the code snippet for the screen sharing implementation:  
toggleShare(isShare) {  
if (isShare) {  
if (mediaStream.isStartShareScreenWithVideoElement()) {  
mediaStream.startShareScreen(document.querySelector(‘#chat-share-video’)).then(() =\> {  
$(“#chat-shareVideoContainer”).show();  
$(“#chat-shareCanvasContainer”).removeClass(“flex-align-items-center”);  
$(“#chat-shareCanvasContainer”).hide();  
}).catch((error) =\> {  
adapter.server.SendSysMessage(adapter.currentIceLink.conversationId, “resetShareScreen”, (res) =\> {});  
console.log(‘error =\>’, error)  
})  
} else {  
mediaStream.startShareScreen(document.querySelector(‘#chat-share-canvas’)).then(() =\> {  
$(“#chat-shareVideoContainer”).hide();  
$(“#chat-shareCanvasContainer”).addClass(“flex-align-items-center”);  
$(“#chat-shareCanvasContainer”).show();  
}).catch((error) =\> {  
adapter.server.SendSysMessage(adapter.currentIceLink.conversationId, “resetShareScreen”, (res) =\> {});  
console.log(‘error =\>’, error)  
})  
}  
} else {  
mediaStream.stopShareScreen().then(() =\> {  
adapter.server.SendSysMessage(adapter.currentIceLink.conversationId, “resetShareScreen”, (res) =\> {});  
$(“#chat-shareVideoContainer”).hide();  
$(“#chat-shareCanvasContainer”).removeClass(“flex-align-items-center”);  
$(“#chat-shareCanvasContainer”).hide();  
}).catch((error) =\> {  
console.log(‘error =\>’, error)  
})  
}  
}  
Has anyone encountered this issue or knows a workaround? Any assistance would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [December 30, 2024, 9:59am UTC](https://devforum.zoom.us/t/screen-sharing-error-on-mac-safari-18-0-1-after-canceling-permission/123595/2 "2024-12-30T09:59:49Z")

</div>

Hey @Betil

Thanks for your feedback.

This issue is quite similar to one we encountered before, and it is related to the Safari version. Upgrading Safari to a newer version should resolve the issue.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![Betil](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@Betil](https://devforum.zoom.us/u/Betil)\
**Post date:** [December 31, 2024, 4:43am UTC](https://devforum.zoom.us/t/screen-sharing-error-on-mac-safari-18-0-1-after-canceling-permission/123595/3 "2024-12-31T04:43:22Z")

</div>

Thanks, I’ll try the solution.

---

<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:** [January 30, 2025, 2:44pm UTC](https://devforum.zoom.us/t/screen-sharing-error-on-mac-safari-18-0-1-after-canceling-permission/123595/4 "2025-01-30T14:44:20Z")

</div>

Closed on January 30, 2025, 2:44pm UTC

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