New issue
Advanced search Search tips

Issue 665617 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: ----



Sign in to add a comment

Surface stale token errors, e.g. "Please refresh your page"

Project Member Reported by donnd@chromium.org, Nov 15 2016

Issue description

Trying to paste in "665616" I see a red "Error" today.  Also trying to unlink a bug by clicking the x in the bug tile doesn't do anything except give MD feedback.
 

Comment 1 by donnd@chromium.org, Nov 15 2016

Maybe the underlying alert for the build issue was going away, and that caused the problem?
Status: Available (was: Untriaged)
From looking at the logs, it looks like you need to refresh your page. Your xrsf token expired, and so our server starts rejecting your requests.

We should surface this information better.
Perhaps we should add a full page autorefresh timed a bit before the XRSF token expire time? 

Comment 4 by donnd@chromium.org, Nov 15 2016

Summary: Surface stale token errors, e.g. "Please refresh your page" (was: Linking and unlinking bugs showing an error instead of linking)
That totally fits what I saw.

Comment 5 by donnd@chromium.org, Nov 15 2016

The periodic updates to issues that you're currently doing is really nice, BTW.  It lets the sheriff just leave the page open at tab 1 and working off of it all day.
Labels: Milestone-UX
Asking the user to make a full page refresh is suboptimal.

Monorail has an ajax wrapper that attempts to auto-refresh the xsrf token under the hood when the server returns an unauthorized response code.  We should do something similar.  
 Issue 668210  has been merged into this issue.
Owner: martiniss@chromium.org
Status: Assigned (was: Available)
I'll take a look at this.
Thanks Stephen! Here's the relevant code from Monorail you can use as an example. The js client has a function to silently refresh xsrf tokens so you can always just call CS_doPost() and be done with it:
https://cs.chromium.org/chromium/infra/appengine/monorail/static/js/framework/framework-ajax.js?l=44

And the server action it uses to do the refresh:
https://cs.chromium.org/chromium/infra/appengine/monorail/framework/tokenrefresh.py?l=24

Something similar in Go should be pretty straightforward. 
Status: Started (was: Assigned)
CL out: https://chromium-review.googlesource.com/c/414428/
Status: Fixed (was: Started)
This will go out in tomorrow's weekly release.

Sign in to add a comment