# Error in panel after creating new artboard

**URL:** <https://forums.creativeclouddeveloper.com/t/error-in-panel-after-creating-new-artboard/1016>\
**Category:** UXP Plugin API\
**Tags:** api-feedback\
**Created:** [July 9, 2019, 6:24pm UTC](https://forums.creativeclouddeveloper.com/t/error-in-panel-after-creating-new-artboard/1016 "2019-07-09T18:24:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Velara](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/velara/32/1278_2.png) [@Velara](https://forums.creativeclouddeveloper.com/u/Velara)\
**Post date:** [July 9, 2019, 6:24pm UTC](https://forums.creativeclouddeveloper.com/t/error-in-panel-after-creating-new-artboard/1016/1 "2019-07-09T18:24:52Z")

</div>

I have an auto export option that runs in the panel `update()` method. This works fine until I created a new artboard. Then I get the following error:

> Plugin Error: Plugin abc123 is not permitted to make changes from the background. Return a Promise to continue execution asynchronously.  
> at convertPluginErrorToString (plugins/PluginErrorUtil.js:1:198)  
> at internalFormatPluginError (plugins/PluginErrorUtil.js:1:1073)  
> at internalReportPluginError (plugins/PluginErrorUtil.js:1:1180)  
> at Object.reportPluginError (plugins/PluginErrorUtil.js:1:1612)  
> at Object.checkAllowedToEdit (plugins/ScenegraphGuard.js:1:1572)  
> at Artboard. (plugins/ScenegraphWrappers.js:1:12614)  
> at setSceneNodePluginData (/Users/qamac/Library/Application Support/Adobe/Adobe XD (Prerelease)/develop/myplugin/main.js:1914:21)

**Steps**

1. Have panel open
2. Have method with await call in the `update()` method. Make sure it works.
3. Create a new artboard with panel open.

---

<div class="post-metadata">

**Author:** ![stevekwak](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/stevekwak/32/48_2.png) [@stevekwak](https://forums.creativeclouddeveloper.com/u/stevekwak)\
**Post date:** [July 9, 2019, 7:31pm UTC](https://forums.creativeclouddeveloper.com/t/error-in-panel-after-creating-new-artboard/1016/2 "2019-07-09T19:31:13Z")

</div>

did you use the `editDocument` method? Any changes to the document requires to be wrapped in this function in the panel world. Docs coming out soon for the general release soon
