SharePoint / sp-dev-gdpr-activity-hub

GDPR Activity Hub - Open source starter kit for building a management hub for EU GDPR (European Global Data Protection Regulation).
MIT License
96 stars 47 forks source link

CDN-related error while loading the web parts. #51

Open Mathilda-P opened 6 years ago

Mathilda-P commented 6 years ago

**Hello

I have followed the setup but unfortunately I get an error message when trying to load the web parts in a page of the project on my SharePoint. The message is as following:**

[SPLoaderError.loadComponentError]: ***Failed to load component "d67d6088-e294-4a23-af02-c4ea8783c23f" (GdprInsertEventWebPart).

Original error: ***Failed to load URL 'https://publiccdn.sharepointonline.com/contosogdprswe.sharepoint.com/sites/clientsideassets/ActivityHub/gdprstarterkit-gdprinsertrequeststrings_en-us_3a374bd4fecd98b5af22dc9a8072d8b6.js' for resource 'gdprInsertRequestStrings' in component 'd67d6088-e294-4a23-af02-c4ea8783c23f' (GdprInsertEventWebPart). There was a network problem. This may be a problem with a HTTPS certificate. Make sure you have the right certificate.

INNERERROR: Failed to load URL 'https://publiccdn.sharepointonline.com/contosogdprswe.sharepoint.com/sites/clientsideassets/ActivityHub/gdprstarterkit-gdprinsertrequeststrings_en-us_3a374bd4fecd98b5af22dc9a8072d8b6.js' for resource 'gdprInsertRequestStrings' in component 'd67d6088-e294-4a23-af02-c4ea8783c23f' (GdprInsertEventWebPart). There was a network problem. This may be a problem with a HTTPS certificate. Make sure you have the right certificate.

***CALLSTACK: Error at t (https://spoprod-a.akamaihd.net/files/sp-client-prod_2017-12-29.004/sp-pages-assembly_en-us_f84b940bd26c347833961851c56e827f.js:307:15840) at t (https://spoprod-a.akamaihd.net/files/sp-client-prod_2017-12-29.004/sp-pages-assembly_en-us_f84b940bd26c347833961851c56e827f.js:724:38028) at e.buildErrorWithVerboseLog (https://spoprod-a.akamaihd.net/files/sp-client-prod_2017-12-29.004/sp-pages-assembly_en-us_f84b940bd26c347833961851c56e827f.js:724:43517) at e.buildLoadComponentError (https://spoprod-a.akamaihd.net/files/sp-client-prod_2017-12-29.004/sp-pages-assembly_en-us_f84b940bd26c347833961851c56e827f.js:724:40238) at Anonymous function (https://spoprod-a.akamaihd.net/files/sp-client-prod_2017-12-29.004/sp-pages-assembly_en-us_f84b940bd26c347833961851c56e827f.js:724:12336)


*I figured it might be the CDN-path of the URL on the write-manifests.json file (sites/CDNname/CDNLibrary). Because when I enable the public CDN in the tenant (through this guide: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/hosting-webpart-from-office-365-cdn) the "/CLIENTSIDEASSETS" does not change to "Sites/CDN/CDNFiles". I have tried to write both clientsideassets and sites/CDN/CDNFiles on the write-manifests file.

Any suggestions on how I can move further?**

alidgren commented 6 years ago

Have you tried another browser?, I had this issue when using Chrome on PC, but switch to my Mac and used Chrome...Voila! It worked

PopWarner commented 6 years ago

@Mathilda-P @alidgren I had the same problem.....error'd on Chrome PC. Tried in IE on PC and works fine.

I used IE to put the web part on the page, publish the page and then load in Chrome and still fails. Any ideas on why this is? I'm gonna keep digging as it could be some localized issue on my machine, but this is sorta weird huh?

Thoughts?

F2ch commented 6 years ago

@Mathilda-P @PopWarner Hi all, I've got exactly the same issue... did you resolved this problem ? Thanks

anthonynhn commented 6 years ago

you can try gulp trust-dev-cert before bundle and package-solution ?

harshdamaniahd commented 6 years ago

yes try that

elpinto007 commented 6 years ago

Did this work for anyone? I am having the same issue

kathiravank83 commented 6 years ago

Any fix for this issue? i am getting the same..

anmolsinghchauhan commented 6 years ago

Any update on how to fix it. I am getting the same error.

ksaravind2003 commented 6 years ago

try gulp trust-dev-cert before bundle and package-solution.

helped me in resolving the issue.

Ofer-Gal commented 5 years ago

I have the same error with the "react-todo-basic" demo It is working fine in the workbench.aspx when gulp serve --nobrowser is running but when deploying to a CDN location, there is no "react-todo-basic-todostrings_en-us_d4fe2bb623d36825d3cfdfeb1cfde318.js" file in the \react-todo-basic\dist folder. Is there a way to create this file from the "\react-todo-basic\src\webparts\todo\loc\en-us.js" file?

kodofix commented 5 years ago

Hello,

Today I was manage to solve problem @Ofer-Gal please check your react-todo-basic-todostrings_en-us file, @Mathilda-P check your gdprInsertRequestStrings file on /deploy if there is any weird character in my case it was ` instead ". I change mark in my en-us file under \loc and its work :)

Ofer-Gal commented 5 years ago

From your post, I can't understand which file needs to be fixed

kodofix commented 5 years ago

Sorry for that @Ofer-Gal.

I had similar problem like you with file stringsen-us.js and in my case I opened and close string with ` instead " in one line in /lib/webparts//loc/en-us.js file where I had my strings. Chrome didn't have problem with that but IE throw error about HTTPS certificate problem and point to string_en-us.js file.

Ofer-Gal commented 5 years ago

My file is the same as in the src as was made from the yo. not the same problem

vishaaall commented 5 years ago

having same error, deployment was successful but while loading it starts giving the same error. Was a solution found for this problem.?

Ranjan131 commented 5 years ago

Yes i am also facing the same error for React calendar feed webpart. its working in chrome, but not in IE. Please give the solution as soon as possible.

Note: i have uploaded this solution to App-Catalog not to CDN.

topa3b commented 4 years ago

The same issue is in IE11, Chrome runs like a charm. I can download JS file by link in the IE browser, however it fails to execute in SP page.

prashanthsparks commented 4 years ago

I am also getting same error after following above steps:

Something went wrong If the problem persists, contact the site administrator and give them the information in Technical Details. TECHNICAL DETAILS [SPLoaderError.loadComponentError]: Failed to load component "b8e54bd2-454c-4b1d-90b1-852355cc44eb" (ReactSpFxPnPWebPart). Original error: Failed to load URL 'https://publiccdn.sharepointonline.com/sitecollection/sites/project/Shared%20Documents/CDN/reactspfxpnp-controlstrings_en-us_9d5c960645bbbbf6af0dced2dc36c079.js' for resource 'ControlStrings' in component 'b8e54bd2-454c-4b1d-90b1-852355cc44eb' (ReactSpFxPnPWebPart). There was a network problem. This may be a problem with a HTTPS certificate. Make sure you have the right certificate.

INNERERROR: Failed to load URL 'https://publiccdn.sharepointonline.com/sitecollection/sites/project/Shared%20Documents/CDN/reactspfxpnp-controlstrings_en-us_9d5c960645bbbbf6af0dced2dc36c079.js' for resource 'ControlStrings' in component 'b8e54bd2-454c-4b1d-90b1-852355cc44eb' (ReactSpFxPnPWebPart). There was a network problem. This may be a problem with a HTTPS certificate. Make sure you have the right certificate. ***CALLSTACK: Error at t [as constructor] (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_dcfe147211950575af0e17d26b0ced7b.js:4:53271) at new t (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_dcfe147211950575af0e17d26b0ced7b.js:20:10505) at Function.e.buildErrorWithVerboseLog (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_dcfe147211950575af0e17d26b0ced7b.js:20:53017) at Function.e.buildLoadComponentError (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_dcfe147211950575af0e17d26b0ced7b.js:20:49048) at https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_dcfe147211950575af0e17d26b0ced7b.js:20:44589