Import Scripts failed error since going https

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

Hey @clementchdn I am having the same issue and have failed to reproduce it consistently as well. I will add that I am using http, and still am receiving this error at seemingly random times.

It’s been two months since your post, so I wanted to see if you had resolved this issue in the meantime?

Hello @jdretz,
I’m not working on this project anymore but as far as I know the problem has not been solved. I still have no clue about what causes this behavior, sorry

No worries, thank you for the response!