edit avatar results in browser "cookies required" error and http 400 server response. AWS involved why?

RippC

Member
I'm hoping someone can help me get to the heart of this problem, as its been happening for a while and my users are starting to get fed up....

Clicking on the "Edit" avatar link results in the "cookies are required to use this site" message popping up. There are no server errors logged by XF, but in my access logs I see:

Code:
35.183.19.247 - - [26/Sep/2019:09:12:28 -0500] "GET /account/avatar?_xfRequestUri=%2F&_xfWithData=1&_xfToken=1569506936%2C8096f40c81632cc37fa2363f18163036&_xfResponseType=json HTTP/1.1" 400 217 "https://myforum.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36 X-Middleton/1" "<My IP>, 108.162.241.124" "myforum.com" sn="myforum.com" rt=0.014 ua="unix:/var/run/php/php7.2-fpm-myforum.sock" us="400" ut="0.012" ul="233" cs=-

This makes no sense to me, the first IP (35.x.x.x) is an amazon AWS IP. Every time I click my "edit avatar" link, a different wild AWS IP appears. I have no idea why AWS would be involved in this step, at all. The request does log <My IP> and the cloudflare IP correctly.

The site is on cloudflare, but I've cleared the cache, put it in dev mode, along with every other trick I can think of. Changed the site cookie name, cleared the caches, reset memcache, etc. etc. etc. ...

Why is AWS involved in this and why is it throwing a 400 error? I can't say when this error started happening since I wasn't informed it was a problem until recently. Running XF 2.1.4, ngnix, php7.2 w/fpm...

Edit: Using UI.X 2, and a host of other addons, I've done the "disable all addons" bit, too to see if one of them was at fault with no luck.
 
Last edited:
should also mention that I started using Cloudflare's Argo shortly before I saw this start. I wonder....
 
!#&%!#$%^#$!& I have a suspicion Argo is the culprit. Found another post on CF's forum from a wordpress user with similar ajax/400 issues. Too bad too bc it was really improving the performance of the site... Not turning it off just yet though. Going to see if there's a way around it.
 
OK so its probably not CF. I went through and switched off both ezoic and CF, with no change. But if I disable javascript on the page, it still doesn't work right (throws the "cookies required" message) but I don't get the server request from a random AWS IP. So it has to be a javascript..... Now to figure out which one and why.
 
still trying to figure this one out.... not sure if bumping is allowed but I'm about ready to put my head thru the wall. Pretty much ruled out cloudflare and argo. Still trying to figure out if one of the myriad of JS's ezoic loads up is somehow intercepting that click and sending it to AWS/EC2. I have another XF site on the same nginx install, without ezoic, with cloudflare (no argo) and it works as expected.
 
<insert facepalm>

Turns out I was still using the old KL user improvments addon. At some point, maybe I missed the memo, but TH took this over(?) ... I upgraded the TH version to the latest, purged some caches, waited a bit and now its working again. So, yeah.

:rolleyes:🤔🤪


WRONG. It started working, then just stopped working again. I have no idea.
 
Last edited:
Alrighty then. So I went thru yet again, turned off ALL the caching from ezoic (purged and off), cloudflare (purged and dev mode), turned off Argo, made sure all my addons were in order and old directories removed, rebuilt the site master data.... changed CF's browser cache timeout to 30 minutes, and voila 30 minutes later... it starts working again. So, time to carefully play process of elimination. I did find a setting in ezoic's caching app "enable caching for cookies" which may have been the problem, switched that off, too.

Log:
I turned ezoic's caching back on, and will wait another 30 minutes to see what we get... 30 minutes since that (I think) is what CF is sending at the moment for browser cache time limit...

30 minutes later: still working, so switch CF's dev mode OFF and let it start caching again...

30 minutes later: broken. Turning CF's dev mode ON again and purging the CF cache....
 
OK. all sorts of weirdness and stale cache crap that wouldn't go away, but I have it working again now with CF cache on, ezoic cache OFF, and Argo OFF. I'm going to leave it alone for 30 more minutes and see what breaks next. This is madness.
 
OK, Ezoic's caching is OFF and so far so good. Why the #$^&@#$ that didn't manifest itself the myriad of other times I configured it this way I have no idea. So... We'll see. Turning the CF Browser cache setting back up to 1mo and see what happens. Letting Ezoic know that something isn't working quite right, and not turning that "app" back on again.
 
OK, Ezoic's caching is OFF and so far so good. Why the #$^&@#$ that didn't manifest itself the myriad of other times I configured it this way I have no idea. So... We'll see. Turning the CF Browser cache setting back up to 1mo and see what happens. Letting Ezoic know that something isn't working quite right, and not turning that "app" back on again.

I wouldn't use Ezoic caching anyway.
 
Any other Ezoic issues you found while using it on XF?
I'm trying to setup mine now with them.
 
Top Bottom