| Error {main} thrown in Phirehose.php on line 745 | Athbi Almutairi | 22/04/14 14:49 | Hello I keep having this error in my log files, after few tweets, this error appear [22-Apr-2014 16:34:49 Asia/Kuwait] PHP Fatal error: Uncaught exception 'Exception' with message 'Twitter did not send a chunking header. Is this really HTTP/1.1? Here are headers: connection: close Content-Type: application/json transfer-encoding: chunked date: Tue, 22 Apr 2014 13:34:49 UTC x-connection-hash: 27b16153dafa551f744b4e19a93a2cdc ' in /phirehose/Phirehose.php:745 Stack trace: #0 /phirehose/Phirehose.php(836): Phirehose->connect() #1 /phirehose/Phirehose.php(411): Phirehose->reconnect() #2 /file.php(60): Phirehose->consume() #3 {main} thrown in /phirehose/Phirehose.php on line 745 any suggestions? Thanks |
| Re: Error {main} thrown in Phirehose.php on line 745 | Athbi Almutairi | 22/04/14 14:51 | I tried both Master and Chunked version.. same error |
| Re: Error {main} thrown in Phirehose.php on line 745 | Phil G | 22/04/14 15:03 | |
| Re: Error {main} thrown in Phirehose.php on line 745 | Phil G | 22/04/14 15:20 | Long answer: I got that error twice today as well. I'm sure it has happened occasionally in the past but the frequency seems to have increased all of a sudden today. Until Fenn merges it into master, you can manually pull in the change that my pull request is for (https://github.com/fennb/phirehose/pull/63). I've also opened a discussion on the Twitter dev site to address this, but regardless, I think it's a safe bet to make the client tolerate this glitch either way. |
| Re: Error {main} thrown in Phirehose.php on line 745 | Darren Cook | 22/04/14 16:17 | > https://github.com/fennb/phirehose/pull/63).
I just merged this. Does anyone fancy doing a quick code review to see if there are any other potential case issues? I also wondered if we ought to use a regex, just in case the space is missing. E.g. if(preg_match('/^transfer-encoding:\s*chunked$/i', $hLine)) $isChunking = true; ? Darren |
| Re: Error {main} thrown in Phirehose.php on line 745 | Darren Cook | 22/04/14 18:08 | Ironically, after doing this merge, I carried on working through my
morning email, server logs, and found my own servers were all stopped because of this. I guess Twitter did an upgrade, and chose today to roll-out to everyone? Thanks again to "fubar" for the speedy fix. Q1. As old versions of Phirehose are now basically broken, I guess we ought to do another proper release? Change from "1.0RC" to Version "1.0.1"? Git tag as "1.0.1". Anything else we do? Is there a zip download file kept somewhere? (If so it also ought to be mentioned in the github Readme.md file.) Q2. Does anyone have a contact at Twitter, so we could get advance warning of even minor system updates? Then we could do tests against their staging server, and catch these problems before they affect live users! (Actually it amazes me that Twitter haven't reached out to us; encouraging library developers is common-sense for any company with an API.) Darren P.S. If anyone has some time, I noticed https://github.com/fennb/phirehose/wiki/Introduction is quite out of date now. -- Darren Cook, Software Researcher/Developer My new book: Data Push Apps with HTML5 SSE Published by O'Reilly: (ask me for a discount code!) http://shop.oreilly.com/product/0636920030928.do Also on Amazon and at all good booksellers! |
| Re: Error {main} thrown in Phirehose.php on line 745 | Phil G | 22/04/14 18:41 | Thanks for merging this so quickly Darren. Though this issue was rather disruptive and it would be nice to get ahead notices, I am speculating that it is an unfortunate bug that made it into production as part of one of frequent minor releases that don't grant any announcements. Major changes such as deprecating HTTP 1.0 in favour of 1.1 are always well planned and publicly announced well ahead of time. Phil |
| Re: Error {main} thrown in Phirehose.php on line 745 | Athbi Almutairi | 23/04/14 14:08 | Thanks Darren for the quick merge |
| Re: Error {main} thrown in Phirehose.php on line 745 | Phil G | 25/04/14 17:24 | Quick update for everyone: HTTP header field names actually are case-insensitive. See https://dev.twitter.com/discussions/27837#comment-63086 |