FirePHP4Chrome
FirePHP4Chrome copied to clipboard
Inverted output
Since version 41.0 I started to recieve an inverted output. Given:
FB::send('1');
FB::send('2');
FB::send('3');
I get in console:
3 2 1
Can you copy/paste the headers from the request? Also what library/tool is at version 41?
Headers:
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:8102
Content-Type:text/html; charset=utf-8
Date:Wed, 25 Mar 2015 09:30:09 GMT
Keep-Alive:timeout=5, max=100
Server:Apache
Set-Cookie:shop=62313f060aa3344d9a0e349794c82a6920cb9656%7E550f26e1d379d2-56026678; path=/xxxxx/src; httponly
Vary:Accept-Encoding
X-Powered-By:PHP/5.5.10
X-Wf-1-1-1-1:663|[{"Type":"LOG","File":"\/xxxxxxx/app\/views\/home.php","Line":109},{"name":"Novedades","type":"last","products":{"__className":"Database_MySQLi_Result","protected:_internal_row":0,"protected:_query":"SELECT *********","protected:_result":{"__className":"mysqli_result","public:current_field":null,"public:field_count":null,"public:lengths":null,"public:num_rows":null,"public:type":null},"protected:_total_rows":12,"protected:_current_row":0,"protected:_as_object":"Model_Product","protected:_object_params":null}}]|
X-Wf-1-1-1-2:832|[{"Type":"LOG","File":"\/xxxxxxx/app\/views\/home.php","Line":109},{"name":"Novedades 2","type":"category","products":{"__className":"Database_MySQLi_Result","protected:_internal_row":0,"protected:_query":"SELECT *******","protected:_result":{"__className":"mysqli_result","public:current_field":null,"public:field_count":null,"public:lengths":null,"public:num_rows":null,"public:type":null},"protected:_total_rows":10,"protected:_current_row":0,"protected:_as_object":"Model_Product","protected:_object_params":null},"categories":["alfombrillas-gaming","gaming"]}]|
X-Wf-1-1-1-3:730|[{"Type":"LOG","File":"\/xxxxxxx/app\/views\/home.php","Line":109},{"name":"xxxxxx","type":"manufacturer","products":{"__className":"Database_MySQLi_Result","protected:_internal_row":0,"protected:_query":"SELECT ********","protected:_result":{"__className":"mysqli_result","public:current_field":null,"public:field_count":null,"public:lengths":null,"public:num_rows":null,"public:type":null},"protected:_total_rows":5,"protected:_current_row":0,"protected:_as_object":"Model_Product","protected:_object_params":null},"manufacturer_id":427}]|
X-Wf-1-1-1-4:712|[{"Type":"LOG","File":"\/xxxxxxx/app\/views\/home.php","Line":109},{"name":"Descuentos","type":"last","products":{"__className":"Database_MySQLi_Result","protected:_internal_row":0,"protected:_query":"SELECT *******","protected:_result":{"__className":"mysqli_result","public:current_field":null,"public:field_count":null,"public:lengths":null,"public:num_rows":null,"public:type":null},"protected:_total_rows":12,"protected:_current_row":0,"protected:_as_object":"Model_Product","protected:_object_params":null}}]|
X-Wf-1-Index:4
X-Wf-1-Plugin-1:http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3
X-Wf-1-Structure-1:http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1
X-Wf-Protocol-1:http://meta.wildfirehq.org/Protocol/JsonStream/0.2
Sorry it took so long to get back to you.
I just used those headers and ran them myself - and I have them in the proper order:
Do you have a different example? Or is this not what's happening for you?
I see this sometimes, too - look at the time marks at the lines. In this case, the groups are broken, too (all are empty, the group contents are in the main list).
Any chance you can send me the headers like the last comment? I haven't been able to duplicate it myself - but believe it's happening - but I need to get the exact response to see if I can get it to happen this time. Thanks!
I've sent you a mail with the headers.
Sorry about the delay @cweiske - I have an IDEA of what it could be - but I'm not sure. Here is what I think is happening: the messages are being sent asynchronously - and something in the system is causing the oldest ones to be processed first. It could be processing delay of some kind? (but that just seems weird - you'd think they'd be random then) or it could be another extension?
Have you tried this same scenario with an incognito window - and only allowing this one extension access? Does it happen on other computers or just yours (do you have access to try another one)? Is it just this one app (that you sent me headers for) or is it any website you work on?
If you can answer those questions - that would be a help. The other idea I had is maybe I can cache all of the messages before they're sent - re-sort them - and then log them. But that would be overhead and memory usage I don't really want to release unless I need to (so I might want you to test a new build if that would be OK).
Thanks!
The HTTP spec tells us that the order of headers is not important:
The order in which header fields with differing field names are received is not significant.
The FirePHP protocol page from 2015-03 says:
Note the sample headers below have been manually ordered to be sequential, something the extension does itself automatically based on the numeric index.
This means that it is known that the headers can be in any order.
I cannot reproduce the issue now, but it should nevertheless be fixed in FirePHP4Chrome.
@cweiske Thanks so much :)
I will make this change next time I am doing an update - as per your request. Let me know if it happens again and I'll jump on it sooner.