sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Extension failed to load but works in debug without issue

Open theitfactor opened this issue 5 years ago • 9 comments

Category

  • [x] Question
  • [ ] Typo
  • [ ] Additional article idea

Question

I have a an app package that has several web parts and an application extension. When running in development/debug mode it works fine. When I bundle the app and deploy I get:

Uncaught (in promise) Error: Failed to create application customizer 'ClientSideExtension.ApplicationCustomizer.a319c905-0c40-478b-9866-895c6e7e09d3'. Error information is 'Extension failed to load for componentId "a319c905-0c40-478b-9866-895c6e7e09d3".'.
    at sp-pages-assembly_en-us_3a7c8205e7e2b619a5038473c7f52b6d.js:1
    at async Promise.all (index 0)

This error is not giving me an indication as to what the actual error is. When I run gulp serve and access the extension via ?debugManifestsFile=..... It works without issues. How can I figure out what is going on?

Environment details (development & target environment)

This is running SPFX 1.11 in SharePoint online.

theitfactor avatar Feb 03 '21 16:02 theitfactor

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Feb 03 '21 16:02 ghost

I've got the same Problem. I tried to setup the spfx-announcements webpart. In gulp serve everything is working as expected. Once the solution is packaged and deployed, the error occurs: sp-pages-assembly_de-de_017c1eaa45854b943ce72ed2f66bbe51.js:65 Uncaught (in promise) Error: Failed to create application customizer 'ClientSideExtension.ApplicationCustomizer.21f58d40-a86a-419a-9478-84f78b2bf638'. Error information is 'Extension failed to load for componentId "21f58d40-a86a-419a-9478-84f78b2bf638".'. at sp-pages-assembly_de-de_017c1eaa45854b943ce72ed2f66bbe51.js:65 at async Promise.all (index 0)

iStroml avatar Feb 26 '21 13:02 iStroml

I have the same error message when I deploy an application customizer package

iorivera avatar Jun 04 '21 03:06 iorivera

same error in my side... SPFX 1.11.0 node 10.24.1 LTS.

Since one month...

Any news on that?

Saintenr avatar Jun 24 '21 17:06 Saintenr

Ultimately I just kept rebuilding, cleaning, npm install all packages Until it worked. No specific solution sorry.

iorivera avatar Jul 21 '21 02:07 iorivera

On my side the problem was caused by react and reactdom dependencies. I moved them to the dev dependencies and rebuild… That solved my issue.

Saintenr avatar Jul 21 '21 08:07 Saintenr

This one is similar to #7564.

@theitfactor - could you check if you're using @microsoft/sp-http or some other modules without installing them (or maybe you install them as devDependencies when they should be a part of the bundle)?

AJIXuMuK avatar Dec 15 '21 18:12 AJIXuMuK

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within the next 7 days of this comment. Please see our wiki for more information: Issue List Labels: Needs Author Feedback & Issue List: No response from the original issue author

ghost avatar Dec 23 '21 00:12 ghost

Closing issue due to no response from the original author. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: No response from the original issue author

ghost avatar Dec 30 '21 02:12 ghost