Weird behavior, second try to explain. :)

71 views
Skip to first unread message

Craig Girard

unread,
Jan 31, 2017, 10:34:37 AM1/31/17
to CFWheels
*** This issue only occurs with Firefox.  Everything works fine in Chrome. ***

So, I have a link, the link goes to /divisionHistory/main.  This link is created using JS.  If I click it in my app I lose all session data.  Yet if I manually type the url into the address bar and hit enter, everything works fine.  I have shown this behavior to other devs here and we are all puzzled.  We thought maybe it was the url rewriting, but if I turn that off the same behavior is still observed.

I am guessing this might be a situation where you need to see what is happening.  It is very difficult to explain online, but thought I would try anyway.  Sorry for clogging up the forums. :)

Andrew Bellenie

unread,
Jan 31, 2017, 10:37:38 AM1/31/17
to ColdFusion on Wheels
I've only seen this sort of weirdness once and that was when I was manually creating cookies, cfid and cftoken were being recreated on each request.

--
You received this message because you are subscribed to the Google Groups "CFWheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+unsubscribe@googlegroups.com.
To post to this group, send email to cfwh...@googlegroups.com.
Visit this group at https://groups.google.com/group/cfwheels.
For more options, visit https://groups.google.com/d/optout.

Tom King

unread,
Jan 31, 2017, 10:40:58 AM1/31/17
to CFWheels
Could also be:
 - JS ajax requests are being cached in one browser and not another
 - browsers settings are set to clear cookies on every request
 - some dev tool is on which is causing mayhem

Perhaps try inspecting and comparing the headers/responses of the two requests in each browser.
T

On Tuesday, 31 January 2017 15:37:38 UTC, Andrew Bellenie wrote:
I've only seen this sort of weirdness once and that was when I was manually creating cookies, cfid and cftoken were being recreated on each request.
On 31 January 2017 at 15:34, Craig Girard <craig....@gmail.com> wrote:
*** This issue only occurs with Firefox.  Everything works fine in Chrome. ***

So, I have a link, the link goes to /divisionHistory/main.  This link is created using JS.  If I click it in my app I lose all session data.  Yet if I manually type the url into the address bar and hit enter, everything works fine.  I have shown this behavior to other devs here and we are all puzzled.  We thought maybe it was the url rewriting, but if I turn that off the same behavior is still observed.

I am guessing this might be a situation where you need to see what is happening.  It is very difficult to explain online, but thought I would try anyway.  Sorry for clogging up the forums. :)

--
You received this message because you are subscribed to the Google Groups "CFWheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+u...@googlegroups.com.

Craig Girard

unread,
Jan 31, 2017, 10:57:18 AM1/31/17
to CFWheels
We are using jsession cookies.  You did tip me off though, I saw locally, my machine, they were not set up correctly.  Unfortunately I have fixed that, cleared my cache/cookies and the problem still persists.

Chris Peters

unread,
Jan 31, 2017, 11:00:07 AM1/31/17
to cfwh...@googlegroups.com
What request headers do you see in each browser for the AJAX request? Show us.

On Tue, Jan 31, 2017 at 10:57 AM, Craig Girard <craig....@gmail.com> wrote:
We are using jsession cookies.  You did tip me off though, I saw locally, my machine, they were not set up correctly.  Unfortunately I have fixed that, cleared my cache/cookies and the problem still persists.

--
You received this message because you are subscribed to the Google Groups "CFWheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+unsubscribe@googlegroups.com.
To post to this group, send email to cfwh...@googlegroups.com.
Visit this group at https://groups.google.com/group/cfwheels.
For more options, visit https://groups.google.com/d/optout.



--

Chris Peters
Web Developer
Liquifusion Studios

chris....@liquifusion.com
Skype: liquifusion.support
www.liquifusion.com

Craig Girard

unread,
Jan 31, 2017, 11:21:50 AM1/31/17
to CFWheels
PAGE CONTAINING LINK

RESPONSE HEADERS

HTTP/1.1 200 OK

Cache-Control: no-cache, no-store, must-revalidate,true

Pragma: no-cache

Transfer-Encoding: chunked

Content-Type: text/html;charset=UTF-8

Expires: Tue, 31 Jan 2017 16:12:50 GMT

Server: Microsoft-IIS/10.0

X-Powered-By: ASP.NET

Date: Tue, 31 Jan 2017 16:12:50 GMT


REQUEST HEADERS

Accept
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding
gzip, deflate, br
Accept-Language
en-US,en;q=0.5
Connection
keep-alive
Cookie
__utma=86923917.991736861.1485877819.1485877819.1485877819.1; __utmb=86923917.6.10.1485877819; __utmz
=86923917.1485877819.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmt=1; JSESSIONID=7223F9FB802FA64745B85A59C81D26B4
.cfusion; __utmc=86923917
Host
dev.*.com
Referer
https://dev.*.com/admin/adminState?divisionID=1&stateID=1
Upgrade-Insecure-Requests
1
User-Agent
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0


PAGE HROWING ERROR

RESPONSE HEADERS

HTTP/1.1 200 OK

Cache-Control: no-cache, no-store, must-revalidate,true

Pragma: no-cache

Transfer-Encoding: chunked

Content-Type: text/html;charset=UTF-8

Expires: Tue, 31 Jan 2017 16:18:49 GMT

Server: Microsoft-IIS/10.0

X-Powered-By: ASP.NET

Date: Tue, 31 Jan 2017 16:18:49 GMT

REQUEST HEADERS

Accept
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding
gzip, deflate, br
Accept-Language
en-US,en;q=0.5
Connection
keep-alive
Cookie
__utma=86923917.991736861.1485877819.1485877819.1485877819.1; __utmb=86923917.7.10.1485877819; __utmz
=86923917.1485877819.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmt=1; JSESSIONID=7223F9FB802FA64745B85A59C81D26B4
.cfusion; __utmc=86923917
Host
Referer
https://dev.*.com/division/showdivisionCenter
Upgrade-Insecure-Requests
1
User-Agent
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0


Craig Girard

unread,
Jan 31, 2017, 11:22:24 AM1/31/17
to CFWheels
The above post is from Firefox.

Craig Girard

unread,
Jan 31, 2017, 11:30:02 AM1/31/17
to CFWheels
PAGE WITH LINK

GENERAL

Request Method:GET
Status Code:302 Found
Remote Address:127.0.0.1:443

RESPONSE HEADERS

Cache-Control:no-cache
Content-Type:text/html;charset=UTF-8
Date:Tue, 31 Jan 2017 16:24:18 GMT
Expires:Tue, 31 Jan 2017 16:24:18 GMT
Pragma:no-cache
Server:Microsoft-IIS/10.0
Transfer-Encoding:chunked
X-Powered-By:ASP.NET

REQUEST HEADERS

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, sdch, br
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Cookie:CFADMIN_LASTPAGE_ADMIN=%2FCFIDE%2Fadministrator%2Fdatasources%2Findex%2Ecfm; __utma=114234502.1230095948.1428520470.1432745307.1484766087.7; __utmz=114234502.1484766087.7.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=86923917.1724681713.1426016124.1485530234.1485792337.71; __utmz=86923917.1485272764.64.2.utmcsr=auth.casenex.com|utmccn=(referral)|utmcmd=referral|utmcct=/users/sign_in; JSESSIONID=957E474D9645C9F4EE65331830DDB193.cfusion
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

PAGE THROWING ERROR IN FIREFOX

GENERAL

Request Method:GET
Status Code:200 OK
Remote Address:127.0.0.1:443

RESPONSE HEADERS

Cache-Control:no-cache, no-store, must-revalidate,true
Content-Type:text/html;charset=UTF-8
Date:Tue, 31 Jan 2017 16:28:01 GMT
Expires:Tue, 31 Jan 2017 16:28:00 GMT
Pragma:no-cache
Server:Microsoft-IIS/10.0
Transfer-Encoding:chunked
X-Powered-By:ASP.NET

REQUEST HEADERS

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, sdch, br
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Cookie:CFADMIN_LASTPAGE_ADMIN=%2FCFIDE%2Fadministrator%2Fdatasources%2Findex%2Ecfm; __utma=114234502.1230095948.1428520470.1432745307.1484766087.7; __utmz=114234502.1484766087.7.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); JSESSIONID=957E474D9645C9F4EE65331830DDB193.cfusion; __utmt=1; __utma=86923917.1724681713.1426016124.1485792337.1485879860.72; __utmb=86923917.3.10.1485879860; __utmc=86923917; __utmz=86923917.1485272764.64.2.utmcsr=auth.casenex.com|utmccn=(referral)|utmcmd=referral|utmcct=/users/sign_in
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

Craig Girard

unread,
Jan 31, 2017, 11:30:20 AM1/31/17
to CFWheels
The above is from Chrome

THANK YOU!

Craig Girard

unread,
Jan 31, 2017, 11:31:57 AM1/31/17
to CFWheels
These are not ajax requests, just FYI.

Chris Peters

unread,
Jan 31, 2017, 11:34:55 AM1/31/17
to cfwh...@googlegroups.com
I wonder why the Chrome example has ".cfusion" at the end of the JSESSIONID cookie, and the Firefox one doesn't?

Would it be useful for you show the JavaScript code that is creating the links that cause this strange behavior? And what do these generated links look like in the inspector? Anything strange? I need a better understanding of what you're trying to accomplish here.

Until you start sharing more specific details like code, we're just throwing abstract guesses at you.

On Tue, Jan 31, 2017 at 11:30 AM, Craig Girard <craig....@gmail.com> wrote:
The above is from Chrome

THANK YOU!

--
You received this message because you are subscribed to the Google Groups "CFWheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+unsubscribe@googlegroups.com.
To post to this group, send email to cfwh...@googlegroups.com.
Visit this group at https://groups.google.com/group/cfwheels.
For more options, visit https://groups.google.com/d/optout.

Craig Girard

unread,
Jan 31, 2017, 11:39:45 AM1/31/17
to CFWheels
Sure...

JS on the page...

<script src="/javascripts/header.js"></script><div id="pHead" class="main" onclick="location.href='https://dev.*.com/';"></div><script type="text/javascript">BuildHeader('DIVISION', eval('([{"TEXT":"ADMINISTRATIVE","SEL":false,"HREF":"/division/showdivisionCenter"},{"TEXT":"HISTORY+DATA","SEL":true,"HREF":"/divisionHistory/main"},{"TEXT":"Rtl QUICK CHECKS","SEL":false,"HREF":"/download/rtiQuickChecks?divisionid=1"},{"TEXT":"MATERIALS","SEL":false,"HREF":"/download/materials?divisionid=1"},{"TEXT":"STUDENT DATA UPLOAD","SEL":false,"HREF":"/sdu/main?divisionid=1"}])'), 'YL');</script>

The header.js file

function BuildHeader(badgeText, tabs, tabsClass) { var pHead = document.getElementById('pHead'); var pBadge = document.createElement('div'); pBadge.id = 'pBadge'; pBadge.innerHTML = badgeText; var pTabs = document.createElement('ul'); pTabs.id = 'pTabs'; pTabs.className = tabsClass; pHead.appendChild(pBadge); pHead.appendChild(pTabs); for (var i = 0; i < tabs.length; i++) { var tab = tabs[i]; var li = document.createElement('li'); li.innerHTML = '<a href="'+tab.HREF+'">'+tab.TEXT+'</a>'; tab.SEL ? li.className = 'active' : li.className = ''; pTabs.appendChild(li); } }

The HTML output...

<a href="/divisionHistory/main">HISTORY+DATA</a>



Craig Girard

unread,
Jan 31, 2017, 11:41:31 AM1/31/17
to CFWheels
ALL THE LINKS

<ul id="pTabs" class="YL"><li class=""><a href="/division/showdivisionCenter">ADMINISTRATIVE</a></li><li class="active"><a href="/divisionHistory/main">HISTORY+DATA</a></li><li class=""><a href="/download/rtiQuickChecks?divisionid=1">Rtl QUICK CHECKS</a></li><li class=""><a href="/download/materials?divisionid=1">MATERIALS</a></li><li class=""><a href="/sdu/main?divisionid=1">STUDENT DATA UPLOAD</a></li></ul>

Risto

unread,
Jan 31, 2017, 1:36:47 PM1/31/17
to CFWheels
What version of CF are you using?

Try using coldfusion sessions instead of jsession. If it works, switch back to jsession and
check how your setting cookies. A post will work (multipart/form-data) a post header tp  /application/x-www-form-urlencoded or GET will not
on certain versions of CF. Supposedly bug was fixed in CF10_Update14 but I see some comments still showing 11

This was a filed bug.


Maybe this is you issue? If cfsession works for you, use them instead of jsession unless you are clustering.


Craig Girard

unread,
Jan 31, 2017, 4:13:59 PM1/31/17
to CFWheels
Thanks everyone.  This issue has been solved.  It is so stupid I refuse to share it.  What happens when dealing with very old unorganized code.  Went through 3 of us before someone noticed it.  Is there a way to delete threads so I do not waste anyone elses time with this?
Reply all
Reply to author
Forward
0 new messages