Weird error uploading files

Weird error uploading files

by Arturo Fernandez -
Number of replies: 19

Hi, from overnight we have an error when uploading files to an activity.

If I use the drag and drop, I get "Error connecting to server":


In developer console, ERR_CONNECTION_RESET:


On the other hand, if I use the file picker, file never loads:


And the developer console says: Blocked a frame with origin form accessing a cross-origin frame:


Now, those errors occurs when I use Chrome or Mozilla. But I have a try in Safari and it works perfectly!

In the servers logs, same segmentation fault both ways:

    AH00051: child pid 22050 exit signal Segmentation fault (11)

Then I made a coredump:


The CRYPTO_get_ex_data belongs to OpenSSL, so I updated OpenSSL, but nothing changed.

Moodle version: Moodle 3.9.1+

Server runs Centos Web Panel with Apache 2.4.39, MariaDB 10.5.8, PHP 7.4.10.

Please help, I'm gonna go crazy with this.

Average of ratings: -
In reply to Arturo Fernandez

Re: Weird error uploading files

by Pericles Cheng -
Just saw this when i posted my message. I apologize for the duplication. I have the same issue. Any ideas on how to fix this?
In reply to Pericles Cheng

Re: Weird error uploading files

by Arturo Fernandez -
I'm glad to hear that I'm not the only one who is experiencing this issue. Maybe those browsers changed some SSL directive and broke some moodles... Do you have the opportunity to try on Safari to confirm that it does work there?
In reply to Arturo Fernandez

Re: Weird error uploading files

by Pericles Cheng -
Unfortunately I do not have a MAC. I might be considered an anti-MAC person but this is one time I would wish I was not. smile
In reply to Arturo Fernandez

Re: Weird error uploading files

by Pericles Cheng -
Arturo, have you had any luck solving this?
In reply to Pericles Cheng

Re: Weird error uploading files

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
If this problem started occurring, as you say "overnight", if I were trying to solve this problem I would first determine what happened to either your Moodle or to your server "overnight." That's about all that I can say.
In reply to Rick Jerz

Re: Weird error uploading files

by Pericles Cheng -
Nothing was changed on the server and I am the only one doing updates on the server manually. I checked another server running Moodle and I have the same issue. Different Moodle version but still not uploading.
In reply to Rick Jerz

Re: Weird error uploading files

by Arturo Fernandez -
Same here, nothing has changed on the server far as I know. No updates, or anything in the log.
In reply to Arturo Fernandez

Re: Weird error uploading files

by Pericles Cheng -
Arturo, the one thing I find similar in our cases is that Centos Web Panel is running on the server. Could it be that CWP is killing our Moodle installations?
In reply to Pericles Cheng

Re: Weird error uploading files

by Arturo Fernandez -
I checked PHP settings, Yum packages, CWP and Apache configuration... I don't know what to think. The fact that Chrome and Firefox are not working and Safari is working perfectly makes me think that maybe it could be a browser related problem. Also, nothing has changed on the server.
In reply to Arturo Fernandez

Re: Weird error uploading files

by Pericles Cheng -
Found sort of a workaround. Disable https. When you go to http it works.

In reply to Pericles Cheng

Re: Weird error uploading files

by Arturo Fernandez -
I'm trying to disable https, but when I changed .htaccess and config.php files, I can't log in anymore. Is there anything else to do besides modify these files?
In reply to Arturo Fernandez

Re: Weird error uploading files

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I somehow don't see Pericles saying anything about "config.php." Pericles hasn't told us how he disabled https, either. I can't be of much help on the server side. For me to try to begin replicating this, I would have to know: Which version of Windows? Which version of Firefox? Which version of Chrome? Which version of Safari? Which version of Moodle? Is the drag-and-drop not working in any one place, like forums, or everywhere? Do the same files upload just fine using the file picker method?  If you try a drag-and-drop to MoodleCloud from these browsers, does it work?

Some of these questions I am asking to help you probe.  There are probably many other questions like these.
In reply to Rick Jerz

Re: Weird error uploading files

by Pericles Cheng -
Hi Rick.
Here are some of the information you want.

Server side:
Centos Web Panel Pro 0.9.8.1039
Apache 2.4.39
PHP 7.3.8
MariaDB 10.2.36
Moodle 3.8.6+ (Build: 20210115)

Client side:
Windows 10 20H2 x64
Microsoft Edge Version 88.0.705.56
Firefox 85.0.1 (64-bit)
Also tried Chrome, and Opera.

The file upload is not working in any way. The window opens up and I can select the file. After that the window is stuck with a loading animation and nothing happens. It is everywhere and not only in a specific activity. The error shown when you look at the console of the browser is the following (this is from another install with the same options on a different server):

Uncaught DOMException: Blocked a frame with origin "https://elearn.cerides.eu" from accessing a cross-origin frame.
at Function.E.getValue (https://elearn.cerides.eu/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:10:4851)
at c.DEFAULT_GETTER (https://elearn.cerides.eu/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:98:2185)
at c._get (https://elearn.cerides.eu/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:98:2812)
at c.get (https://elearn.cerides.eu/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:98:2614)
at o._uploadComplete (https://elearn.cerides.eu/theme/yui_combo.php?3.17.2/datatype-xml-parse/datatype-xml-parse-min.js&3.17.2/io-xdr/io-xdr-min.js&3.17.2/io-form/io-form-min.js&3.17.2/io-upload-iframe/io-upload-iframe-min.js&3.17.2/queue-promote/queue-promote-min.js&3.17.2/io-queue/io-queue-min.js&3.17.2/event-mousewheel/event-mousewheel-min.js&3.17.2/event-resize/event-resize-min.js&3.17.2/event-hover/event-hover-min.js&3.17.2/event-touch/event-touch-min.js&3.17.2/event-move/event-move-min.js&3.17.2/event-flick/event-flick-min.js&3.17.2/event-valuechange/event-valuechange-min.js&3.17.2/event-tap/event-tap-min.js&3.17.2/event-simulate/event-simulate-min.js&3.17.2/node-event-html5/node-event-html5-min.js&3.17.2/async-queue/async-queue-min.js&3.17.2/gesture-simulate/gesture-simulate-min.js&3.17.2/node-event-simulate/node-event-simulate-min.js&m/1600951585/core/widget/widget-focusafterclose-min.js&3.17.2/plugin/plugin-min.js&m/1600951585/core/lockscroll/lockscroll-min.js&m/1600951585/core/notification/notification-dialogue-min.js:32:1697)
at c. (https://elearn.cerides.eu/theme/yui_combo.php?3.17.2/datatype-xml-parse/datatype-xml-parse-min.js&3.17.2/io-xdr/io-xdr-min.js&3.17.2/io-form/io-form-min.js&3.17.2/io-upload-iframe/io-upload-iframe-min.js&3.17.2/queue-promote/queue-promote-min.js&3.17.2/io-queue/io-queue-min.js&3.17.2/event-mousewheel/event-mousewheel-min.js&3.17.2/event-resize/event-resize-min.js&3.17.2/event-hover/event-hover-min.js&3.17.2/event-touch/event-touch-min.js&3.17.2/event-move/event-move-min.js&3.17.2/event-flick/event-flick-min.js&3.17.2/event-valuechange/event-valuechange-min.js&3.17.2/event-tap/event-tap-min.js&3.17.2/event-simulate/event-simulate-min.js&3.17.2/node-event-html5/node-event-html5-min.js&3.17.2/async-queue/async-queue-min.js&3.17.2/gesture-simulate/gesture-simulate-min.js&3.17.2/node-event-simulate/node-event-simulate-min.js&m/1600951585/core/widget/widget-focusafterclose-min.js&3.17.2/plugin/plugin-min.js&m/1600951585/core/lockscroll/lockscroll-min.js&m/1600951585/core/notification/notification-dialogue-min.js:32:287)
at e.Subscriber._notify (https://elearn.cerides.eu/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:40:51)
at e.Subscriber.notify (https://elearn.cerides.eu/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:40:245)
at e.CustomEvent._notify (https://elearn.cerides.eu/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:39:4257)
at e.CustomEvent._procSubs (https://elearn.cerides.eu/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:39:4916)

If you want I can provide you with access to a course to check it out.
In reply to Pericles Cheng

Re: Weird error uploading files

by Arturo Fernandez -
I think I resolved it! Well, not me, some people on the centos web panel forum...
After disable HTTPS successfully, the files upload works again, as Pericles said. I tried other moodle and it worked well. So the problem is related with Centos Web Panel, and to some extent with the browser used. I use macOS so the client OS was not the problem.
I checked the CWP forums and there is a post with the same problem in a Wordpress site!
https://forum.centos-webpanel.com/index.php?topic=10209.0

They suggested doing an Apache rebuild and use the last version 2.4.46.
So I made the rebuild and, after enable HTTPS again, the file upload works again.
Pericles, I think this is the solution, give a try. Keep in mind the rebuild takes some minutes.
Thanks to all!
Average of ratings: Useful (1)
In reply to Arturo Fernandez

Re: Weird error uploading files

by Pericles Cheng -
Thank you Arturo and Rick for the help.

I re-build Apache to 2.4.46 on both servers and everything is back to normal.

For those coming to this forum to see how to re-build in CWP:
Go to Webserver settings - Apache Re-Build and at the bottom you will be able to select the latest version of Apache to run.
In reply to Pericles Cheng

Re: Weird error uploading files

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Arturo, you seem to be on to a solution.

I tried a drag-and-drop in my Moodle 3.10.1 (build:20210118), using Windows 10 Education (20H2 x64) and Edge (version 88.0.705.63,) and it worked. Also worked with Chrome (version88.0,4324.146). So yes, something on your server.

My server is Apache 2.4.46. PHP v7.4.13, MariaDB 10.3.27. CENTOS 7.9, WHM 92.0.8. WHM is cPanel. I do run https.

My server is a VPS, so I don't know how I would rebuild Apache, even if I wanted to.

My server is from GoDaddy, and it is only one month old (I just repurchased a brand new VPS in early January.)
In reply to Rick Jerz

Re: Weird error uploading files

by Arturo Fernandez -
I don't know how to rebuild Apache in WHM, but from what I could read, WHM/cPanel uses RPM Package Manager, that uses pre-build packages. So I guess you could update Apache to its last version 2.4.46. Although it seems that the error only occurs with Centos Web Panel .
Centos Web Panel allows to select the Apache version for its virtual hosts: go to Server Settings in the left menu, then 'Apache Re-Build', select version of Apache and it compiles automatically. As I said, it takes a few minutes in background.
In reply to Arturo Fernandez

Re: Weird error uploading files

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Well, yes, I do have at least two menu items to "update software." My cPanel is set up to update software automatically, but I still sometimes do this manually myself by using cPanel's menu items. I kind of click on these and let them do their thing, not knowing all the items, like Apache, being upgraded.

Okay, it appears that you have a solution.