SPFx Copilot Components - doesnt run on CopilotWorkBench and not deployed to teams
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
๐ฅ SharePoint Framework
Developer environment
macOS
What browser(s) / client(s) have you tested
- [ ] ๐ฅ Internet Explorer
- [x] ๐ฅ Microsoft Edge
- [ ] ๐ฅ Google Chrome
- [ ] ๐ฅ FireFox
- [ ] ๐ฅ Safari
- [ ] mobile (iOS/iPadOS)
- [ ] mobile (Android)
- [ ] not applicable
- [ ] other (enter in the "Additional environment details" area below)
Additional environment details
- SPFx version. 1.24.0-beta.2
- Node.js version : v22.21.1
Describe the bug / error
I created a new Copilot Component; use the React Framework, and when tested in Copilot Workbench, the component does not show
Link to the project: https://github.com/joaojmendes/copilot-app-helloWorld
Steps to reproduce
- Create a project with yo and select the Copilot component and React Framework
- Run npm start to open Copilot Workbench
- Select the tool, click "Fire Turn",
- In the console, we got some errors
The app does not show
Expected behavior
The App should be loaded and shown.
Iโm also experiencing the same error of @joaojmendes (same version / configuration).
@joaojmendes / @fredupstair : please repro this and save the console log and network trace (HAR) file and share with me ([email protected]). We'll investigate and report back.
@nick-pape / @iclanton : FYI
Iโm also experiencing the same error of @joaojmendes (same version / configuration). State keeps on connecting and never loads the components. Getting errors in browser's console complaining All promises were rejected.
@pragupt6 : can you capture browser console logs (log file) and network trace (har file) and send to [email protected]. Thx!
@jansenbe just sent you the file
Thanks @pragupt6. Initial analysis showed your repro having the same root cause as the one shared by @fredupstair . Engineering is looking into this as we speak
I also hit the same issue immediately. Hoping it gets resolved. I tried everything I could on my end aside from another machine. Is that worth a try since it works for some people? Thanks for the help!
@React365-Chris : the issue has to with our service worker not getting properly installed, I'll check with engineering if there's some workarounds here. We're pushing out an update that will help but that takes some time to reach prod tenants, we're investigating if we can accelerate that deployment.
Thanks for the update @jansenbe, really appreciated. Please let us know if you'd like us to run any other tests on our side. Iโm available to help.
Facing the same issue..
Same symptom here (1.24.0-beta.2, unmodified React scaffold fails identically to our own components), with a diagnostic that may help narrow it server-side:
The turn iframe's host page is being served as an empty shell. Each fired turn loads /_layouts/15/PortableComponent.aspx?...componentType=CopilotComponent..., and on our tenant that page returns HTTP 200 with ~252 bytes: a single inline timing script (g_duration etc.) in the head and a completely empty <body> โ no component bootstrap markup or scripts at all. The component bundle is never even requested, so the bridge handshake can't start. That's consistent with @jansenbe's service-worker note: the failure is upstream of anything client-side.
Quick check anyone can run from the browser console on an affected tenant (any authenticated SharePoint page):
fetch('/_layouts/15/PortableComponent.aspx?componentType=CopilotComponent', { credentials: 'include' })
.then(r => r.text())
.then(t => console.log('bytes:', t.length, 'body:', (t.match(/<body[^>]*>([\s\S]*?)<\/body>/i)?.[1] || '').trim().length));
On our tenant this prints bytes: ~252, body: 0 โ unchanged as of today (checked Jul 19, 21, 22).
Timeline detail that may be useful: on Jul 15 the Workbench auto-listed components (dev server running) and the console showed service-worker errors during the stall. Since Jul 19 the Workbench no longer auto-lists localhost components (?debugManifestsFile= is required), the service-worker console errors are gone, and the iframe now reaches "Iframe loaded" in the event log โ but PortableComponent.aspx still serves the empty shell, so the turn sticks at "Connecting".
Happy to send HAR + console logs to [email protected] if another repro is useful.
Same here... still have the same errors ... :(
@joaojmendes : still issues in workbench or in Copilot?
Hi @jansenbe, I still have the same issue too.
Still facing the issue in Copilot Component Workbench..
Same here, issue remains unresolved. Why/how would this work for some and not others? Is there a configuration change that can be made so we can get started?
@joaojmendes / @ShanidGafoor / @React365-Chris : can you reproduce the issue and capture the console log and network traffic (har file) and share with me via [email protected]. We've done multiple fixes for this, but most have not reached production yet (ETA and of next week). These traces will help engineering confirm their fixes are covering all the scenarios. Thx!
@jansenbe , Here are the console logs and HAR file! I have errors on Workbench. I am trying to get it working first on Workbench before testing on Copilot. I tested in 2 different tenants; same results.
Thank you, @jansenbe
I can confirm I also get the same experience and happy to help test in anyway.
Thanks for all the hard work @jansenbe and @VesaJuvonen. ๐๐งก
@joaojmendes / @React365-Chris / @PopWarner / @fredupstair / @pragupt6 / @nolanhurlburt / @ShanidGafoor
Can you verify if your account or your tenant is set to use targeted release? If not, can you try setting your user or tenant in targeted release and see if that makes a difference?