CORS policy issue when using standard skuid theme in Lightning

  • 1
  • Problem
  • Updated 4 weeks ago
  • In Progress
  • (Edited)
I'm using a standard Skuid theme in lightning. And some of my users are getting this error. Please note, it's not happening for me (a system admin). And it seems to only happen intermittently for the end users that experience it. In each case, the follow error is available in the console log.

Access to XMLHttpRequest at 'https://ncontracts--skuid.na65.visual.force.com/resource/skuid__IconsSVG' (redirected from 'https://ncontracts--c.na65.visual.force.com/resource/skuid__IconsSVG') from origin 'https://ncontracts--c.na65.visual.force.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.


Photo of Brayden Smith

Brayden Smith

  • 1,270 Points 1k badge 2x thumb

Posted 1 month ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 53,702 Points 50k badge 2x thumb
To confirm, is this error causing any actual issues for you or your users? Are icons appearing in Lightning? 

This error is actually intentional, believe it or not, kind of like how Salesforce has a "logo180" file that is requested which always fails . It's a means to an end for Skuid to determine if it is being run in an environment where we will be able to make XHR requests fetch SVG icons for the page.

That said, we're actually making some changes to this logic in our next major release, 12.2, which should eliminate this innocuous error from being thrown in Lightning.
Photo of Brayden Smith

Brayden Smith

  • 1,270 Points 1k badge 2x thumb
Hey Zach, we are having intermittent issues with tables not rendering in Lightning, and we thought this may be the issue. But maybe not.

There's also consistently a console error that says "There was a problem rendering a component of type skootable: Cannot read property 'objectName' of undefined".

Here's what the table looks like when this error occurs.





(Edited)
Photo of Zach McElrath

Zach McElrath, Employee

  • 53,702 Points 50k badge 2x thumb
Hmm, so I'm fairly certain that the intermittent table rendering issue is unrelated to the CORS issue on fetching the IconsSVG.

Generally that error comes due to a missing model, but it could also be due to missing field metadata for reference fields. You might want to take a look at the table in your page that's intermittently not rendering, and see if there are any reference fields (i.e. any lookups) that any of your users don't have permissions to view. Just an idea, that might not be it. If the issue continues to persist, we could help troubleshoot further.