error 400 at the beginning of survey

More
3 months 2 weeks ago #192087 by fpielage
Hi all,

the seems to be another problem with our active survey, but I don't konw, if it is a browser or a server problem:

Till now there were 763 answers, 207 of them completed. Today I got the first feedback, that a 400 error is displayed. In the server logs I found some additional 400 errors of other participants.

If the error occures, then when someone clicks on the "next" button of the welcome-page.

Version: 3.19.1+191009, php 7.2

Some idea, how to go on?

Herzliche Grüße
fp

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
3 months 2 weeks ago #192092 by jelo
Can you provide a link to the survey (or an Demo survey on the same server)?

Can you reproduce the error? Screenshot with exact 400 error message.

Open the survey on the welcome page and click after 20 minutes the next button.
Open the survey on the welcome page and click after 5 minutes the next button.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #192097 by fpielage
No, I can't reproduce the error.

In a phonecall the participant said, that the only message is
400: wrong request
Until monday he want's to try another computer or another browser.
I ask him, to test the time delay.

I don't feel well, to publish the survey link, because it's active. But I post it via pm.
There is a short subdomain with an redirect to the survey. May this cause the error?

Grüße
fp

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #192102 by DenisChenu
400: wrong request mean in general try to hack something or a bad URL

What is the url when the 400 error happen ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #192112 by jelo

fpielage wrote: In a phonecall the participant said, that the only message is
400: wrong request

Ask for a screenshot of the error.

Is your participant using some of your hosted websites at the same time? You host a few websites on your keyweb server.

The subdomain and redirection shouldn't cause any trouble.
The 400 error often comes with different error messages.
Even though I don't think it is the source of the issue, you should set an individual session name in the config.php.
Currently your LimeSurvey installation uses the default PHP session name PHPSESSID.
session' => array (
'sessionName' => "PrivateCookieName",
),


manual.limesurvey.org/Optional_settings#Session_settings

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #192113 by fpielage
This is a line of the server access log:
195.145.###.### - - [13/Dec/2019:13:12:54 +0100] "POST /index.php/582245 HTTP/1.1" 400 5013 "https://subdomain.domain.de/index.php/582245" "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko" 659 5496
I suppose, about 2-3% of the survey accesses end like this. The IP belogs to a real person, to which I talked via telephone.

There is nothing, what is typical for all of those access-lines. Different browsers, differen IPs, different http (1.1 and 2.0). But "POST /index.php/582245" is the same for all.

Is it possible that it is a cookie problem, if not allowed to be stored in browser?

Grüße
fp

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #192117 by fpielage

jelo wrote: Ask for a screenshot of the error.

Ok, I can get it on Monday.

jelo wrote: Is your participant using some of your hosted websites at the same time? You host a few websites on your keyweb server.

I do'nt think so (using another website at same time), but there is a website at www.domain.de , which uses PHPSESSID too. So I'll change the cookiename tonight. Now there is too much traffic on the survey.

I tried an access with "store no cookies" option, what causes a 400 error, too. So I'll ask my participant about this option.

Thank you very much.

Grüße
fp

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #192168 by fpielage
I changed the cookie name, but I think, that wasn't the problem.

My participant asked him IT-Service again, and they found a cookie blocking. After setting an exeption for the survey subdomain, everything works fine.

My Question is, if it could be possible, that limesurvey checks, if storing of cookies is possible and gives an understandable hint to the user?

Herzliche Grüße
fp

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #192169 by tpartner
You can place something like this in your theme custom.js file:

var cookieTest = function () {
 
	if (navigator.cookieEnabled) return true;
 
	document.cookie = "cookietest=1";
	var ret = document.cookie.indexOf("cookietest=") != -1;
 
	document.cookie = "cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT";
	return ret;
};
 
 
$(document).on('ready pjax:scriptcomplete',function(){
 
	if($('#welcome-container').length > 0) {
 
		if(!cookieTest()) {
			$('#ls-button-submit').prop('disabled', true);
			alert('It appears that you have cookies blocked. Please enable cookies in your browser settings and refresh the page.');
		}
	}
 
});

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
The following user(s) said Thank You: fpielage

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #192171 by fpielage
Thank you very much. The theme I use is the fruity theme. In the meantime I have solved the problem with a note at the bottom of the first page.

Grüße
fp

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #192187 by DenisChenu
Javascript is the only solution , becaus in PHP : you can know if cookie are enable only in a second page.

BUT : maybe we can a cleaner message when :
1. There are a CRSF issue
2. This CRSF issue is about a COOKIE issue

=> Then show : «Seem you disable cookie in your browser : please allow it» :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
2 months 1 week ago #192877 by thompsonmax
Hello there. I have the same issue, thanks for the information.
Attachments:

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!