Closed Bug 1118499 Opened 9 years ago Closed 8 years ago

Incoming messages on Yahoo all start with [#000099m

Categories

(Chat Core :: Yahoo! Messenger, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ehoogeveen, Assigned: mrinal.dhar)

References

Details

(Whiteboard: [1.6-wanted])

Attachments

(2 files)

Every message I get from my friend on Yahoo has the text [#000099m before it, regardless of the skin I use. For instance, "Hi, how are you doing?" will become "[#000099mHi, how are you doing?".

Last Good:
http://ftp.instantbird.com/instantbird/nightly/2014/09/2014-09-15-04-instantbird/

First Bad:
http://ftp.instantbird.com/instantbird/nightly/2014/10/2014-10-16-16-instantbird/

Unfortunately there were no Windows builds between these dates, so it's a rather large range. I'm guessing this is an incorrectly encoded Unicode code point U+0099 (which should display as whitespace), but I don't really know anything about the Yahoo IM protocol.
Component: Conversation → Yahoo! Messenger
Flags: needinfo?(qheaden)
Product: Instantbird → Chat Core
This is almost certainly fallout from bug 955574. (You can revert this by flipping a preference in Instantbird.)

This doesn't look like an incorrect Unicode codepoint: it looks like some client is attempting to color the text and we're not parsing it correctly using the JavaScript code.
Blocks: 955574
(In reply to Patrick Cloke [:clokep] from comment #1)
> This is almost certainly fallout from bug 955574. (You can revert this by
> flipping a preference in Instantbird.)

Aha, yes! Setting chat.prpls.forcePurple back to "prpl-jabber,prpl-yahoo,prpl-yahoojp" fixes the issue.

> This doesn't look like an incorrect Unicode codepoint: it looks like some
> client is attempting to color the text and we're not parsing it correctly
> using the JavaScript code.

You're right: with the setting changed back to its previous default, my friend's text now shows up in purple again (instead of the blue that I have mine set to). My friend is using Instantbird 1.5, so I guess the new code doesn't handle the text coloring at all.
I will take a look into this. JS-Yahoo could definitely use some improvement in the parsing of font data.
Flags: needinfo?(qheaden)
Assignee: nobody → qheaden
QA Contact: qheaden
QA Contact: qheaden
The workaround isn't working so well on my laptop anymore: it hits some sort of race condition that near consistently crashes InstantBird while connecting to Yahoo (and sometimes at startup, or when opening a Yahoo chat window). It still works on my desktop, which appears to win the race in a way that doesn't crash. Changing the preference (chat.prpls.forcePurple) back to default avoids the crash, but still exhibits this bug.

Unfortunately I can't get a stack, since the crash reporter doesn't pop up and the Breakpad symbols aren't enough for Visual Studio. I haven't gotten around to trying to build it myself.
Any chance we can get a fix for this into the 38 ESR?
Flags: needinfo?(qheaden)
(In reply to Emanuel Hoogeveen [:ehoogeveen] from comment #4)
> The workaround isn't working so well on my laptop anymore: it hits some sort
> of race condition that near consistently crashes InstantBird while
> connecting to Yahoo (and sometimes at startup, or when opening a Yahoo chat
> window). It still works on my desktop, which appears to win the race in a
> way that doesn't crash. Changing the preference (chat.prpls.forcePurple)
> back to default avoids the crash, but still exhibits this bug.

Sorry, I find this very confusing. To confirm, are you saying that when you're using the libpurple code for Yahoo you're seeing crashes? If so...that seems like a different bug, although hopefully we'll retire that code soon anyway.

By "workaround" you mean removing "prpl-yahoo" from the chat.prpls.forcePurple pref?
For the past few months, I've been using Instantbird Nightly with chat.prpls.forcePurple set to "prpl-jabber,prpl-yahoo,prpl-yahoojp" (inverting [1]) to work around this bug.

For a few weeks now this has been causing crashes on my laptop, but I only now figured out that using libpurple was the cause. I've reset the preference to its default value of "prpl-jabber", but as a consequence I'm seeing this bug again now. I don't know if Jabber is affected since I don't use it.

[1] https://hg.mozilla.org/comm-central/rev/82716d4fb208
So to clarify: yes, the crashes are a different bug. I just wasn't sure if we *expect* that non-default configuration to work.
I started taking a look at this, seems like there's quite a bit of code around handling of formatting. A protocol dump would help ensure I'm handling this OK! Accounts > Right click and "Copy debug log".
Attached file debug log
Doesn't look like there's anything too horribly privacy sensitive in there, but I did anonymize it slightly.
Pretty much we need to port [1], this will end up doing something similar to [2]. We need to ensure we generate sane HTML for the parser to look at, while not expecting sane HTML in the encoded message. [3] includes an additional list of things to parse.

[1] http://hg.mozilla.org/users/florian_queze.net/purple/file/b35d07fd309b/libpurple/protocols/yahoo/util.c#l534
[2] http://mxr.mozilla.org/comm-central/source/chat/protocols/irc/ircUtils.jsm#81
[3] http://hg.mozilla.org/users/florian_queze.net/purple/file/b35d07fd309b/libpurple/protocols/yahoo/util.c#l256
Attached patch WIP v1Splinter Review
Figured I'd try to build Instantbird and try out the WIP patch - unfortunately I get "Error: No 'prpl-yahoo' protocol plugin." on my Yahoo account with it applied (I guess it *is* still WIP). Let me know if there's anything I can do to help.
(In reply to Emanuel Hoogeveen [:ehoogeveen] from comment #13)
> Figured I'd try to build Instantbird and try out the WIP patch -
> unfortunately I get "Error: No 'prpl-yahoo' protocol plugin." on my Yahoo
> account with it applied (I guess it *is* still WIP). Let me know if there's
> anything I can do to help.

Yes, this is very much a WIP...I'm unsure I ever even tried it. :)
Now that my schedule is is changing, this is something I should be able to look more into near the end of this week.
Flags: needinfo?(qheaden)
Whiteboard: [1.6-wanted]
(In reply to Quentin Headen [:qheaden] from comment #15)
> Now that my schedule is is changing, this is something I should be able to
> look more into near the end of this week.

Friendly ping ;)
Flags: needinfo?(qheaden)
Blocks: 1207551
Finally getting back to making a patch now.
Status: NEW → ASSIGNED
Flags: needinfo?(qheaden)
Hey Quentin, I was wondering if it's OK for me to take this one up? 
I wanted to learn more about how protocols work here and Patrick suggested this might be a good start.
Flags: needinfo?(qheaden)
Hi Mrinal. Feel free to take this bug. I've been wanting to fix it, but work and other things keep getting in the way. If you need any help understanding the Yahoo protocol, you can messagee as well and I can try to provide any knowledge I have.

Quick tip: Wireshark is your friend when understanding Yahoo's protocol.
Status: ASSIGNED → NEW
Flags: needinfo?(qheaden)
Assignee: qheaden → mrinal.dhar
Yahoo completely changed their protocol, thus our old Yahoo bugs are obsolete. See bug 1316000 for more details.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: