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

O365 CDN Invalid nonce key configuration

Open palcheuski opened this issue 8 years ago • 21 comments

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 image

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 image

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

Steps to Reproduce

  1. Enable O365 CDN using PowerShell Cmdlet, so that we have the final settings as bellow image

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

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

  1. Create a team site (classic or modern, it doesn't matter).
  2. 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 image

  1. 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.

image

palcheuski avatar Apr 23 '18 12:04 palcheuski

Have the same exact error message on my tenant. No solution yet.

{"HttpStatus":"NotAcceptable","ErrorMessage":"Invalid nonce key configuration","ErrorCode":406001}

michelsmit avatar Apr 26 '18 11:04 michelsmit

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 avatar Apr 26 '18 19:04 patmill

@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///<resource_relative_path>. It seems to me, that there are some problems with the propagation to the public CDN.

palcheuski avatar Apr 27 '18 07:04 palcheuski

@VesaJuvonen , maybe there is some news on this issue?

palcheuski avatar Apr 27 '18 14:04 palcheuski

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.

luis-ribeiro avatar Apr 28 '18 18:04 luis-ribeiro

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.

michelsmit avatar May 01 '18 08:05 michelsmit

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

waldekmastykarz avatar May 11 '18 13:05 waldekmastykarz

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"

LeemansBE avatar May 16 '18 12:05 LeemansBE

Same issue on newly created dev tenant

jeslas avatar May 31 '18 11:05 jeslas

I lost hope for an answer, issue is still actual for me.

palcheuski avatar May 31 '18 11:05 palcheuski

We are working with the owning team on this issue. If you can open a support ticket, that would help as well.

patmill avatar May 31 '18 17:05 patmill

I have the same error message on my tenant. Nobody found a solution ? it's really really annoying -_- and very blocking.

val2207 avatar Jun 05 '18 14:06 val2207

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".

patmill avatar Jun 06 '18 23:06 patmill

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.

tocnr avatar Jun 07 '18 04:06 tocnr

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.

VesaJuvonen avatar Jun 12 '18 07:06 VesaJuvonen

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.

BjoernHund avatar Jun 12 '18 18:06 BjoernHund

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.

VesaJuvonen avatar Jun 20 '18 10:06 VesaJuvonen

I will test it on our development tenants on this friday and then report the result.

BjoernHund avatar Jun 20 '18 17:06 BjoernHund

@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!

WayneJSawyer avatar Jun 20 '18 21:06 WayneJSawyer

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.

VesaJuvonen avatar Jun 21 '18 06:06 VesaJuvonen