O365 CDN Invalid nonce key configuration
Category
- [ ] Question
- [ ] Typo
- [x] Bug
- [ ] Additional article idea
Expected or Desired Behavior
SPFx webpart/extension solution package JavaScript scripts loaded successfully on SharePoint modern page from Office 365 CDN default origin (*/CLIENTSIDEASSETS) enabled on a tenant.
Below is a sample from working tenant

Observed Behavior
SPFx webpart solution package is successfully deployed to AppCatalog and all resources appear in the ClientSideAssets library. Finally, SPFx solution is successfully installed on the target site collection. After adding webpart on the canvas we see the following results. Here on the screenshot you can see that SharePoint tries to access resources from CDN, but it results to 406 error code.
Below is a sample from NOT working tenant

Some inspection in Fiddler, here we can see an error message that is not very clear what exactly wrong.

Steps to Reproduce
-
Enable O365 CDN using PowerShell Cmdlet, so that we have the final settings as bellow

-
Deploy SPFx solution package to the AppCatalog, here is what I have in my tenant

When deployment completed, i could see that resources are added to the ClientSideAssets library. Here is the proof.

- Create a team site (classic or modern, it doesn't matter).
- Install SPFx solution from the AppCatalog to the target site collection.
When it is added to the site, there is no errors in the App Details page. here is a screenshot

- Add custom webpart from the SPFx solution to the modern page, open DevTools in the Chrome and switch to the network tab, from here you can see a lot requests with 406 errors when trying to access resources from the public cdn.

Have the same exact error message on my tenant. No solution yet.
{"HttpStatus":"NotAcceptable","ErrorMessage":"Invalid nonce key configuration","ErrorCode":406001}
Just being super clear - the configuration is for a public CDN, correct? My understanding was that the nonce for a request to a CDN was only for private configurations. Is it possible that the configuration was changed in some form? If you request private configurations, what comes back?
@patmill , yes, that is the configuration for the public CDN, we don't yet have a private CDN configured. As shown in my screenshots, all requests to the CDN start with the base path https://publiccdn.sharepointonline.com/
@VesaJuvonen , maybe there is some news on this issue?
Are you using a O365 developer account? I had the same issue (the error output was the same) when using a O365 developer account tenant. I have repeated the same steps on a fresh regular trial tenant and everything worked as expected.
For me no developer account (production tenant), public cdn. The issue is only with this particular tenant, not other tenants I manage. I created a ticket with MS support.
I'm experiencing the same issue in my non-dev tenant:
- Public CDN enabled with default origins
- Assets provisioned from the solution package to ClientSideAssets and accessible via the doc lib URL
- Accessing the same assets via the Public CDN URL results in a 406 and prevents the web part from loading
Any update on this? We are experiencing the same issue in our newly created tenant.
- Files are accissible through the style library
- Accessing the same files through the public CDN results in 406: "Invalid nonce key configuration"
Same issue on newly created dev tenant
I lost hope for an answer, issue is still actual for me.
We are working with the owning team on this issue. If you can open a support ticket, that would help as well.
I have the same error message on my tenant. Nobody found a solution ? it's really really annoying -_- and very blocking.
Just touching base. We've got a repro of this with full logs, and see what is happening. Working on "why" and "how to get it to work".
Just started seeing this on our production tenant. The Public CDN has been working for months and is just now having problems. This has a pretty big impact since we have started using SPFx pretty extensively. It also seems pretty inconsistent depending on the network used to access the tenant - in some cases assets will load and in others fails with the above error.
We are investigating this issue. For now - you can make your samples and solutions to work by disabling the CDN as that will then automatically instruct SharePoint to serve the assets from the app catalog. This does NOT require any changes on your sppkg files/solutions as long as you are using the "asset packaging" which was released with SPFx 1.4.
Same issue on a development tenant. Disabling the public CDN in this tenant worked, but is only a temporary solution.
We have now the first production tenant with the same problem.
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.
I will test it on our development tenants on this friday and then report the result.
@VesaJuvonen - 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
Thanks!
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.