No Log out timer

29 views
Skip to first unread message

Ben Wagner

unread,
Mar 21, 2016, 4:13:18 PM3/21/16
to xnat_discussion
I'm not getting the count down timer on any pages.  Odd.  Chrome developer tools is listing below for javascript when I load the front page (just after log in).

timeLeft.js:299 
Uncaught TypeError: Cannot read property 'flag' of nulltimeout.syncSessionExpirationCookieWithLocal @ timeLeft.js:299
(anonymous function) @ timeLeft.js:410

I've rebuilt and updated the database.  No luck.  Same oddity with IE.

Ben

Herrick, Rick

unread,
Mar 21, 2016, 4:32:08 PM3/21/16
to xnat_di...@googlegroups.com
Have a look at the request and response objects in the browser dev tools. Check to see if a cookie named SESSION_EXPIRATION_TIME is being set. It looks like the issue is here:

var cookieExpirationTime = timeout.synchronizingCookies.expirationTime.get();
if (timeout.settings.expirationTime.flag !== cookieExpirationTime.flag) {

cookieExpirationTime is null, thus the message "Cannot read property 'flag' of null”. And cookie expiration time is pulled directly from SESSION_EXPIRATION_TIME. That in turn is set by the class UpdateExpirationCookie, which is a simple servlet filter, so it should always be set and working, but maybe not?

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

(314) 740-5961


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

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Ben Wagner

unread,
Mar 21, 2016, 4:46:57 PM3/21/16
to xnat_di...@googlegroups.com
Hi Rick,
  I' m getting a cookieExpirationTime that is null.  Not well versed in using the devel tools.  Don't know how to check the rest.

Ben

Ben Wagner

unread,
Mar 22, 2016, 11:19:46 AM3/22/16
to xnat_discussion
Hi Rick,

Went searching for the UpdateExpirationCookie and found these nuggets.  See highlight at end of each log snip in red.  I didn't notice this until after I had moved all the custom templates out of /var/lib/tomcat/webapps/xnat/templates/screens as I needed to access the original edit screen of many element.  Don't think that is related.  The fact I couldn't submit the edit probably is.

Ben


===xdat.log===

2016-03-22 08:33:48,159 [ajp-bio-8009-exec-37] ERROR org.nrg.xft.schema.Wrappers.GenericWrapper.GenericWrapperElement -
org.nrg.xft.exception.FieldNotFoundException: Field not found: 'demographics[@xsi:type=xnat:demographicData]'
        at org.nrg.xft.schema.Wrappers.GenericWrapper.GenericWrapperElement.isMultipleReference(GenericWrapperElement.java:3415)
        at org.nrg.xft.schema.Wrappers.GenericWrapper.GenericWrapperElement.IsMultipleReference(GenericWrapperElement.java:3374)
        at org.nrg.xdat.schema.SchemaElement.createDisplayFieldForXMLPath(SchemaElement.java:274)
        at org.nrg.xdat.schema.SchemaElement.getDisplayFieldForXMLPath(SchemaElement.java:345)
        at org.nrg.xdat.om.base.BaseXnatProjectdata.getDefaultSearch(BaseXnatProjectdata.java:928)
        at org.nrg.xnat.restlet.resources.ProjectSearchResource.getRepresentation(ProjectSearchResource.java:72)
        at org.restlet.resource.Resource.handleGet(Resource.java:464)
        at org.restlet.Finder.handle(Finder.java:353)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
        at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112)
        at org.restlet.Application.handle(Application.java:341)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
        at org.restlet.Component.handle(Component.java:673)
        at org.restlet.Server.handle(Server.java:331)
        at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68)
        at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147)
        at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:163)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.nrg.xnat.restlet.util.UpdateExpirationCookie.doFilter(UpdateExpirationCookie.java:38)



===restlet.log===

2016-03-22 08:33:50,913 [ajp-bio-8009-exec-57] ERROR org.nrg.xnat.restlet.resources.search.CachedSearchResource -
org.postgresql.util.PSQLException: ERROR: column "cnt_xnat_mrsessiondata_multimodalschi" does not exist
  Position: 85
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
        at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
        at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
        at org.nrg.xft.db.PoolDBUtils.executeQuery(PoolDBUtils.java:867)
        at org.nrg.xft.db.PoolDBUtils.executeSelectQuery(PoolDBUtils.java:402)
        at org.nrg.xft.XFTTable.Execute(XFTTable.java:51)
        at org.nrg.xft.db.views.LegacyMaterializedViewImpl.getData(LegacyMaterializedViewImpl.java:255)
        at org.nrg.xft.db.views.LegacyMaterializedViewImpl.getData(LegacyMaterializedViewImpl.java:222)
        at org.nrg.xnat.restlet.resources.search.CachedSearchResource.getRepresentation(CachedSearchResource.java:112)
        at org.restlet.resource.Resource.handleGet(Resource.java:464)
        at org.restlet.Finder.handle(Finder.java:353)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
        at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112)
        at org.restlet.Application.handle(Application.java:341)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
        at org.restlet.Component.handle(Component.java:673)
        at org.restlet.Server.handle(Server.java:331)
        at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68)
        at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147)
        at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:163)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.nrg.xnat.restlet.util.UpdateExpirationCookie.doFilter(UpdateExpirationCookie.java:38)


===application log===

2016-03-22 08:35:06,926 [ajp-bio-8009-exec-35] ERROR org.restlet.XNATVirtualHost.XNATApplication - Unhandled exception or error i
ntercepted
java.lang.NullPointerException
        at java.util.Collections.sort(Collections.java:216)
        at org.nrg.xft.XFTTable.sort(XFTTable.java:1178)
        at org.nrg.xnat.restlet.resources.SecureResource.representTable(SecureResource.java:433)
        at org.nrg.xnat.restlet.resources.SecureResource.representTable(SecureResource.java:425)
        at org.nrg.xnat.restlet.resources.search.CachedSearchResource.getRepresentation(CachedSearchResource.java:137)
        at org.restlet.resource.Resource.handleGet(Resource.java:464)
        at org.restlet.Finder.handle(Finder.java:353)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
        at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112)
        at org.restlet.Application.handle(Application.java:341)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
        at org.restlet.Component.handle(Component.java:673)
        at org.restlet.Server.handle(Server.java:331)
        at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68)
        at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147)
        at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:163)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.nrg.xnat.restlet.util.UpdateExpirationCookie.doFilter(UpdateExpirationCookie.java:38)

Herrick, Rick

unread,
Mar 22, 2016, 11:37:38 AM3/22/16
to xnat_di...@googlegroups.com
That’s probably not related. Because UpdateExpirationCookie is a filter, it will show up in every single full stack trace, along with every other filter all the way to the top of the Tomcat stack and beyond, starting with:

at java.lang.Thread.run(Thread.java:744)

There are actually at least four XNAT-specific filters that will almost always show up in those messages:

at org.nrg.xnat.restlet.util.UpdateExpirationCookie.doFilter(UpdateExpirationCookie.java:38)
at org.nrg.xnat.security.XnatArcSpecFilter.doFilter(XnatArcSpecFilter.java:40)
at org.nrg.xnat.security.XnatBasicAuthenticationFilter.doFilter(XnatBasicAuthenticationFilter.java:134)
at org.nrg.xnat.security.XnatExpiredPasswordFilter.doFilter(XnatExpiredPasswordFilter.java:135)

You have to go through those things to get down into any of the code that can then actually break.

For the browser dev tools, it depends on the browser, but what you really want to do is open that up and switch to the Network panel. Log in, clear the Network panel, and reload the page. I use Opera on OS X, but most browsers have very similar toolsets. You should see something like this:

The panel on the right side tells you all of the calls to the server that the browser made to load the page. That very top entry is the result for loading the page itself. The page then loads graphics, CSS, and JavaScript files, makes REST calls back to the server to load, e.g., the project and experiment lists, etc., which is what all of the other calls are.

If you click on that page load, you’ll see the details about that HTTP request itself:


The cookies are specified in there, but you can look at them directly through the Cookies tab. Here you can see that the SESSION_EXPIRATION_TIME cookie is getting set:


-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

(314) 740-5961

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

Ben Wagner

unread,
Mar 22, 2016, 12:58:47 PM3/22/16
to xnat_di...@googlegroups.com
Hi Rick,
  Thanks for the pretty pictures. =)  Here's mine.

Inline image 1

So SESSION_EXPIRATION_TIME is being set.  Next step?

Ben

Herrick, Rick

unread,
Mar 22, 2016, 1:00:59 PM3/22/16
to xnat_di...@googlegroups.com
One of the other panels in there will be the console. Switch over to that and reload the page. See if you see any errors appear in the console. I’m wondering if it’s somehow failing to parse the cookie and translate that into a time it can display…
image.png
Screen Shot 2016-03-22 at 10.33.17 AM.png
Screen Shot 2016-03-22 at 10.29.55 AM[Bs6o].png
Screen Shot 2016-03-22 at 10.35.35 AM.png

Ben Wagner

unread,
Mar 22, 2016, 1:10:33 PM3/22/16
to xnat_di...@googlegroups.com
Just the same error in the original email:


timeLeft.js:299 
Uncaught TypeError: Cannot read property 'flag' of nulltimeout.syncSessionExpirationCookieWithLocal @ timeLeft.js:299
(anonymous function) @ timeLeft.js:410

It's count keeps updating +1 every second.  No other errors.


Ben Wagner

unread,
Jul 15, 2016, 1:48:38 PM7/15/16
to xnat_discussion
timeLeft.js:299 
Uncaught TypeError: Cannot read property 'flag' of nulltimeout.syncSessionExpirationCookieWithLocal @ timeLeft.js:299

Backstory.  I was getting this error in the chrome console and not logout timer in the top bar.  Finally decided to come at this again (it was killing the XTK XNAT viewer) and found the problem.  I had secured the site at the request of our IR department and it was setting the SESSION_EXPIRATION_TIME cookie as HttpOnly and Secure.  Taking those flags off for the cookie fixed the problem.

In apache the change I made  was in from:

Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure

to 

Header edit Set-Cookie ^(.*!SESSION_EXPIRATION_TIME)$ $1;HttpOnly;Secure


Now it is time for lunch,
Ben
Reply all
Reply to author
Forward
0 new messages