Forum Discussion
CORS Error On CesiumJS Custom Visual
Hi Anonymous,
I'm not sure if I can solve this 100% for you, but might be able to provide some clarification or further ideas. I've previously attempted to use workers in a custom visual and it's... tricky.
CORS errors in a visual are typically caused by the fact that the visual is hosted in a sandboxed iframe with allow-scripts as the only permission, which means that the domain has been removed from the visual's hosting iframe. So if you need to load remote dependencies and the remote server does not allow requests from a null origin, then there's not much you can do here, unless CesiumJS can relax this restriction from their end.
Regarding Webpack customisation, I can't tell from the supplied if you're using powerbi-visuals-webpack-plugin or not in your project. If not, then trying to supply an overridden webpack configuration typically doesn't work as the SDK tools will always use the one local to the installed powerbi-visuals-tools package.
If you have done this, it might be better to contact [email protected] with further questions and your code, and the team may be able to provide you with targeted help on this one (they typically don't look at the forums, unfortunately 😞 ). If you do get a resolution back under this channel, I'd love to know how you get on with this one - CesiumJS looks pretty cool!
Regards,
Daniel