Page MenuHomePhabricator

RCStream is not accessible from python client due to using socket-io 1.0 while only socket-io 0.9 is offered
Closed, DeclinedPublic

Description

INFO:urllib3.connectionpool:Starting new HTTP connection (1): stream.wikimedia.org
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388662485-0 HTTP/1.1" 404 13
WARNING:root:stream.wikimedia.org:80/socket.io [waiting for connection] unexpected status code (404)
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388663760-0 HTTP/1.1" 404 13
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388664889-0 HTTP/1.1" 404 13
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388666018-0 HTTP/1.1" 404 13
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388667145-0 HTTP/1.1" 404 13
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388668273-0 HTTP/1.1" 404 13
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388669399-0 HTTP/1.1" 404 13

neverending

Related Objects

StatusAssignedTask
DeclinedXqt
DeclinedNone
DeclinedNone
ResolvedKrinkle
DeclinedKrinkle
ResolvedOttomata
DuplicatePchelolo
ResolvedPchelolo
ResolvedOttomata
ResolvedNuria
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
DeclinedOttomata
DeclinedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedHalfak
ResolvedJAllemandou
DeclinedNone
ResolvedOttomata
DeclinedOttomata
ResolvedOttomata
Resolvedmforns
ResolvedOttomata
ResolvedXqt
DuplicateNone
ResolvedCmjohnson
ResolvedXqt
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
DeclinedOttomata
DeclinedOttomata
ResolvedOttomata

Event Timeline

Petrb created this task.Mar 3 2015, 1:18 PM
Petrb raised the priority of this task from to Needs Triage.
Petrb updated the task description. (Show Details)
Petrb added a project: Wikimedia-Stream.
Petrb added a subscriber: Petrb.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 3 2015, 1:18 PM
Petrb updated the task description. (Show Details)EditedMar 3 2015, 1:18 PM
Petrb set Security to None.
Sample code:

#!/usr/bin/python
import logging
import socketIO_client
import json

logging.basicConfig(level='DEBUG')

class WikiNamespace(socketIO_client.BaseNamespace):
    def on_reconnect(self, *args):
        self.emit('subscribe', '*')
    def on_connect(self):
        self.emit('subscribe', '*')


socketIO = socketIO_client.SocketIO('stream.wikimedia.org', 80)
socketIO.define(WikiNamespace, '/rc')

socketIO.wait()
Petrb added a comment.Mar 3 2015, 1:20 PM
This comment was removed by Petrb.
Petrb triaged this task as Unbreak Now! priority.Mar 3 2015, 1:27 PM
Krinkle added a subscriber: Krinkle.Mar 3 2015, 3:49 PM

The 404 errors look like a client trying to communicate using the socket-io 1.0 protocol. RCStream (at the moment) uses the more widespread socket-io 0.9 protocol. See T68232. If using a popular library, you may have to install an older version of it. Or use an alternate built-in (e.g. one of the php libraries out there ships a Version1 and Version09 client class).

Aklapper renamed this task from RCStream is not accessible from python to RCStream is not accessible from python client due to using socket-io 1.0 while only socket-io 0.9 is offered.Mar 6 2015, 10:25 AM
Aklapper lowered the priority of this task from Unbreak Now! to Normal.
XZise added a subscriber: XZise.

I can confirm that. The entry on pypi mentions that the latest version (0.6.1 as of this comment) supports socket.io 1.0. I installed 0.5.5 and I don't get the 404 error.

Krinkle moved this task from Inbox to Backlog on the Wikimedia-Stream board.Jul 23 2015, 7:30 PM
jayvdb added a subscriber: jayvdb.

This is a pretty high risk for Python apps. v0.5.5 was released Feb 17 , and we're stuck on that version.
Since then there have been fixes , and we cant update the library to get those or future fixes.

Restricted Application added a subscriber: pywikibot-bugs-list. · View Herald TranscriptOct 15 2015, 11:50 AM
Petrb added a comment.Oct 15 2015, 2:16 PM

Since we have whole server (that means 1 dedicated public IP) for this service, why not just running a newer version on a different port so that it still works with software that already use it?

jayvdb moved this task from Backlog to Upstream issues on the Pywikibot board.Oct 16 2015, 7:06 AM

This is a pretty high risk for Python apps. v0.5.5 was released Feb 17 , and we're stuck on that version.
Since then there have been fixes , and we cant update the library to get those or future fixes.

Case in point:
https://github.com/invisibleroads/socketIO-client/issues/95

Krinkle closed this task as Declined.Jan 30 2017, 10:52 PM

I'm closing this task and T68232 since it's unlikely this will happen. Rather than upgrading RCSteam to Socket.IO v1.0 (which would be a breaking change for existing RCStream consumers), I'll instead help push forward T130651: EventStreams.