## Error while submitting

Announcements, comments, ideas, feedback, and "How do I... ?" questions
rds_98
Posts: 2
Joined: Sat Jan 11, 2020 8:22 pm

### Error while submitting

I am getting the following error while submitting any problem solution.

Code: Select all

An error occurred whilst trying to submit your guess


Jevoux
Posts: 6
Joined: Thu Jan 16, 2020 8:35 pm
Location: Portugal
Contact:

### Re: Error while submitting

Hello everyone,

I am new to the forum and was trying my luck with the first problem when I also got this message. Even wondered if that was a subtle way of telling me to try another answer.
Should I not be worried then?

euler
Posts: 3310
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

### Re: Error while submitting

Hi Jevoux, and welcome. This should not happen at all. Did this happen once or has it happened more than once? The answer submission page is using the exact same system that allows you to modify your account details, so if the answer submission is not working, then I imagine you cannot change any of your details either. Is that the case? What platform are you using to access that page?

impudens simia et macrologus profundus fabulae

Jevoux
Posts: 6
Joined: Thu Jan 16, 2020 8:35 pm
Location: Portugal
Contact:

### Re: Error while submitting

Hi Euler,
Thank you very much!
The error message shows up every time I try to give an answer and, as you pointed out, also when I try to change my account details. The same message shows up.
I am using Chrome version 79.0.3945.117 (Official Build) (64-bit) to access the site.
I might try to log with a different browser later to test and I'll let you know. I could also post a screenshot of the error message if it helps.

euler
Posts: 3310
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

### Re: Error while submitting

Thanks for getting back. This is growing into a greater mystery. I use Firefox myself, but I test in other browsers and I'm unable to replicate the problem using the same version of Chrome you gave.

It is common practice with modern sites to have each page involving a submission generating a hashed version of a one-time token in a hidden field on the form. That particular error is generated when either the browser fails to forward the expected token to the server or the session has expired (if the page has been left dormant for a long period of time).

Is it possible that you're using some kind of plug-in which blocks page elements or the data is possibly being submitted from a custom generated page?

impudens simia et macrologus profundus fabulae

Jevoux
Posts: 6
Joined: Thu Jan 16, 2020 8:35 pm
Location: Portugal
Contact:

### Re: Error while submitting

Hello Euler,

Sorry, it took me a while to test it again.
I actually just made a successful attempt to give an answer with Edge.
Well, the answer was wrong, but this time I saw the proper page for the incorrect answer and not an error message.

Indeed I have multiple plugins in Chrome that could be dragging the response time. I tried closing all the plugins and closing them one by one before trying the answer with the same message showing up.

I am not very enthusiastic about using Firefox or Edge, but at least the latter is already installed. I wouldn't mind using another browser on the website as Chrome seems to work fine in the forum.
Nevertheless, I suppose you would be interested in getting to the bottom of this error. If so, how can I help?

euler
Posts: 3310
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

### Re: Error while submitting

Jevoux wrote:
Wed Jan 22, 2020 8:33 pm
Nevertheless, I suppose you would be interested in getting to the bottom of this error.
Absolutely, and you certainly should not have to use a different browser.

What is confounding me is that when I use the latest version of Chrome, I don't see the error. I can leave the page inactive for twenty minutes or more and it still submits fine. I'm just not quite sure what is causing it.

Are you using a VPN? As the server uses sessions, it's possible that a rapidly switching set of IP addresses or tunnelling might not allow the server session variable to properly match with your current login.

impudens simia et macrologus profundus fabulae

Jevoux
Posts: 6
Joined: Thu Jan 16, 2020 8:35 pm
Location: Portugal
Contact:

### Re: Error while submitting

No problem, let's try to solve this bonus challenge.

It can't be VPNs nor proxies, I´m connecting directly through my provider.
I also tried uninstalling my plug-ins instead of just disabling them, again nothing.
Tried turning off some apps that check the browser like antivirus, still no dice.
Not sure if it helps, I also tried to pin the problem and received a similar message: "An error occurred whilst trying to pin/unpin the problem".

Any ideas of what else I can test? This must be some issue with my provider if no one else gets this message, right?

euler
Posts: 3310
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

### Re: Error while submitting

I really appreciate you taking the time to try thing out, but sadly I'm not getting any closer. I imagine it's also impossible for you to sign out using the Sign Out link in the menu bar too?

Those errors you're seeing should only happen if the one-time token is not being validated. It is common practice on websites to avoid Cross-Site Request Forgery (CSRF) exploits by having the server generate a randomised token on any page involving an HTML form. This is stored in a session variable and a hashed version of it is placed in the HTML form in a hidden input field. Upon submission the server hashes the session variable and compares it with the posted value. If the two match, then you're good to go. If not, then you will receive that error. So in theory the error would happen in any one of three circumstances: i) The session variable has expired, but this would take a long time and would impact many other aspects of the website functionality. ii) Your browser is not forwarding hidden input fields, but you would struggle to navigate many other websites, as hidden fields are an essential tool. iii) The form is being submitted from a remote location, in which case the corresponding session variable is not being generated, but you're just using a perfectly standard browser.

impudens simia et macrologus profundus fabulae

Nacnud
Posts: 2
Joined: Wed Jan 29, 2020 6:00 pm

### Re: Error while submitting

I too was experiencing this error on Google Chrome. I've been using chrome to solve problems for several years and it has always worked fine. I solved a problem on November 29, 2019, submitted the answer on google chrome, and everything worked as expected.

About 2 weeks ago I was showing someone what Project Euler was and found myself unable to submit an answer as a demonstration, but dismissed it as a fluke.
Today I tried to submit an answer to problem 134 and had no luck doing so, I refreshed the page right after and tried again, still an error. I tried disabling adblocker, vpn, and anything else I though could interfere with me submitting a problem, still got an error. I tried uninstalling most of my chrome extensions and the error persisted through most of them, but when I uninstalled a torrent scanning extension, it started to work again. The extension had been disabled but had clearly still been affecting my browser's communication. May be a solution to the problem rvs_98 and Jevoux are having?

On a sidenote, while this was happening the captcha that is usually on the problem submission page did not show.

This is what my error page looked like:
Attachments
ProjectEuler Error.PNG (85.76 KiB) Viewed 2906 times

euler
Posts: 3310
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

### Re: Error while submitting

@Nacnud: Thank you for the very detailed feedback. It'd be good to know what that torrent scanner was doing that would cause the issue. I keep revisiting the code and testing it and I'm unable to reproduce the issue on my local machine in Chrome (or Firefox). In complete desperation, the only other thing I can think is that the extension is adding it's own hidden HTML variable to the form on the page with the same "name": submit_token, or is blocking hidden input fields. But as you said, it would be very interesting to see if rvs_98 and Jevoux are using a similar extension.

impudens simia et macrologus profundus fabulae

hk
Posts: 10870
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

### Re: Error while submitting

Perhaps it is a good idea to share the name of the offending (torrent) extension?

Nacnud
Posts: 2
Joined: Wed Jan 29, 2020 6:00 pm
I was using an extension simply called "safe torrent scanner", found here: https://chrome.google.com/webstore/deta ... fnalhlkkjb . I don't think I'll be using it again.

euler
Posts: 3310
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

### Re: Error while submitting

@Nacnud: Can I ask... are you able to sign-out? Signing out uses the same token principle as answer submissions and modifying details on your account page, except the hashed token is sent via the URL rather than posting through the HTML form. If you are able to sign-out, then the issue is definitely to do with that extension, or something else, interfering with the data that your browser is forwarding.

impudens simia et macrologus profundus fabulae

Jevoux
Posts: 6
Joined: Thu Jan 16, 2020 8:35 pm
Location: Portugal
Contact:

### Re: Error while submitting

Sorry for taking so long to check back.
That actually did the trick. I wasn't able to log out too, but now it's fixed.
I guess I forgot to uninstall this one because when I did now, everything worked.

The name is indeed Safe torrent scanner.
But it's funny how it did not mess with many other sites. I have this addon for just about a month but I've been going through a couple of other forums in this period.

euler
Posts: 3310
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

### Re: Error while submitting

Jevoux wrote:
Fri Jan 31, 2020 7:10 pm
Sorry for taking so long to check back.
That actually did the trick.
No matter. I'm grateful that you did get back and let me know that it's working for you again.
It is strange that you never experienced the same problem elsewhere, but it does make me slightly suspect of what that extension is doing. There seem to be three possibilities: i) it has filtered out the hidden field on the web form at projecteuler.net because it thinks there is something suspicious about it, ii) it injects a hidden field in every web form as part of it's security check, which coincidentally shares the same "name", iii) it's doing something slightly suspect.

impudens simia et macrologus profundus fabulae

Jevoux
Posts: 6
Joined: Thu Jan 16, 2020 8:35 pm
Location: Portugal
Contact:

### Re: Error while submitting

I'll keep that in mind installing future add-ons. Thanks a lot for being so supportive.

blither
Posts: 1
Joined: Thu May 28, 2020 8:50 am

### Re: Error while submitting

Hey all, just reporting that I too encountered this.

I had the same torrent scanner as mentioned above and after getting rid of it, it worked.

This is cool because I started doing these problems in January or something and thus far haven't checked a single one, so now I get to find out if I'm on the right track!