Hello guys,
I am having a strange error stating “importScripts failled for Workers/createGeometry”. I’ve searched through this forum and seen related posts but none could solve my issue.
My project is compiled using webpack and I am pretty sure the issue appeared after we switched to https. The error pops every so and then. I can’t reproduce it on purpose as it seems to happen randomly.
Inside webpack config files we added these plugins:
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}
]),
// Copy Cesium Assets, Widgets, and Workers to a static directory
new CopyWebpackPlugin([
{ from: path.join(cesiumSource, cesiumWorkers), to: 'Workers' }
]),
new CopyWebpackPlugin([
{ from: path.join(cesiumSource, 'Assets'), to: 'Assets' }
]),
new CopyWebpackPlugin([
{ from: path.join(cesiumSource, 'Widgets'), to: 'Widgets' }
]),
new webpack.DefinePlugin({
// Define relative base path in cesium for loading assets
CESIUM_BASE_URL: JSON.stringify('/')
})
]
I thought it was related to CESIUM_BASE_URL as suggested in related posts and issues on GitHub but was not able to fix it.
Please reach out if you have any idea on how to fix this or why this happens.
Thanks