Devtools Cookies view does not list XHR cookies if they do not match existing resource
Reported by
jon.rim...@logicalglue.com,
Mar 27 2017
|
||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36
Steps to reproduce the problem:
1. Browse to a site that sets cookies for a variety of paths
2. Open devtools
3. Navigation to Application -> Cookies -> {site URL}
What is the expected behavior?
All the cookies for the selected URL should be listed.
What went wrong?
Only those cookies whose path exactly matches the current browser path are shown. This makes it impossible to debug cookies that are assigned to paths used by XHR requests e.g. /api/
Did this work before? N/A
Chrome version: 57.0.2987.110 Channel: stable
OS Version: OS X 10.12.3
Flash Version:
,
Mar 28 2017
,
Mar 28 2017
Thanks for reporting jon.rimmer! Do you have a URL with an example? When visiting https://developers.google.com/web/ on Chrome 57.0.2987.98 and 59.0.3049.0 I am able to see cookies set on / and /web. Upon issuing a XHR to https://developers.google.com/web/fundamentals/ via the console and refreshing the cookies view, I am able to see cookies set on /web/fundamentals. Perhaps I'm misunderstanding the bug?
,
Mar 29 2017
@phulce The cookies are only visible if the actual URL in the browser URL bar matches the subpath. If you navigate back to http://developers.google.com/, you will no longer see the subpath cookies. If you make an XHR to https://developers.google.com/web/fundamentals/ while the URL bar still says 'http://developers.google.com/', you will *not* see the subpath cookie in the application/cookies, even when you refresh it. API paths are not usually somewhere you can navigate to directly in a Single Page Application, but you need to see the cookies set for them, even when you are accessing the root of the domain.
,
Mar 29 2017
Ah, I see. A fix to cover many missing cookie cases (including use of fetch with subpaths) landed in https://codereview.chromium.org/2623063003. It should be available in beta and canary today and go out with M58. XHR aren't yet fully handled in cookies view, but as an immediate workaround you can refer to the Network panel to view the relevant HTTP cookies. The culprit for ignoring XHR resources is here https://cs.chromium.org/chromium/src/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js?q=resourcetreemodel.js+package:%5Echromium$&dr&l=251. Impact on consideration of XHR as resource on other parts of DevTools is unknown but will triage and explore a fix.
,
Oct 31
Bulk closing low-priority issues with no activity. Please re-file and refer to the closed issue if it's essential to fix. |
||||
►
Sign in to add a comment |
||||
Comment 1 by patricia...@chromium.org
, Mar 28 2017Labels: OS-Chrome OS-Linux OS-Windows