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

Cannot test SPFX webparts on my SharePoint tenancy

Open NPrice99 opened this issue 9 years ago • 22 comments

Thank you for reporting an issue or suggesting an enhancement. We appreciate your feedback - to help the team to understand your needs, please complete the below template to ensure we have the necessary details to assist you.

Category

  • [ ] Question
  • [ ] Typo
  • [X ] Bug
  • [ ] Enhancement / Suggestion
  • [ ] Additional article idea

Expected or Desired Behavior

I expect to see by newly created webpart included in the webparts on my tenancy / workbench.

Observed Behavior

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.

This works fine if I use my localhost.

Steps to Reproduce

I followed "Build Your First Webart" but changed the name of the webpart, the directory it was in etc to reflect the name of my webpart which works fine with Release 5. It is called SiteInfo and uses React ( due to not setting a javascript web framework causes other problems - #394 - Error - typescript - node_modules@types\lodash\index.d.ts(245,25): error TS2304: Cannot find name 'Partial'. ) type gulp trust-dev-cert followed by gulp serve.

If you navigate to your tenancy and _layouts/15/workbench.aspx you get the error message.

NPrice99 avatar Jan 29 '17 20:01 NPrice99

I have reproduced the problem using the "Build Your First WebPart" instructions. Works on localhost but not in my Tenancy (tried two different Tenancies)

NPrice99 avatar Jan 29 '17 23:01 NPrice99

@pgonzal

manishgarg1 avatar Jan 31 '17 06:01 manishgarg1

This is the output from the 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

NPrice99 avatar Jan 31 '17 11:01 NPrice99

I can get it to work in Chrome if I load https://localhost:4321/temp/manifests.js first having switched off loading unsafe scripts.

NPrice99 avatar Jan 31 '17 12:01 NPrice99

Hi @NPrice99 - Can you paste the output of

gulp --tasks

and

gulp trust-dev-cert

patmill avatar Jan 31 '17 17:01 patmill

C:\Users\price\OneDrive\Documents\SPFx\Projects\SiteInfo-WebPart-RC0>gulp --tasks [17:23:41] Using gulpfile ~\OneDrive\Documents\SPFx\Projects\SiteInfo-WebPart-RC0\gulpfile.js [17:23:41] Tasks for ~\OneDrive\Documents\SPFx\Projects\SiteInfo-WebPart-RC0\gulpfile.js [17:23:41] ├── clean [17:23:41] ├── build [17:23:41] ├── default [17:23:41] ├── bundle [17:23:41] ├── dev-deploy [17:23:41] ├── deploy-azure-storage [17:23:41] ├── package-solution [17:23:41] ├── test [17:23:42] ├── serve [17:23:42] ├── trust-dev-cert [17:23:42] └── untrust-dev-cert

C:\Users\price\OneDrive\Documents\SPFx\Projects\SiteInfo-WebPart-RC0>

C:\Users\price\OneDrive\Documents\SPFx\Projects\SiteInfo-WebPart-RC0>gulp trust-dev-cert Build target: DEBUG [17:25:20] Using gulpfile ~\OneDrive\Documents\SPFx\Projects\SiteInfo-WebPart-RC0\gulpfile.js [17:25:20] Starting gulp [17:25:20] Starting 'trust-dev-cert'... [17:25:20] Starting subtask 'trust-cert'... [17:25:21] Finished subtask 'trust-cert' after 304 ms [17:25:21] Finished 'trust-dev-cert' after 306 ms [17:25:21] ==================[ Finished ]================== [17:25:22] Project site-info-web-part-rc-0 version: 0.0.1 [17:25:22] Build tools version: 1.1.0 [17:25:22] Node version: v4.5.0 [17:25:22] Total duration: 13 s

C:\Users\price\OneDrive\Documents\SPFx\Projects\SiteInfo-WebPart-RC0>

NPrice99 avatar Jan 31 '17 17:01 NPrice99

@iclanton - can you take a look at this?

patmill avatar Jan 31 '17 21:01 patmill

any news on this ?

NPrice99 avatar Feb 05 '17 10:02 NPrice99

What does your serve.json look like?

What platform are you on? Can you try deleting the <homedir>/.gcb-serve-data directory and running gulp trust-dev-cert again?

iclanton avatar Feb 08 '17 21:02 iclanton

in /config the serv.json is { "port": 4321, "initialPage": "https://localhost:5432/workbench", "https": true, "api": { "port": 5432, "entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/" } }

in /node_modules@microsoft\sp-webpart-workbench\config { "port": 4321, "initialPage": "https://localhost:5432/workbench", "https": true, "tryCreateDevCertificate": true, "api": { "port": 5432, "entryPath": "lib/api/" } }

deleted .gcb-serve-data which was dated February 2016.

gulp trust-dev-cert Build target: DEBUG [23:27:01] Using gulpfile ~\Documents\Projects\helloworld-webpart-rc0\gulpfile.js [23:27:01] Starting gulp [23:27:01] Starting 'trust-dev-cert'... [23:27:01] Starting subtask 'trust-cert'... [23:27:11] [trust-cert] Attempting to trust a dev certificate. This self-signed certificate only points to localhost and will be stored in your local user profile to be used by other instances of gulp-core-build-serve. If you do not consent to trust this certificate, click "NO" in the dialog. [23:27:27] Finished subtask 'trust-cert' after 25 s [23:27:27] Finished 'trust-dev-cert' after 25 s [23:27:27] ==================[ Finished ]================== [23:27:28] Project helloworld-webpart-rc-0 version: 0.0.1 [23:27:28] Build tools version: 1.1.0 [23:27:28] Node version: v6.9.4 [23:27:28] Total duration: 44 s

and hey presto it worked !

image

Thank You Pat and Ian !

NPrice99 avatar Feb 08 '17 23:02 NPrice99

@NPrice99 Can you please tell us the exact steps to repro? I have tried with different tenants and different hello-world solutions and not able to repro.

Thanks!

chakkaradeep avatar Feb 12 '17 03:02 chakkaradeep

@chakkaradeep - it worked after the fix by Ian (see above)

NPrice99 avatar Feb 12 '17 08:02 NPrice99

I encountered the same problem with the SharePoint Context Workbench. I deleted .gcb-serve-data directory and executed gulp trust-dev-cert again but no success result. I opened the same page with Chrome and it works. I could add my webpart. So, with IE 11 and Firework it fails and with Chrome it works. Somebody have an explanation ? Thanks.

aminezemzemi avatar May 15 '17 15:05 aminezemzemi

If you believe there is still a problem here, could you reopen this issue and include repro steps? Right now no one is tracking it.

octogonz avatar May 15 '17 18:05 octogonz

How can I reopen this issue ? Should I create a new ticket ?

aminezemzemi avatar May 16 '17 08:05 aminezemzemi

I reopened it. Please add you repro steps

octogonz avatar May 16 '17 19:05 octogonz

I am getting this issue intermittently in chrom, on both my home PC and Work PC. In my case Internet explorer always works, but chrome does not work, I deleted .gcb-serve-data and re-ran gulp-trust dev cert, This seemed to fix the issue when I had it last week, but today th is not working.. Here is my console output: log

Again , it was woking fine this morning, but then stopped working. I think I may have ran fiddler whule debugging. Not sure if that's what broke it.

russgove avatar May 22 '17 16:05 russgove

Nigel--- thanks for that tip "I can get it to work in Chrome if I load https://localhost:4321/temp/manifests.js first having switched off loading unsafe scripts."

That seems to be a workaround until the issue is fixed.

russgove avatar May 22 '17 16:05 russgove

For me I stopped using IE because it doesn't work. No problem with chrome.

aminezemzemi avatar May 22 '17 16:05 aminezemzemi

Just a note: my source Maps sopped working in chrome as well. That may be a clue.

russgove avatar May 22 '17 18:05 russgove