Usermin error when sending: Expecting form-data encoding, but got normal encoding

Hello, no real problems in the long run with Usermin, but in the last few months just got a lot of them. The last one prevents all the users to send email from the interface. Instead it throws a stupid error (what does this even mean?):

Expecting form-data encoding, but got normal encoding

Is there anything I can do ASAP as people are trying to send emails, especially at Christmas time?

And please check on breaking major functionalities, as you released a web client that doesn't send emails.

Later edit: making this public as it has been almost a month, and here https://github.com/qooob/authentic-theme/issues/979#issuecomment-355857544 it is marked as solved when it is not. I guess it is the same error, but apparently different cause?

Status: 
Active

Comments

fakemoth's picture
Submitted by fakemoth on Sun, 12/24/2017 - 02:31 Pro Licensee

Title: Usermin Expecting form-data encoding, but got normal encoding » Usermin error when sending: Expecting form-data encoding, but got normal encoding
fakemoth's picture
Submitted by fakemoth on Sun, 12/24/2017 - 04:35 Pro Licensee

Tried to restart the server... figured maybe some caching issues, and now when I hit "Compose" I get:

Failed to open /home/masteruser/homes/mailuser/.tmp/.tmp_ZTRjMmQ5NGQ5NWM5OWZhYmJmMDgxZTkxYmZmMzYzYjg_usermin_redirected_mailuser for writing : No such file or directory

Howdy -- are you seeing that error like the one in your second comment for all users, or just that one?

We had released a development version of Usermin, 1.732, that's designed to fix some bugs that's available here:

http://www.webmin.com/devel.html

It's not yet in the Virtualmin repos, though it will be in the next few days.

My suggestion would be to give that updated version a try, and see if that resolves the issue.

fakemoth's picture
Submitted by fakemoth on Wed, 12/27/2017 - 07:48 Pro Licensee

Hello, hope you had a great Christmas!

It was happening for all users. But I did install Usermin 1.732 and it reverted to the first error:

Error
Expecting form-data encoding, but got normal encoding

Anything else I can try? Rebooting now to be sure that services are properly started.

Later edit: a reboot didn't help, here are the versions:

Operating system CentOS Linux 7.4.1708
Webmin version 1.871 Usermin version 1.732
Virtualmin version 6.02 Pro Cloudmin version 9.3 Pro
Theme version Authentic Theme 19.06 Time on system Wednesday, December 27, 2017 3:48 PM
Kernel and CPU Linux 3.10.0-693.11.1.el7.x86_64 on x86_64 Processor information Intel(R) Xeon(R) CPU E5540 @ 2.53GHz, 16 cores
fakemoth's picture
Submitted by fakemoth on Wed, 12/27/2017 - 08:17 Pro Licensee

I had to downgrade all the packages regarding Webmin and Usermin, and now after a reboot it works, so it was definitely the upgrades. The "working fine versions" are:

Operating system CentOS Linux 7.4.1708
Webmin version 1.870 Usermin version 1.720
Virtualmin version 6.02 Pro Cloudmin version 9.3 Pro
Theme version Authentic Theme 19.04. Latest available release 19.06    Update Changelog Download Options Time on system Wednesday, December 27, 2017 4:11 PM
Kernel and CPU

BTW. Were there any security issues solved that we should be aware? Thank you for your time and please try to solve this problem.

fakemoth's picture
Submitted by fakemoth on Fri, 01/05/2018 - 11:49 Pro Licensee

OK so I updated again to the latest official software, see bellow, and it reverted to the same error: Expecting form-data encoding, but got normal encoding. I rebooted if it matters - please drop a word at least: what should I test, what other info do you need, etc?

Any help after all this time would be greatly appreciated. It's a major feature that still breaks on me, with 3 different updates, and never did in years.

Operating system CentOS Linux 7.4.1708
Webmin version 1.872 Usermin version 1.732
Virtualmin version 6.02 Pro Cloudmin version 9.3 Pro
Theme version Authentic Theme 19.07 Time on system Friday, January 5, 2018 7:35 PM
Kernel and CPU Linux 3.10.0-693.11.6.el7.x86_64 on x86_64

Does switching to a different theme make any different?

fakemoth's picture
Submitted by fakemoth on Sun, 01/14/2018 - 06:00 Pro Licensee

Yes Jamie, with the old Virtualmin Framed Theme it is working fine, one can send emails, compose, reply and so on; and yes, once again, it happens with all the accounts. I had no choice but to upgrade as I am the kind that applies updates, and because in my opinion the longer you wait, the harder becomes to track a problem with the update.

So after I updated all the Webmin stack I also updated Authentic to 19.08 and the problem is still there. And it seems I have to bear the framed theme for now... but please do something about this.

Thanks and here are the versions:

Operating system CentOS Linux 7.4.1708
Webmin version 1.872 Usermin version 1.732
Virtualmin version 6.02 Pro Cloudmin version 9.3 Pro
Theme version Authentic Theme 19.08 Time on system Sunday, January 14, 2018 1:57 PM
Kernel and CPU Linux 3.10.0-693.11.6.el7.x86_64 on x86_64

Also the errors in Usermins log, filled with them:

Use of uninitialized value $qstart in concatenation (.) or string at ./mailbox-lib.pl line 2030.
Use of uninitialized value $bs in concatenation (.) or string at /usr/libexec/usermin/mailbox/index.cgi line 201.
Use of uninitialized value $be in concatenation (.) or string at /usr/libexec/usermin/mailbox/index.cgi line 201.
Use of uninitialized value $bs in concatenation (.) or string at /usr/libexec/usermin/mailbox/index.cgi line 210.
Use of uninitialized value $be in concatenation (.) or string at /usr/libexec/usermin/mailbox/index.cgi line 210.
Use of uninitialized value $bs in concatenation (.) or string at /usr/libexec/usermin/mailbox/index.cgi line 211.
Use of uninitialized value $be in concatenation (.) or string at /usr/libexec/usermin/mailbox/index.cgi line 211.
Use of uninitialized value $bs in concatenation (.) or string at /usr/libexec/usermin/mailbox/index.cgi line 226.
Use of uninitialized value $be in concatenation (.) or string at /usr/libexec/usermin/mailbox/index.cgi line 226.
Use of uninitialized value in division (/) at /usr/libexec/usermin/mailbox/index.cgi line 304.
Use of uninitialized value in split at /usr/libexec/usermin/mailbox/delete_mail.cgi line 10.
Use of uninitialized value in split at ./mailbox-lib.pl line 600.
Use of uninitialized value $file in substitution (s///) at ./mailbox-lib.pl line 667.
Use of uninitialized value $file in substitution (s///) at ./mailbox-lib.pl line 668.
Use of uninitialized value $file in substitution (s///) at ./mailbox-lib.pl line 670.
Use of uninitialized value in concatenation (.) or string at ./mailbox-lib.pl line 1294.
Use of uninitialized value in split at ./mailbox-lib.pl line 600.
Use of uninitialized value $file in substitution (s///) at ./mailbox-lib.pl line 667.
Use of uninitialized value $file in substitution (s///) at ./mailbox-lib.pl line 668.
Use of uninitialized value $file in substitution (s///) at ./mailbox-lib.pl line 670.
Use of uninitialized value $sig in substitution (s///) at /usr/libexec/usermin/mailbox/reply_mail.cgi line 44.
Use of uninitialized value $sig in concatenation (.) or string at /usr/libexec/usermin/mailbox/reply_mail.cgi line 45.
Use of uninitialized value $mailbox::config{"server_name"} in string eq at ./mailbox-lib.pl line 1323.
Use of uninitialized value $mailbox::config{"server_name"} in string eq at ./mailbox-lib.pl line 1335.
Use of uninitialized value $mailbox::config{"server_name"} in string eq at ./mailbox-lib.pl line 1335.
readline() on closed filehandle $ADDRESS at ./mailbox-lib.pl line 166.
readline() on closed filehandle $ADDRESS at ./mailbox-lib.pl line 166.
readline() on closed filehandle $ADDRESS at ./mailbox-lib.pl line 166.
readline() on closed filehandle $ADDRESS at ./mailbox-lib.pl line 166.
readline() on closed filehandle $ADDRESS at ./mailbox-lib.pl line 166.
Use of uninitialized value in concatenation (.) or string at /usr/libexec/usermin/mailbox/reply_mail.cgi line 836.
Use of uninitialized value $subs in concatenation (.) or string at /usr/libexec/usermin/mailbox/reply_mail.cgi line 836.
Use of uninitialized value in concatenation (.) or string at /usr/libexec/usermin/mailbox/reply_mail.cgi line 838.
Use of uninitialized value $subs in concatenation (.) or string at /usr/libexec/usermin/mailbox/reply_mail.cgi line 838.
Use of uninitialized value $subs in concatenation (.) or string at /usr/libexec/usermin/mailbox/reply_mail.cgi line 840.
Use of uninitialized value in concatenation (.) or string at /usr/libexec/usermin/mailbox/reply_mail.cgi line 875.
Error: Expecting form-data encoding, but got normal encoding
fakemoth's picture
Submitted by fakemoth on Sun, 01/14/2018 - 06:15 Pro Licensee

Also for quite some time, both Webmin and Usermin don't seem to respect the auto-logout settings, with Authentic; the timeouts instantly work when I revert to Framed.

Can confirm Expecting form-data encoding, but got normal encoding after attempting to 'Send Mail' from Usermin with Authentic theme. I have no problem with the Gray Framed Theme.

Webmin version 1.872
Virtualmin version 6.02-2 Pro
Operating system Debian Linux 9
Usermin version 1.732
Theme version Authentic Theme 19.09-beta1

Our next usermin package release will include a fix for this.

fakemoth's picture
Submitted by fakemoth on Mon, 01/29/2018 - 06:44 Pro Licensee

Back again. Ok so a new Usermin is out, I got now vs 1.734

The good news is that the problem is solved and the error is gone, so for now I will leave Usermin with Authentic <<< greatest theme ever BTW.

But another problem has appeared: when I try saving an attachment it is saved as .bin file. It is happening for all the files, no matter the type/extension, older or new emails, it's like MIME types going berserk...

Can someone else confirm this bug?

Seems like a separate issue, but maybe a new bug. Is this happening when you click the "Save" button next to an attachment when viewing an email?

fakemoth's picture
Submitted by fakemoth on Tue, 01/30/2018 - 05:00 Pro Licensee

Yes it does, I get to download a .bin file no matter the extension:

-when I click the Attachment name

-when I click the View button

-when I click the Save button

The Open button works fine, it opens the picture in another tab.

fakemoth's picture
Submitted by fakemoth on Tue, 01/30/2018 - 05:04 Pro Licensee

Though, for Ilia, I should mention that a newly opened tab has the old favicon :D