Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot import project (ChunkLoadError 404) #330

Closed
poboiko opened this issue Jan 12, 2025 · 2 comments
Closed

Cannot import project (ChunkLoadError 404) #330

poboiko opened this issue Jan 12, 2025 · 2 comments
Labels
bug Something isn't working testing

Comments

@poboiko
Copy link

poboiko commented Jan 12, 2025

When trying to import project via web ui ("Create a project" drop down menu -> "Import SplitWise project" button), nothing happens.

Chrome web console shows following errors that seem to be related.

GET https://<omitted>/apps/cospend/js/cospend-node_modules_nextcloud_dialogs_dist_chunks_index-D5FJasts_mjs.js?v=8b813e5937312ca18f2a net::ERR_ABORTED 404 (Not Found)

Refused to execute script from 'https://<omitted>/apps/cospend/js/cospend-node_modules_nextcloud_dialogs_dist_chunks_index-D5FJasts_mjs.js?v=8b813e5937312ca18f2a' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Uncaught (in promise) ChunkLoadError: Loading chunk node_modules_nextcloud_dialogs_dist_chunks_index-D5FJasts_mjs failed.

The file cospend-node_modules_nextcloud_dialogs_dist_chunks_index-D5FJasts_mjs.js is nevertheless present:

$ ls -la custom_apps/cospend/js/*chunks*
-rw-r--r-- 1 33 33     544 Dec 25 01:40 custom_apps/cospend/js/cospend-node_modules_nextcloud_dialogs_dist_chunks_index-D5FJasts_mjs.js
-rw-r--r-- 1 33 33     498 Dec 25 01:40 custom_apps/cospend/js/cospend-node_modules_nextcloud_dialogs_dist_chunks_index-D5FJasts_mjs.js.map
-rw-r--r-- 1 33 33  369729 Dec 25 01:40 custom_apps/cospend/js/cospend-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-CvXU3iSt_mjs.js
-rw-r--r-- 1 33 33 3817665 Dec 25 01:40 custom_apps/cospend/js/cospend-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-CvXU3iSt_mjs.js.map
-rw-r--r-- 1 33 33   15722 Dec 25 01:40 custom_apps/cospend/js/cospend-vendors-node_modules_nextcloud_vue_dist_chunks_NcDashboardWidget-CU5MNmVJ_mjs.js
-rw-r--r-- 1 33 33   30785 Dec 25 01:40 custom_apps/cospend/js/cospend-vendors-node_modules_nextcloud_vue_dist_chunks_NcDashboardWidget-CU5MNmVJ_mjs.js.map

However, trying to download it using the link shown in the web console via wget indeed returns 404.

This seem to be a regression caused between 3.0.4 and 3.0.5 (manual downgrading to 3.0.4 fixes the issue).

Here's also a similar issue on Reddit that was found during googling process.

@julien-nc
Copy link
Owner

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 julien-nc added bug Something isn't working testing labels Jan 19, 2025
@julien-nc
Copy link
Owner

Duplicate of #326

@julien-nc julien-nc marked this as a duplicate of #326 Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing
Projects
None yet
Development

No branches or pull requests

2 participants