Forum Discussion
ofergalinIsrael
Jun 22, 2024Copper Contributor
workbench.aspx break when clicking "Preview"
On every web part I develop, running in /_layouts/15/workbench.aspx of all tenants I have access to, clicking the preview to debug, causes an error:
"Uncaught Error Error: The value for "domElement" must not be null
at e.isNotNullOrUndefined (res-1.cdn.office.net/files/sp-client/sp-webpart-workbench-assembly_en-us_a25d16d016d17db18ed91fbf7b537caf.js:20:183787"
I see it was reported in https://stackoverflow.com/ but no explanation or solution.
Please fix our workbench! Lots of SPFx developers are stock now.
Thank you
- jfgagnonCopper Contributor
Same problem. I need preview to build a mobile interface to my spo app.
Fed up of microsoft to the brim. They fool around and we developer find out. - Lucas_MachadoCopper ContributorSame issue here 😞
- sai_sankar_matamCopper ContributorIm facing the same issue
- ofergalinIsraelCopper ContributorYou and everyone else on this planet, which uses the workbench. 😒
But since it has nothing to do with copilot, it is not important. 😊
ofergalinIsrael Craig-Pulliam abdul-alhariri
Try this:
- Create a site page in any of your SharePoint site for testing SPFx web part
- After running gulp serve command, instead of using workbench URL, use URL like:
https://contoso.sharepoint.com/sites/MySite/SitePages/TestingPageName.aspx?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js
Similar thread: SPFx workbench crashes when I try to enter "Preview" mode
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- ofergalinIsraelCopper Contributor
ganeshsanap I know I can do this but there are limitations.
Most My webparts are full page and deployed as app. So, development is best in the workbench.
I found out I can work with it without hitting preview.
I just don't understand why MS can't figure a fi,x for a month now, to a product they brag about as a tool for SPFx.
- Craig-Pulliam
Microsoft
I’m seeing this issue as well. - abdul-alhaririCopper ContributorI'm having same problem. it seems React version issue. If started a web part without using react, it works fine!
- ofergalinIsraelCopper Contributor
abdul-alharirialhariri So no longer React support for SPFx?