CORS policy issue when using standard skuid theme in Lightning

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–’ (redirected from ‘https://ncontracts–’) from origin ‘https://ncontracts–’ 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.

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.

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.

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.