chromelogger icon indicating copy to clipboard operation
chromelogger copied to clipboard

Console logs are not preserved with redirect

Open ccampbell opened this issue 10 years ago • 8 comments

See #4 for additional information

There is a checkbox in the chrome dev tools Preserve log upon navigation, but people who have tried it have had mixed results.

ccampbell avatar Jul 09 '13 14:07 ccampbell

Swapping out onResponseStarted with onHeadersReceived seems to make 302, 303, 304, 204, and any other body-less responses work fine for me, as long as Preserve log upon navigation is enabled.

If I had to guess, I'd say that we probably had issues with onHeadersReceived because the event fires so early on. Now that we've got the code to deal with this same problem with onResonseStarted (#22, 6eb44d1d3a82c7d4b287dc935c2e93b5914bbe5b), we can probably safely use onHeadersReceived instead.

I threw a few mangled/illegal HTTP responses (ie. a body-less 200) at the extension, and onHeadersReceived worked every time. onResonseStarted ironically works for malformed 302s and 303s (missing a Location header), but never worked for other body-less responses.

schmod avatar Jul 09 '13 14:07 schmod

Sweet! I will push a new version later today then! I think you are right that the reason it wasn't working before was because of the race condition you fixed.

ccampbell avatar Jul 09 '13 14:07 ccampbell

Hi, it seems that with the current PHP implementation (version 4.1.0) this issue persists. Regards, Marco

marco-santamaria avatar Sep 18 '13 16:09 marco-santamaria

Also encountering the same problem here. Any progress made on this one?

cyberwolf avatar Dec 12 '13 21:12 cyberwolf

This issue still exists with 4.1.0. Using PHP. Slim framework with Monolog's chromephphandler class. I am redirecting due to missing information. I can see the X-ChromeLogger-Data header on the 302 redirect response, but it is not captured (with Preserve log checked).

kgustine avatar Jan 17 '15 03:01 kgustine

Just ran into this today, the issue is over a year old, is there any chance of it being fixed soon?

mattzuba avatar Feb 13 '15 21:02 mattzuba

Any news about this issue ?

togro avatar Mar 04 '16 13:03 togro

Also hitting this problem

caffeinejolt avatar Apr 30 '19 16:04 caffeinejolt