cospend-nc icon indicating copy to clipboard operation
cospend-nc copied to clipboard

Imprt Project leads to MIME-Typ-conflict

Open UteHaus opened this issue 1 year ago • 4 comments

When I would like to import a project over the cospand config site, I get a browser error message. The problem is a MIME type conflict, but I can´t find any working solution or behavior in the Nextcloud Project or Forum with my Docker setup.

Reproduce:

  1. open cospand app
  2. open the setting dialog
  3. push the CSV-Project Import Button

Error description: When the import start cospand load a script from sever: https://example.nextcloud.de/apps/cospend/js/cospend-node_modules_nextcloud_dialogs_dist_chunks_index-D5FJasts_mjs.js?v=8b813e5937312ca1222xxx , Status: 404

Browser exception: Blocked due to a MIME type conflict ('text/html') (X-Content-Type-Options: nosniff).

Uncaught (in promise) ChunkLoadError: Loading chunk node_modules_nextcloud_dialogs_dist_chunks_index-D5FJasts_mjs failed.
(error: https://example.nextcloud.de/apps/cospend/js/cospend-node_modules_nextcloud_dialogs_dist_chunks_index-D5FJasts_mjs.js?v=8b813e5937312ca18f2a)
    j jsonp chunk loading:28
    e ensure chunk:6
    e ensure chunk:5
    pick index.mjs:69
    ue utils.js:20
    onImportClick CospendSettingsDialog.vue:294
    VueJS 4
    click NcButton.mjs:231

Enviroment 1

  • Operating system: Nextclound 30.0.4 (docker apache)
  • Proxy: Nginx with non additional config
  • cospand version: 3.0.8

Enviroment 2

  • Operating system: Nextclound 30.0.4 (docker FPM)
  • Proxy: Nginx with non additional config
  • cospand version: 3.0.8

Actual behavior: Setup the types not works !!!Not works!!! https://nginx.org/en/docs/http/ngx_http_core_module.html#types

Im open for any further nginx setup Ideas.

UteHaus avatar Dec 31 '24 12:12 UteHaus

I also get this error.

abrahamneben avatar Jan 09 '25 16:01 abrahamneben

Thanks for reporting this. For some reason the dialogs lib (used to open the file picker) loads some javascript dynamically so there is some webpack-specific variables to define.

This is now fixed and will be included in the next release.

julien-nc avatar Jan 19 '25 16:01 julien-nc

Nice that this is fixed already.

It seems like there is no public version yet, tough. The steps in the readme don't find any newer version than 3.0.8. Is there any other way to install this fix at the moment?

saierd avatar Jan 23 '25 13:01 saierd

Works for me again in v3.0.11.

IcePlains avatar Jan 31 '25 18:01 IcePlains