4

I am using the SPFX and I have created my webpart using SPFX and gulp serve is running on my development machine but when I try and test the web part on my tenancy I get this error message :

Your web part will not appear in the toolbox. Please make sure "gulp serve" is running in a web part project. Please refresh the page once "gulp serve" is running.

What is wrong ?


This is the complete output from debugger :-

> SCRIPT5022: SyntaxError workbench.aspx (1370,159) SCRIPT5022: > SyntaxError workbench.aspx (1370,383) Address not found for module > name: https://localhost:4321/temp/manifests.js. Using it as absolute > URL. sp-loader_en-us_4ec28636b0f9b465bd02537852aebf16.js (61,16921) > Address not found for module name: > https://prod.msocdn.com/16.00.1612.006/en-US/JSC/CoreMinShellG2BundleA.js. > Using it as absolute URL. > sp-loader_en-us_4ec28636b0f9b465bd02537852aebf16.js (61,16921) Address > not found for module name: http://localhost:4321/temp/manifests.js. > Using it as absolute URL. > sp-loader_en-us_4ec28636b0f9b465bd02537852aebf16.js (61,16921) > SEC7111: HTTPS security is compromised by > http://localhost:4321/temp/manifests.js workbench.aspx SEC7111: HTTPS > security is compromised by http://localhost:4321/temp/manifests.js > workbench.aspx Failed to load debug manifests: Error: Error loading > debug manifest script. (Error) Ensure loading unsafe scripts is > allowed. > sp-webpart-workbench_en-us_39ef50033945fc049b9666f1cf113ad0.js > (47,1232) SCRIPT5022: SyntaxError workbench.aspx (1353,318) > SCRIPT5022: SyntaxError SuiteServiceProxy.aspx (1370,159) SCRIPT5022: > SyntaxError SuiteServiceProxy.aspx (1370,383) HTTP401: DENIED - The > requested resource requires user authentication. GET - > https://portal.office.com/SuiteServiceProxy.aspx?upn=pricen%40njpenterprises.com&suiteServiceReturnUrl=https%3A%2F%2Fnjpenterprises.sharepoint.com%2Fsites%2Fdev%2Fspfx%2F_layouts%2F15%2Fworkbench.aspx&returnUrl=https%3A%2F%2Fnjpenterprises.sharepoint.com%2Fsites%2Fdev%2Fspfx%2F_layouts%2F15%2Fworkbench.aspx&Silent=1 > HTTP401: DENIED - The requested resource requires user authentication. > GET - > https://portal.office.com/SuiteServiceProxy.aspx?upn=pricen%40njpenterprises.com&suiteServiceReturnUrl=https%3A%2F%2Fnjpenterprises.sharepoint.com%2Fsites%2Fdev%2Fspfx%2F_layouts%2F15%2Fworkbench.aspx&returnUrl=https%3A%2F%2Fnjpenterprises.sharepoint.com%2Fsites%2Fdev%2Fspfx%2F_layouts%2F15%2Fworkbench.aspx&Silent=1 > HTTP401: DENIED - The requested resource requires user authentication. > GET - > https://portal.office.com/SuiteServiceProxy.aspx?upn=pricen%40njpenterprises.com&suiteServiceReturnUrl=https%3A%2F%2Fnjpenterprises.sharepoint.com%2Fsites%2Fdev%2Fspfx%2F_layouts%2F15%2Fworkbench.aspx&returnUrl=https%3A%2F%2Fnjpenterprises.sharepoint.com%2Fsites%2Fdev%2Fspfx%2F_layouts%2F15%2Fworkbench.aspx&Silent=1 > SEC7111: HTTPS security is compromised by > ms-appx-web://microsoft.microsoftedge/assets/errorpages/forbidframingedge.htm SEC7111: HTTPS security is compromised by > ms-appx-web://microsoft.microsoftedge/Assets/ErrorPages/httpErrorPagesScripts.js > SEC7111: HTTPS security is compromised by > ms-appx-web://microsoft.microsoftedge/assets/errorpages/ErrorPageStyles.css > HTTP404: NOT FOUND - The server has not found anything matching the > requested URI (Uniform Resource Identifier). GET - > https://clientlog.portal.office.com/l.l/?d={m:[{t:408369,l:1,ct:1485861571727,a:["O365SuiteService%252Fapi%252FAppLauncherCustomization%252FUser%252FAppsCustomizationDataTEST"]},{t:171063,l:1,ct:1485861564314,a:["P1","5098","PL","9125","CM1","8985","CM2","8986","C1","9750","C2","9767","M_C","1","M_L","Mouse","SC1","9213","RC1","9439","RC2","9523","R1","9807","M2","9816","PR","9912","R2","9914","S1","10636","D1","10665","I1","10718","S2","10729","I2","13502","D2","14008","G1","14014","G2","14020","M3","14097","I1","16302","I2","19227"]},{t:175272,l:1,ct:1485861583752,a:["https%253A%252F%252Fportal.office.com%252FSuiteServiceProxy.aspx%253Fupn%253Dpricen%252540njpenterprises.com%2526suiteServiceReturnUrl%253Dhttps%25253A%25252F%25252Fnjpenterprises.sharepoint.com%25252Fsites%25252Fdev%25252Fspfx%25252F_layouts%25252F15%25252Fworkbench.aspx%2526returnUrl%253Dhttps%25253A%25252F%25252Fnjpenterprises.sharepoint.com%25252Fsites%25252Fdev%25252Fspfx%25252F_layouts%25252F15%25252Fworkbench.aspx"]},{t:421422,l:6,ct:1485861583763,a:["Cannot%2520access%2520https%253A%252F%252Fportal.office.com%252FSuiteServiceProxy.aspx%253Fupn%253Dpricen%252540njpenterprises.com%2526suiteServiceReturnUrl%253Dhttps%25253A%25252F%25252Fnjpenterprises.sharepoint.com%25252Fsites%25252Fdev%25252Fspfx%25252F_layouts%25252F15%25252Fworkbench.aspx%2526returnUrl%253Dhttps%25253A%25252F%25252Fnjpenterprises.sharepoint.com%25252Fsites%25252Fdev%25252Fspfx%25252F_layouts%25252F15%25252Fworkbench.aspx"]},{t:410681,l:4,ct:1485861583765,a:["https%253A%252F%252Fportal.office.com%252Fapi%252Fmyapps%252FGetAllApps","GET"]},{t:421432,l:1,ct:1485861583891,a:["0"]},{t:175261,l:1,ct:1485861598529,a:["dd677c9b-d582-4b9b-b380-45349acac10e"]}],a:["s","Sharepoint","shpid","1485861564314","shsid","af21b00a-be43-441e-a6b2-02828b189b84","u","3b756550-4641-468c-9e77-bd03f923f959","t","4e7056d6-0830-41be-a136-93b24c588169","p","10037FFE8190ABEB","c","false","sid","b7a308bf-338a-4061-a7fb-c71931e07a34"]}&cb=1485861628532 > HTTP404: NOT FOUND - The server has not found anything matching the > requested URI (Uniform Resource Identifier). GET - > https://clientlog.portal.office.com/l.l/?d={m:[{t:408369,l:1,ct:1485861571727,a:["O365SuiteService%252Fapi%252FAppLauncherCustomization%252FUser%252FAppsCustomizationDataTEST"]},{t:171063,l:1,ct:1485861564314,a:["P1","5098","PL","9125","CM1","8985","CM2","8986","C1","9750","C2","9767","M_C","1","M_L","Mouse","SC1","9213","RC1","9439","RC2","9523","R1","9807","M2","9816","PR","9912","R2","9914","S1","10636","D1","10665","I1","10718","S2","10729","I2","13502","D2","14008","G1","14014","G2","14020","M3","14097","I1","16302","I2","19227"]},{t:175272,l:1,ct:1485861583752,a:["https%253A%252F%252Fportal.office.com%252FSuiteServiceProxy.aspx%253Fupn%253Dpricen%252540njpenterprises.com%2526suiteServiceReturnUrl%253Dhttps%25253A%25252F%25252Fnjpenterprises.sharepoint.com%25252Fsites%25252Fdev%25252Fspfx%25252F_layouts%25252F15%25252Fworkbench.aspx%2526returnUrl%253Dhttps%25253A%25252F%25252Fnjpenterprises.sharepoint.com%25252Fsites%25252Fdev%25252Fspfx%25252F_layouts%25252F15%25252Fworkbench.aspx"]},{t:421422,l:6,ct:1485861583763,a:["Cannot%2520access%2520https%253A%252F%252Fportal.office.com%252FSuiteServiceProxy.aspx%253Fupn%253Dpricen%252540njpenterprises.com%2526suiteServiceReturnUrl%253Dhttps%25253A%25252F%25252Fnjpenterprises.sharepoint.com%25252Fsites%25252Fdev%25252Fspfx%25252F_layouts%25252F15%25252Fworkbench.aspx%2526returnUrl%253Dhttps%25253A%25252F%25252Fnjpenterprises.sharepoint.com%25252Fsites%25252Fdev%25252Fspfx%25252F_layouts%25252F15%25252Fworkbench.aspx"]},{t:410681,l:4,ct:1485861583765,a:["https%253A%252F%252Fportal.office.com%252Fapi%252Fmyapps%252FGetAllApps","GET"]},{t:421432,l:1,ct:1485861583891,a:["0"]},{t:175261,l:1,ct:1485861598529,a:["dd677c9b-d582-4b9b-b380-45349acac10e"]}],a:["s","Sharepoint","shpid","1485861564314","shsid","af21b00a-be43-441e-a6b2-02828b189b84","u","3b756550-4641-468c-9e77-bd03f923f959","t","4e7056d6-0830-41be-a136-93b24c588169","p","10037FFE8190ABEB","c","false","sid","b7a308bf-338a-4061-a7fb-c71931e07a34"]}&cb=1485861628532 > HTTP404: NOT FOUND - The server has not found anything matching the > requested URI (Uniform Resource Identifier). GET - > https://clientlog.portal.office.com/l.l/?d={m:[{t:408369,l:1,ct:1485861571727,a:["O365SuiteService%252Fapi%252FAppLauncherCustomization%252FUser%252FAppsCustomizationDataTEST"]},{t:171063,l:1,ct:1485861564314,a:["P1","5098","PL","9125","CM1","8985","CM2","8986","C1","9750","C2","9767","M_C","1","M_L","Mouse","SC1","9213","RC1","9439","RC2","9523","R1","9807","M2","9816","PR","9912","R2","9914","S1","10636","D1","10665","I1","10718","S2","10729","I2","13502","D2","14008","G1","14014","G2","14020","M3","14097","I1","16302","I2","19227"]},{t:175272,l:1,ct:1485861583752,a:["https%253A%252F%252Fportal.office.com%252FSuiteServiceProxy.aspx%253Fupn%253Dpricen%252540njpenterprises.com%2526suiteServiceReturnUrl%253Dhttps%25253A%25252F%25252Fnjpenterprises.sharepoint.com%25252Fsites%25252Fdev%25252Fspfx%25252F_layouts%25252F15%25252Fworkbench.aspx%2526returnUrl%253Dhttps%25253A%25252F%25252Fnjpenterprises.sharepoint.com%25252Fsites%25252Fdev%25252Fspfx%25252F_layouts%25252F15%25252Fworkbench.aspx"]},{t:421422,l:6,ct:1485861583763,a:["Cannot%2520access%2520https%253A%252F%252Fportal.office.com%252FSuiteServiceProxy.aspx%253Fupn%253Dpricen%252540njpenterprises.com%2526suiteServiceReturnUrl%253Dhttps%25253A%25252F%25252Fnjpenterprises.sharepoint.com%25252Fsites%25252Fdev%25252Fspfx%25252F_layouts%25252F15%25252Fworkbench.aspx%2526returnUrl%253Dhttps%25253A%25252F%25252Fnjpenterprises.sharepoint.com%25252Fsites%25252Fdev%25252Fspfx%25252F_layouts%25252F15%25252Fworkbench.aspx"]},{t:410681,l:4,ct:1485861583765,a:["https%253A%252F%252Fportal.office.com%252Fapi%252Fmyapps%252FGetAllApps","GET"]},{t:421432,l:1,ct:1485861583891,a:["0"]},{t:175261,l:1,ct:1485861598529,a:["dd677c9b-d582-4b9b-b380-45349acac10e"]}],a:["s","Sharepoint","shpid","1485861564314","shsid","af21b00a-be43-441e-a6b2-02828b189b84","u","3b756550-4641-468c-9e77-bd03f923f959","t","4e7056d6-0830-41be-a136-93b24c588169","p","10037FFE8190ABEB","c","false","sid","b7a308bf-338a-4061-a7fb-c71931e07a34"]}&cb=1485861628532 

6 Answers 6

8

Run the below command to install the certificate, note that the certification error in the local workbench also disappears after this.

gulp trust-dev-cert

After this, you can run gulp serve to again see the local workbench and then launch the Office 365 tenant site to see if your locally developed webpart is available to be added on the workbench.aspx.

9
  • Tried this but 1) I still get the certificate error on the local workbench and 2) my locally developed webpart still does not appear on the list of webparts I can add. Commented Jan 29, 2017 at 18:36
  • Is it visible on the the local workbench page, temp/workbench.html ? Try adding the webpart on this page. Also ensure that latest npm package is installed. The version should be 0.4.1 , to install run npm i -g @microsoft/generator-sharepoint@latest this command Commented Jan 30, 2017 at 5:31
  • Yes it is visible on my local workbench (temp/workbench.html). Version 0.4.1 is installed. Still does not work on any of my tenancies. Commented Jan 30, 2017 at 18:19
  • Are you on a dev tenant or a tenant where first release is enabled (not for specific users, but for everyone) ? At my end, I use the https://sitecollectionurl/_layouts/15/workbench.aspx to add webpart, is that page available in your tenant ? Commented Jan 31, 2017 at 11:58
  • I have tried both - yes that page is available on both tenancies Commented Jan 31, 2017 at 12:09
3

If you are using the Edge browser, try Chrome. Does not work in Edge in my experience.

1
  • I had the same issue, deleted .gcb-serve-data and re-ran gulp trust-dev-cert but I still get Your web part will not appear in the toolbox. Please make sure "gulp serve" is running in a web part project. Please refresh the page once "gulp serve" is running. in Edge. Works as expected in Chrome however. Commented Feb 8, 2018 at 19:55
2

Ian Clanton-Thuon (MSFT) showed me the fix saying : delete the <homedir>/.gcb-serve-data directory and running gulp trust-dev-cert again. This worked ! The existing directory was created way back in February 2016 before SPFx came onstream.

1
  • 2
    What is the location of .gcb-serve-data? Actually I did not find the directory under the web part solution directory. Can you please post the actual path? I am facing the same issue. Commented Nov 20, 2017 at 14:01
2

Copying the same comment as above as I it helped me, wasn't able to upvote it:

For anyone else struggling to find the .gcb-serve-data folder, an example path is:

C:/Users/{username}/.gcb-serve-data 
  • Go to cmd & change directory to: cd C:/Users/{username}
  • Then next command: del C:/Users/{username}/.gcb-serve-data
  • After that try gulp trust-dev-cert again
1
  • In 2025 the hidden directory is .rushstack Commented Jan 17 at 14:25
0

For anyone else struggling to find the .gcb-serve-data folder, an example path is...

C:/Users/PCOX/.gcb-serve-data i.e. the same route as wehre the documents, music and downloads libraries are, its also a hidden folder.

0

if the developer certificate already trusted by the command gulp trust-dev-cert then open this URL in new tab

https://localhost:4321/temp/manifests.js 

and try to re-run gulp serve

1
  • Result is "Cannot GET /temp/manifests.js" Commented Jan 17 at 14:14

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.