Sp-dev-docs: Hosting client-side web part from Office 365 CDN

Created on 14 Feb 2018  Â·  82Comments  Â·  Source: SharePoint/sp-dev-docs

Category

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

I'm trying to host a client-side web part from localhost to CDN, but I'm getting this error:
xglvi

Get-SPOTenantCdnOrigins -CdnType Public commands in Powershell gives me the following result:

Public CDN enabled locations:
*/MASTERPAGE
*/STYLE LIBRARY
*/CLIENTSIDEASSETS

It works fine in localhost enviroment. I followed all the steps from Microsoft's article on an overview of the SharePoint Framework, but to no avail. How would I fix this?

cdn tracked bug-suspected

Most helpful comment

Yes. Problem still remains.

All 82 comments

If you navigate to _https://bhowmiksolutions.sharepoint.com/sites/cat/ClientSideAssets/_, can you see the file in there?

I got the same issue too. I can navigate to that folder and see the files for my web part. When I try to add my web part I can't see my web part and an error message is displayed. Works fine in a local environment for me too.

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 "ad2d1bb3-4545-4887-bff6-d8108673a431" (HelloWorldWebPart).
Original error: *
Failed to load URL 'https://publiccdn.sharepointonline.com/3sa2ahujf.sharepoint.com/sites/apps/ClientSideAssets/a4749a6e-92ef-4c25-9f0c-1da62f722c26/helloworld-webpart-helloworldwebpartstrings_en-us_536e65149b0acf4d52c0043073b9fc59.js' for resource 'HelloWorldWebPartStrings' in component 'ad2d1bb3-4545-4887-bff6-d8108673a431' (HelloWorldWebPart). There was a problem in the server.

INNERERROR:
*
Failed to load URL 'https://publiccdn.sharepointonline.com/3sa2ahujf.sharepoint.com/sites/apps/ClientSideAssets/a4749a6e-92ef-4c25-9f0c-1da62f722c26/helloworld-webpart-helloworldwebpartstrings_en-us_536e65149b0acf4d52c0043073b9fc59.js' for resource 'HelloWorldWebPartStrings' in component 'ad2d1bb3-4545-4887-bff6-d8108673a431' (HelloWorldWebPart). There was a problem in the server.
*
*CALLSTACK:
Error
at t [as constructor] (https://spoprod-a.akamaihd.net/files/sp-client-prod_2018-02-02.010/sp-pages-assembly_en-us_2bcc5fa1511fb845670c6d5304ff38a3.js:288:15468)
at new t (https://spoprod-a.akamaihd.net/files/sp-client-prod_2018-02-02.010/sp-pages-assembly_en-us_2bcc5fa1511fb845670c6d5304ff38a3.js:701:36434)
at Function.e.buildErrorWithVerboseLog (https://spoprod-a.akamaihd.net/files/sp-client-prod_2018-02-02.010/sp-pages-assembly_en-us_2bcc5fa1511fb845670c6d5304ff38a3.js:701:42137)
at Function.e.buildLoadComponentError (https://spoprod-a.akamaihd.net/files/sp-client-prod_2018-02-02.010/sp-pages-assembly_en-us_2bcc5fa1511fb845670c6d5304ff38a3.js:701:38717)
at https://spoprod-a.akamaihd.net/files/sp-client-prod_2018-02-02.010/sp-pages-assembly_en-us_2bcc5fa1511fb845670c6d5304ff38a3.js:701:11286
at

Yes I can navigate to the folder and see the files.

I wonder if for some reason the files haven't been propagated to the CDN correctly. You could try a few things:

  • remove the web part, verify that files are gone from the folder, redeploy the web part, verify that files are in the folder, see if things are working
  • remove the */clientsideassets origin and add it again and see if that changes anything

Is it only this one web part that's affected or is nothing loading from the CDN?

When I removed web part its disappeared all files from Client Side Assets. Redeploying web part brings all the files back in Client Side Assets. Its not only this web part is affecte and nothing is loading from the CDN.

In powershell, Get-SPOTenantCdnPolicies -CdnType Public give me following results.

                             Key Value
                             --- -----
           IncludeFileExtensions CSS,EOT,GIF,ICO,JPEG,JPG,JS,MAP,PNG,SVG,TTF,WOFF

ExcludeRestrictedSiteClassifications
ExcludeIfNoScriptDisabled False

is it ok?

Those are the default settings for the CDN - would also double check that the CDN is enabled by using Get-SPOTenantCdnEnabled -CdnType Public. If that returns true, we might have a bug in the propagation.

Also - what's your setting for the includeClientSideAssets in the package-solution.json? - is that true or false. There are few things which still could go wrong, but would get above details and we can then solve if this is an issue on the actual CDN or in the settings in your solution. Thx.

Get-SPOTenantCdnEnabled -CdnType Public
True
includeClientSideAssets
True

Is my settings.

Get-SPOTenantCdnEnabled -CdnType Public

Value

True

"includeClientSideAssets": true

Thanks.

Did you make it work rkbhowmik?

Have you tried removing and re-adding the */clientsideassets origin?

Yes. Problem still remains.

Thanks for checking @rkbhowmik. I'm afraid I don't have any other suggestions at this moment. Any suggestions for next steps @VesaJuvonen?

Hi Waldek, thanks for your engagement and your advices, however I may misunderstood one of your suggestions i.e. removing and re-adding the */clientsideassets origin. Can you please let me know exactly how to do it? Thanks again. @waldekmastykarz

Here is more information on removing and configuring the CDN origins: https://docs.microsoft.com/en-us/sharepoint/dev/general-development/office-365-cdn#remove-office-365-cdn-origin

Hello again, I have tried to solve the problem by removing and configuring the CDN origins but problem still remains. @waldekmastykarz

Thanks for checking @rkbhowmik and sorry to hear it's not solved. @VesaJuvonen: any additional info that we could gather to help @rkbhowmik debug this issue?

It was a problem in tenant settings @waldekmastykarz . Powershell code for allowing user to use customs script makes problem.

You mean the no-script setting @rkbhowmik?

@rkbhowmik can you clarify slightly more on what you mean with this. You can use SPFx web parts regardless of the no-script settings if that was what you were referring to. We would definitely appreciate additional input on understanding what exactly was the problem. Thx.

$adminUPN="[email protected]"
$orgName="xxxxxxxx"
$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential
Set-SPOsite https://xxxxxxxx.sharepoint.com -DenyAddAndCustomizePages 0

Instead of 0, I have written 1, so it didn't allow user to use custom scripts. I have also tried remove and enable office 365 CDN origin.

As far as I can tell it shouldn't be necessary to require custom scripts to run for the Office 365 CDN to work.

Just to clarify if I understand it correctly: you get an error loading your SPFx solutions from Office 365 CDN unless you allow custom scripts to run in your site @rkbhowmik?

Well, found a new error

Original error: *Failed to load URL 'https://publiccdn.sharepointonline.com/bhowmiksolution.sharepoint.com/sites/AppCatalogue/ClientSideAssets/8e5920bb-3fc6-4756-93c8-8e43d76e4252/jqueryui_dfe3ecf96456f8cafc12a7f48de6b8c8.js' for resource 'jqueryui' in component 'f3bae1ff-8750-4daa-9345-d5692ee9767b' (JQueryWebPart). There was a problem in the server.

Problem exists. @waldekmastykarz

I have tried in an another o365 tenant which simply goes fine.

yes I can. For now, I am working in another tenant where all these run without any error. @waldekmastykarz

@VesaJuvonen any way we can get more info what's happening behind the scenes?

@rkbhowmik - we will loop in the right people on this one. It clearly seems to be an issue in the CDN level, not on the configuration. We should have all needed details on this thread to solve why this is not working properly. I do still suspect that it might be a hiccup simply on CDN activation.

  • Your web part should work without any issues if you disable the CDN - is that correct?

Hi @rkbhowmik - any change coming back on the final question. If you disable the CDN from your tenant, will web part work without any issues? - this should be the case if you are using 1.4.0 or newer with asset packaging. Thanks for confirming.

@VesaJuvonen Sorry for my late reply. Disabling CDN from my tenant doesnt solve this issues.
It shows [SPLoaderError.loadComponentError] . It runs in local workbench not from CDN. In the other tenant it works flawlessly. So, I am using another tenant to work with SPFx webpart.

Hi @rkbhowmik - can you share content of following files, so that we can try to understand what is wrong. write-manifests.json, package-solution.json and also the manifest json file for the web part. Thx for the additional details advance.

Hello Everyone,

I am also getting the same error. In my case I have created a site and set it as CDN location. CDN is enabled and I have got the ID and URL of the site when I run Get-SPOPublicCdnOrigins.

In my SPFX Project I have set the CDN base path to the public cdn.

Thank you.

Regards,
Silam

@VesaJuvonen
write-menifest.json
{ "$schema": "https://dev.office.com/json-schemas/spfx-build/write-manifests.schema.json", "cdnBasePath": "<!-- PATH TO CDN -->" }

package-solution.json
` {
"$schema": "https://dev.office.com/json-schemas/spfx-build/package-solution.schema.json",
"solution": {
"name": "asset-deployment-webpart-client-side-solution",
"id": "b54039ba-7353-4149-ae1b-e11d5d27a3bb",
"version": "1.0.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": false,
"features": [{
"title": "asset-deployment-webpart-client-side-solution",
"description": "asset-deployment-webpart-client-side-solution",
"id": "523fe887-ced5-4036-b564-8dad5c6c6e24",
"version": "1.0.0.0",
"assets": {
"elementManifests": [
"elements.xml"
],
"elementFiles":[
"schema.xml"
]
}
}]
},

"paths": {
"zippedPackage": "solution/asset-deployment-webpart.sppkg"
}
}
`

webpart manifest json
`{
"$schema": "https://dev.office.com/json-schemas/spfx/client-side-web-part-manifest.schema.json",
"id": "0549e532-b0ee-4566-adbc-6716235d8bcd",
"alias": "AssetDeploymentWebPart",
"componentType": "WebPart",

"version": "*",
"manifestVersion": 2,

"requiresCustomScript": false,

"preconfiguredEntries": [{
"groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Other
"group": { "default": "Other" },
"title": { "default": "AssetDeployment" },
"description": { "default": "AssetDeployment Web Part" },
"officeFabricIconFontName": "Page",
"properties": {
"description": "AssetDeployment"
}
}]
}
`

Hi @rkbhowmik

were you able to resolve it? i'm also facing same issue, however i'm using microsoft/generator-sharepoint 1.4.1

with "includeClientSideAssets": true, "skipFeatureDeployment": true.

Its out of the box webpart template generated, nothing special

i'm able to refer the artifacts by omitting the 'publiccdn.sharepointonline.com' from the path
https://nazone1.sharepoint.com/sites/apps/ClientSideAssets/c97e801a-8026-4bb8-87c4-8e69ab69a953/tools-timerwebpartstrings_en-us_536e65149b0acf4d52c0043073b9fc59.js

, however it doesn't work when referring using CDN path. At present my CDN settings are enabled. I tried to reproduce in a fresh new environment it seems a problem of CDN setting propagation as pointed out by @waldekmastykarz (possibly)

PS C:WINDOWSSystem32> Get-SPOTenantCdnOrigins -CdnType Public
*/MASTERPAGE
*/STYLE LIBRARY
*/CLIENTSIDEASSETS
PS C:WINDOWSSystem32> Get-SPOTenantCdnPolicies -CdnType Public

                             Key Value
                             --- -----
           IncludeFileExtensions CSS,EOT,GIF,ICO,JPEG,JPG,JS,MAP,PNG,SVG,TTF,WOFF

ExcludeRestrictedSiteClassifications
ExcludeIfNoScriptDisabled False

PS C:WINDOWSSystem32> Get-SPOTenantCdnEnabled -CdnType Public

Value

True

I tried with a new tenant without CDN settings enabled, and the webpart worked perfectly, but as i enabled the CDN settings (waited for 30mins) and tried, started getting the same issue.

i got the same issue... still trying to figure it out what wrong with it

@Asfandtnt @akhileshnirapure It didn't work in my first tenant. Then I tried with another tenant where it worked flawlessly. So, I really don't know what causes this problem. You can try it in another tenant.

@VesaJuvonen is this something we need to contact support to get it fixed?

Facing the same issue in my tenant ? any updates on this

i just deleted my Client side Webpart and extensions and clean recycle bin
went back to Package-Solution.json
and change "version": "1.0.0.0", to "version": "2.0.0.0",
connect Sharepoint Online Manager
run following command
gulp bundle --ship
gulp package-solution --ship
upload in "Apps for sharePoint"
and then in desired website "add app"
and walla every thing was working perfectly alright.

i guess earlier i had uploaded package but didnt "add app" :)

img-20180406-wa0002
I am getting above error in one of my tenant inspite of all configuration correct
img-20180406-wa0003
Any help will be appreciated

For now , I am uploading files to sharepoint document library and my webpart works .
But if i deploy it to public cdn it doesnt work.
Followed the same steps in other environment and it works.
Is this a bug ?

i can help you on team viewer if you want me too. [email protected] is my skype id add me ....

where as if you are unable to add external references
here is the easiest way to do it
export default class RotatorWebPart extends BaseClientSideWebPart {
public constructor(context: IRotatorWebPartProps) {

super();
//SPComponentLoader.loadCss('https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css');
SPComponentLoader.loadCss('https://stackpath.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css');

SPComponentLoader.loadScript('https://code.jquery.com/jquery-3.3.1.min.js', { globalExportsName: 'jQuery' }).then((jQuery: any): void => {
  SPComponentLoader.loadScript('https://stackpath.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js',  { globalExportsName: 'jQuery' }).then((): void => {        
  });
});

}

The problem is with cdn, it is not working. The default path is not working. Hence I have changed path and it works now. Thanks @asfandtnt

Hi.
I just noticed that Get-SPOTenant and Get-SPOTenantCdnEnabled -CdnType Public cmdlets do not return the same value. And I can't get PublicCdnEnabled to true in Get-SPOTenant

image

image

Is that a normal behavior o.O ?

Hello there ,
I've got the exact same bug on the webpartstrings_en-us while following the whole step-by-step.
I did as @Asfandtnt told : remove app, clean bins, new wp version in package-solution.json, re-upload, and re-added the webpart to my page. Did not fix it for me.
@harshdamaniahd : where and which path did you move/changed ?
Thanks a lot, keeping in touch on that bug.

Create a document library in SharePoint site.Create a folder called webpart in the document library.
Now go to config folder, there is a file called write-manifests.json , here update the file with your document library path as shown below
image

Now run gulp bundle --ship . This will bundle all you code into necessary files (javascript).
Once done the files created are stored in temp/deploy folder.
Copy the files from that folder to document library folder.
Now run gulp package-solution --ship , copy the generated package to app catalog folder.
Once done your webpart should be running fine.

@harshdamaniahd Yes 'cause you won't be using https://publiccdn.sharepointonline.com but you need to deploy your sources on your own public CDN. You wont be able to include your assets inside your sppkg with the option includeClientSideAssets: true.

This functionality is still down.

I've got the same issue/error on all my custom SPFx web parts. What's interesting is that some days it works fine some days not ! What needs to be checked appart from the fact that Public CDN is enabled ?

Any update on this issue? Last week it was working fine now I am having a 406 status error.
Have checked cdn settings and everything look ok.

image

We just got another unusable dev tenant due to this issue. (2 out of 10).
May we have information about the investigations your leading?

Also i think the issue have been clarified though the tag status:waiting-for-clarification still there, missleading.

Still facing the issue. What's interesting is that some days it works fine (no error on the web parts) some days not (error is displayed) !

I'm experiencing the same issue. I have created dev tennant and cannot make any custom webpart to work.
They all work in my company tennant and in the workbench. Disabling/Enabling CDN does not help.
Are anyone is able to look at it or help?

Happened for us today for about an hour... then spontaneously resolved itself. Bizarre. Previously worked without a problem for the last two weeks - nothing new was deployed to cause or cure the problem.

Only seemed to affect one SPFx web part.

The error in browser console window was a 406 followed by "Refused to execute script from https://publiccdn.sharepointonline.com/[...] because its MIME type ('application/json') is not executable, and string MIME type checking is enabled."

Throughout the error occurring, the files were definitely present in the document library hosting the client side assets. The package-solution.json file specified includeClientSideAssets: true. The write-manifests.json specified a cdnBasePath of "" (i.e. use defaults).

The app was deployed to a site collection specific app catalog.

Hi to all. im facing same issue, I created for myself developer Tennant and I found same issue that I cant use the webpart in my tennant, the issue with CDN always. but its work for other tennant perfectly not developer tennant. I don't know why it wont work in my developer tennant :(

I have the same problem on a developer tenant. On other tenants, it works correct.

I'm getting the same error 406 with public cdn. Is anyone actually progressing this, we've had a fight with it for 4 days. Is there any troubleshooting public CDN guide.
The next option is to create another tenancy but we can't tell our customers to create a new tenancy because the cdn functionality is broken in O365. It would be good if the new / old admin center in sharepoint could show current CDN functionality. :~(

You can use document library from SharePoint as public cdn

@harshdamaniahd I did it already and it doesn't work. :(

Can you please share error

here is the error

Original error: *Failed to load URL publiccdn.sharepointonline.com/krmoanh.sharepoint.com/sites/krmappcatalog/ClientSideAssets/3624777a-337d-4b34-8384-5ab774c069aa/solution-bannerwebpartstrings_en-us

but the thing is the webpart work perfectly on another tenant but my developer tenant not working always gives error and not only this webpart, its every webpart are the same error in my developer tenant

@VesaJuvonen Hi Vesa can you please allocate someone to this issue or at least update how we can help. Tenancies or O365 CDN is flaky. Working one day failing the next or not working at all. We can discount there being an error in the solution (I think) since its deployed into other tenancies and it works. Thanks
Anthony.

Have exactly the same issue on all my demo tenants.
Failed to load URL 'https://publiccdn.sharepointonline.com/m365x337542.sharepoint.com/sites/apps/ClientSideAssets/3624777a-337d-4b34-8384-5ab774c069aa/solution-controlstrings_en-us_9fdf3a263d9b4c41bea5ddcb4928cf9d.js

I have also the mismatch between the CDN setting I get from
Get-SPOTenant -> PublicCdnEnabled : False
and
Get-SPOTenantCdnEnabled -CdnType Public -> True

What's going on! Now all of my tenants are affected !!!!

Same here, about 2 weeks ago we had multiple tenants affected by this.

Guys, the only workfaround I found was to stop using the CDN and in the manifest pointing directly to the URL of the documents library where you stored the assets (js files, ...) . For example in the write-manifests.json file where you set the CDN Base Path, instead of using : _https://publiccdn.sharepointonline.com/YOURTENANT.sharepoint.com/sites/Portal/doclib/yourJSFile.js_
use : _https://YOURTENANT.sharepoint.com/sites/Portal/doclib/yourJSFile.js_

You need to make sure all your site visitors have read access to this doc lib.
Of course this temporary workaround does not use the CDN and performance of your SPFx components might be affected a little - but at least it works : web parts do render.
Microsoft please fix this soon !

I have the same issue!

@VesaJuvonen I've got the same issues with the sp-starter-kit, after getting it to successfully deploy into my newly created Dev Tenant. The extension and web part JS files were successfully deployed to ClientSideAssets library of the App Catalog site, but none of the web parts or extensions load, all with the same errors.

Original error: *Failed to load URL 'https://publiccdn.sharepointonline.com/XXXXXXX.sharepoint.com/sites/AppCatalog/ClientSideAssets/3624777a-337d-4b34-8384-5ab774c069aa/solution-worldtimewebpartstrings_en-us_a14963cca5cb34cd98fdd9bacc8fc2b3.js' for resource 'WorldTimeWebPartStrings' in component '4f87b698-f910-451f-b4ea-7848a472af0f' (pnpWorldTime). There was an error requesting the file.

CDN Settings:
Get-SPOTenantCdnEnabled -CdnType Public
TRUE

Get-SPOTenantCdnPolicies -CdnType Public
IncludeFileExtensions CSS,EOT,GIF,ICO,JPEG,JPG,JS,MAP,PNG,SVG,TTF,WOFF
ExcludeRestrictedSiteClassifications
ExcludeIfNoScriptDisabled False

Get-SPOTenantCdnOrigins -CdnType Public
*/CLIENTSIDEASSETS
*/MASTERPAGE
*/STYLE LIBRARY

Looks like it's the same as #1731, will wait for an solution there. Shame, was keen to show off the sp-starter-kit after SPC18

Thanks everyone for reporting. Notice that this does not have anything to do with what sample you are using, it's around the CDN configuration in the backend. If CDN does not work for you, you can always disable that in your tenant and then content and JS files are automatically served from the app catalog without any changes on the deployed packages.

We are investigating root cause of this.

We should have this now sorted out in the server side. We do apologize for the massive delay on getting this fully fixed. We would like to get through still confirmation from anyone who had the issue that it's not being resolved. This was only impacting a subset of tenants, so we are having a hard time verifying this end-to-end from our end, so your input would be highly welcome. Thanks for your input advance.

We've just tested and it is now working for us, thanks.

Set one of my dev tenants back to CDN enabled, waited for 'configuration pending' to go away on the origins, and confirmed that the JS files are now being served up correctly via publiccdn.sharepointonline.com.

As we have got now confirmations on the issue getting fixed, will close this one. We do apologize for the issue and have now made actions to avoid similar issues in future.

Sorry for the late reply. Works on my tenants as well...THX

Thanks @JensHaile also for confirming. Good that we finally got this fixed.

How will we know when the fix has been released?

@cryptoplastic it should now be fixed, but the only way to be 100% sure if your tenants are fixed is if you test it :)

Okay, sorry to reply lately, I don't know if it is solved on my first issue, because I've came to another project and requirements.

But now, I have this issue.
I am developping an Extension, and I have the CDN issue AGAIN. It worked perfectly until I tried to deploy my new version of the extension on prod environment yesterday.

As usual, I followed tutorials to do it : https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/hosting-extension-from-office365-cdn

So, firstly created a new Document Library on my https://MYPRODENVIRONMENT.sharepoint.com/sites/MYSITE/, calling it CDN.
Then added a new folder called Didacticiel in it.

After that, ran these commands under Sharepoint Online Management Shell

Connect-SPOService -Url https://MYPRODENVIRONMENT-admin.sharepoint.com
Set-SPOTenantCdnEnabled -CdnType Public
Add-SPOTenantCdnOrigin -CdnType Public -OriginUrl */cdn

This is how I firstly enabled CDN on my prod environment.
I could deploy first versions of my Extension.
By just running gulp bundle --ship and then gulp package-solution --ship, drag/dropping the temp>deploy files to my CDN/Didacticiel library. and then by replacing my extension application on my AppCatalog.

Now that i want to deploy a new one, I get this error :

Uncaught (in promise) Error: *Failed to load path dependency "jqueryui" from component "13e50c8d-4c45-486d-9c8a-50fabbde8b52" (DidacticielApplicationCustomizer).
Original error: Error loading https://relative-path.invalid/jquery as "jquery" from https://component-id.invalid/13e50c8d-4c45-486d-9c8a-50fabbde8b52_0.0.1/jqueryui
VM469:5 GET https://relative-path.invalid/jquery 0 ()

Except that I can download that file, and have access to it.

There is one thing strange though, I can downgrade my application version to my 1.0.0.2 without running in any error but 1.0.0.4 is getting me these

Please, @VesaJuvonen could you tell me if it is CDN or if I did something wrong ?

Here are the files from my 1.0.0.4 version.
If you need the real path to test, no worries, i'll just give it to you privately.

write-manifest.json

{
  "$schema": "https://dev.office.com/json-schemas/spfx-build/write-manifests.schema.json",
  "cdnBasePath": "https://publiccdn.sharepointonline.com/MYPRODENVIRONMENT.sharepoint.com/sites/MYSITE/CDN/Didacticiel"

}

package-solution.json

{
  "$schema": "https://dev.office.com/json-schemas/spfx-build/package-solution.schema.json",
  "solution": {
    "name": "XXX_Didacticiel",
    "id": "57991209-44b8-434e-810e-dfea7d500e76",
    "version": "1.0.0.4",
    "includeClientSideAssets": true,
    "features": [
      {
        "title": "Application Extension - Deployment of custom action.",
        "description": "Deploys a custom action with ClientSideComponentId association",
        "id": "3f4493e9-cf30-4eaf-a1f0-012674c97ac2",
        "version": "1.0.0.0",
        "assets": {
          "elementManifests": [
            "elements.xml"
          ]
        }
      }
    ]
  },
  "paths": {
    "zippedPackage": "solution/XXX-didacticiel.sppkg"
  }
}

DidacticielApplicationCustomizer.manifest.json

{
  "$schema": "https://dev.office.com/json-schemas/spfx/client-side-extension-manifest.schema.json",

  "id": "13e50c8d-4c45-486d-9c8a-50fabbde8b52",
  "alias": "DidacticielApplicationCustomizer",
  "componentType": "Extension",
  "extensionType": "ApplicationCustomizer",

  // The "*" signifies that the version should be taken from the package.json
  "version": "*",
  "manifestVersion": 2,

  // If true, the component can only be installed on sites where Custom Script is allowed.
  // Components that allow authors to embed arbitrary script code should set this to true.
  // https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
  "requiresCustomScript": false
}

Thanks a lot, I hope you'll have time to answer to me ;)

A little up there :
I have removed the line referencing JQueryUI as external in my config.json file.
It is as following now :

config.json
{ "$schema": "https://dev.office.com/json-schemas/spfx-build/config.2.0.schema.json", "version": "2.0", "bundles": { "didacticiel-application-customizer": { "components": [ { "entrypoint": "./lib/extensions/didacticiel/DidacticielApplicationCustomizer.js", "manifest": "./src/extensions/didacticiel/DidacticielApplicationCustomizer.manifest.json" } ] } }, "externals": { "jquery":"node_modules/jquery/dist/jquery.min.js" }, "localizedResources": { "DidacticielApplicationCustomizerStrings": "lib/extensions/didacticiel/loc/{locale}.js" } }
Now I have different errors :

GET https://publiccdn.sharepointonline.com/https://MYPRODENVIRONMENT.sharepoint.com/sites/MYSITE/CDN/Didacticiel/jquery_2f6b11a7e914718e0290410e85366fe9.js net::ERR_ABORTED 500

HEAD https://publiccdn.sharepointonline.com/https://MYPRODENVIRONMENT.sharepoint.com/sites/MYSITE/CDN/Didacticiel/didacticielapplicationcustomizerstrings_fr-fr_b16aa5d6cb7233be20456c59f816ebb4.js

Failed to load https://publiccdn.sharepointonline.com/https://MYPRODENVIRONMENT.sharepoint.com/sites/MYSITE/CDN/Didacticiel/didacticielapplicationcustomizerstrings_fr-fr_b16aa5d6cb7233be20456c59f816ebb4.js: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://MYPRODENVIRONMENT.sharepoint.com' is therefore not allowed access. The response had HTTP status code 405. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled

Uncaught (in promise) Error: *Failed to load URL 'https://publiccdn.sharepointonline.com/https://MYPRODENVIRONMENT.sharepoint.com/sites/MYSITE/CDN/Didacticiel/didacticielapplicationcustomizerstrings_fr-fr_b16aa5d6cb7233be20456c59f816ebb4.js' for resource 'DidacticielApplicationCustomizerStrings' in component '13e50c8d-4c45-486d-9c8a-50fabbde8b52' (DidacticielApplicationCustomizer). There was a network problem.
This may be a problem with a HTTPS certificate. Make sure you have the right certificate.

So, unfirtunately no, the CDN problem seems to be unsolved !
Do you have any clue on this @VesaJuvonen ?? Please it is quite important, working on a different testing environment, but not on prod.

Hi
These kind of things happen if CDN is successfully applied duirn migration
other wise there is no place to put data information from CDN to the new
site collection.

On Thu, 6 Sep 2018, 11:12 Amysno notifications@github.com wrote:

A little up there :
I have removed the line referencing JQueryUI as external in my config.json
file.
It is as following now :

config.json
{ "$schema": "
https://dev.office.com/json-schemas/spfx-build/config.2.0.schema.json",
"version": "2.0", "bundles": { "didacticiel-application-customizer": {
"components": [ { "entrypoint":
"./lib/extensions/didacticiel/DidacticielApplicationCustomizer.js",
"manifest":
"./src/extensions/didacticiel/DidacticielApplicationCustomizer.manifest.json"
} ] } }, "externals": { "jquery":"node_modules/jquery/dist/jquery.min.js"
}, "localizedResources": { "DidacticielApplicationCustomizerStrings":
"lib/extensions/didacticiel/loc/{locale}.js" } }
Now I have different errors :

GET
https://publiccdn.sharepointonline.com/https://MYPRODENVIRONMENT.sharepoint.com/sites/MYSITE/CDN/Didacticiel/jquery_2f6b11a7e914718e0290410e85366fe9.js
net::ERR_ABORTED 500

HEAD
https://publiccdn.sharepointonline.com/https://MYPRODENVIRONMENT.sharepoint.com/sites/MYSITE/CDN/Didacticiel/didacticielapplicationcustomizerstrings_fr-fr_b16aa5d6cb7233be20456c59f816ebb4.js

Failed to load
https://publiccdn.sharepointonline.com/https://MYPRODENVIRONMENT.sharepoint.com/sites/MYSITE/CDN/Didacticiel/didacticielapplicationcustomizerstrings_fr-fr_b16aa5d6cb7233be20456c59f816ebb4.js:
No 'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'https://MYPRODENVIRONMENT.sharepoint.com' is therefore
not allowed access. The response had HTTP status code 405. If an opaque
response serves your needs, set the request's mode to 'no-cors' to fetch
the resource with CORS disabled

Uncaught (in promise) Error: *Failed to load URL '
https://publiccdn.sharepointonline.com/https://MYPRODENVIRONMENT.sharepoint.com/sites/MYSITE/CDN/Didacticiel/didacticielapplicationcustomizerstrings_fr-fr_b16aa5d6cb7233be20456c59f816ebb4.js'
for resource 'DidacticielApplicationCustomizerStrings' in component
'13e50c8d-4c45-486d-9c8a-50fabbde8b52' (DidacticielApplicationCustomizer).
There was a network problem.
This may be a problem with a HTTPS certificate. Make sure you have the
right certificate.

So, unfirtunately no, the CDN problem seems to be unsolved !
Do you have any clue on this @VesaJuvonen https://github.com/VesaJuvonen
?? Please it is quite important, working on a different testing
environment, but not on prod.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/SharePoint/sp-dev-docs/issues/1353#issuecomment-419023064,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AXHxHQXk53k5K4SmUGtANyRSCIxtf40oks5uYOcCgaJpZM4SEim0
.

+1 Same issue as @Amysno with CORS. Any help would be much appreciated.

It happened again just now :(

Lasted about an hour.

image

@VesaJuvonen I am having same issue. I followed the steps to Extract a single web part from the SharePoint Starter Kit

https://medium.com/@zaab_it/extract-and-customize-a-single-web-part-from-the-sharepoint-starter-kit-7628a5b2cfc3

Original error: *Failed to load entry point from component "4f87b698-f910-451f-b4ea-7848a472af0f" (pnpWorldTime).
Original error: Error loading https://component-id.invalid/4f87b698-f910-451f-b4ea-7848a472af0f_0.0.1
Cannot find module "WorldClockWebpartStrings"

*INNERERROR:
*
Failed to load entry point from component "4f87b698-f910-451f-b4ea-7848a472af0f" (pnpWorldTime).
Original error: Error loading https://component-id.invalid/4f87b698-f910-451f-b4ea-7848a472af0f_0.0.1
Cannot find module "WorldClockWebpartStrings"

worldclockerror

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

Was this page helpful?
0 / 5 - 0 ratings