Problem/Motivation
Media library upload modal/widget keep breaking during the image uploading, happens randomly.
What's happening:
Step 1: In CKEditor click on the Insert from Media Library icon
Step 2: In open modal/widget, click on Select files or drop image to upload

Step 3:
Expected/normal: It takes a little bit time to upload the image and will show another modal to choose the Crop Image option etc

Happening: Quickly active modal replaced with new small modal with images gallery etc. Sometimes CKEditor also disappear itself on textarea.

Not getting any error!
This is the first time I am posting a support issue. So apologies in advance if I didn't select the right module/category etc.
Comments
Comment #2
cilefen commentedHave you examined the browser console log?
Comment #3
bsingh commentedFew details may be helpful:
- Drupal 9.4.4
- PHP 7.4
This starts happening upon update to 9.4.3.
These are in console atm:

Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.
and
Before this I have fixed/patched:
https://www.drupal.org/files/issues/2022-07-01/core-ajaxload-1988968-293...
for [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience.
and
https://www.drupal.org/files/issues/2021-03-22/3047022-71.patch
Comment #4
cilefen commentedIt has been two months. IS there any update?
Comment #5
cilefen commentedComment #6
bsingh commentedHey @cilefen, thanks for following this up.
Upon browsing a file to start uploading - sometimes randomly the main modal is replaced with a smaller one as I have shown earlier.
I found that at that point ajaxPageState response of /media-library is different in both cases [success or fail].
Libraries: not the same in both cases such as dropzonejs/integration, field_group/core,field_group/formatter.details, etc are missing in one response.
Ajax: Missing edit-save-insert--*, edit-save-select--* etc
Also missing add_css and add_js.
In other response again different libraries, "auto_select_handler", dropzonejs - edit-upload--t-* etc.
Any idea why these responses are different in diff cases. This is happening just on Prod!
Thanks
Comment #7
bsingh commentedComment #9
tesla863 commentedHi guys
I'm having the same issue, it's happening just in the prod environment!
On my debugs I also notice different ajax responses:
Prod - with error:
Any environment without error:
Any idea?
Thanks!
Comment #10
bsingh commented@tesla863 It's start happening again on my end. Have you had any solution for it?
Comment #11
eric.vvf commentedI am facing the same. But I couldn't reproduce it locally, only in Pantheon's staging environment. as @bsingh reported, there are differences in responses between cases that work and cases that don't. Happens randomly, and doesn't seem to have a pattern.
With error:
Without error:
I tried a patch to add the missing libraries (in my case: file/drupal.file and dropzonejs/integration), but the problem still persists.
Comment #12
nchristensen commentedFor those hosting with Pantheon:
Pantheon has a known issue with DropzoneJS, which is used for the Media Entity DropzoneJS widget and Media Bulk Upload module.
The module does not interact will with multiple-container environments, such as Pantheon, and is known to cause issues within the platform itself, which is what the site is currently experiencing.
see Pantheon's documentation here: https://docs.pantheon.io/modules-known-issues#dropzonejs
Comment #13
sahilgidwani commentedAny update on this issue? I am also facing this issue in my production environment but not on Pantheon.
Comment #14
bsingh commentedIn my case, this was related to the server/hosting environments - as mentioned by @nchristensen.
Acquia has something similar: https://docs.acquia.com/cloud-platform/manage/files/broken/
Comment #15
bsingh commented