google-code-export / microblog-purple

Automatically exported from code.google.com/p/microblog-purple
GNU General Public License v3.0
2 stars 0 forks source link

Plugin is not Twitter API 1.1 Compliant? #269

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Attempted to log in to Twitter.  Authentication refused.  Other clients that 
are not API compliant are refusing to log in as well.  A notable example was 
propounded by Wil Wheaton today: 
https://plus.google.com/108176814619778619437/posts/Bb2biiyguzj

Original issue reported on code.google.com by smkel...@gmail.com on 12 Jun 2013 at 10:16

GoogleCodeExporter commented 9 years ago
The project is dead for 2 years, I doubt that we'll see new working version 
soon :(

Original comment by oyashirosama.hnnkni on 13 Jun 2013 at 11:39

GoogleCodeExporter commented 9 years ago
looks like there's a lot to update for the change from 1.0 to 1.1

It's probably way beyond me, just looking at the restful api docs.

Ugh.  I probably never should have given up programming to focus on networking, 
right?

Original comment by ak.hep...@gmail.com on 14 Jun 2013 at 5:10

GoogleCodeExporter commented 9 years ago
What's wrong? Will we receive a update?

Original comment by csahuqui...@gmail.com on 19 Jun 2013 at 8:19

GoogleCodeExporter commented 9 years ago
About to lose identi.ca support too when they transition to the pump.io 
platform soon

http://identi.ca/doc/pumpio

Original comment by eugene...@gmail.com on 27 Jun 2013 at 12:54

GoogleCodeExporter commented 9 years ago
I'd consider this project not dead, but so well working there were no updates 
required over the last two year. If there are other plugins for Twitter, let us 
know!

Original comment by m...@jump-ing.de on 16 Jul 2013 at 10:46

GoogleCodeExporter commented 9 years ago
There is also https://code.google.com/p/prpltwtr/ which I actually switched to 
from microblog-purple as it worked better but both are now in the same boat of 
needing to be updated to the Twitter 1.1 API.

Original comment by bwmer...@gmail.com on 17 Jul 2013 at 7:38

GoogleCodeExporter commented 9 years ago
I made a patch for twitter API 1.1.

This uses json-glib-1.0 at least 0.12. Debian and Ubuntu users need to install 
the package libjson-glib-dev to build.

I modified global.mak to link json-glib and it works on ubuntu 14.04, but will 
probably work on most other systems aswell. Not tested on windows.

I replaced the default API URLs to the JSON-variants and changed all reply 
parsing from XML to JSON.

If you are upgrading, it's best to remove your TwitterIM account and create it 
again, so all API URLs are reset to the right ones. Though I doubt anyone is 
using mbpidgin for twitter at the moment ;)

Original comment by biosera...@gmail.com on 13 Jul 2014 at 1:02

Attachments:

GoogleCodeExporter commented 9 years ago
Applied the patch, and am now back online.   

Haven't seen any bugs creep in-  the only downside is that "self" isn't hidden 
in the timeline anymore, even if that option is checked.

Not a big deal, simple cosmetics, but this patch so far seems to do the trick 
on ubuntu!

biosera ++

Original comment by ak.hep...@gmail.com on 14 Jul 2014 at 4:22

GoogleCodeExporter commented 9 years ago
Forgive my ignorance, but how would I use the patch to update Pidgin running 
under Windows?  I tried opening the patch file with 7-zip but it doesn't appear 
to be an archive.

Original comment by mousebot...@gmail.com on 14 Jul 2014 at 6:37

GoogleCodeExporter commented 9 years ago
The patch file is for the source code.  you'd have to have a build environment 
all set up for it, and then using the gnu patch utility (or cygwin equivalent) 
to apply that text file against the source, and then compile it.

However, the added difficulty for windows is the requirement for libjson-glib.  

I haven't done a windows build for a handful of years, so I don't have the dev 
environment anymore, and can't help walk you through it.

Original comment by ak.hep...@gmail.com on 14 Jul 2014 at 7:43

GoogleCodeExporter commented 9 years ago
Can't help with windows either, sorry.
Anyone else here who can build and share the DLLs?

Original comment by biosera...@gmail.com on 14 Jul 2014 at 9:22

GoogleCodeExporter commented 9 years ago
I do notice that when I log out of my accounts with mb enable, pidgin crashes.

I don't know if anybody else is seeing that, but i haven't had a chance to dig 
into it yet.

Original comment by ak.hep...@gmail.com on 17 Jul 2014 at 3:46

GoogleCodeExporter commented 9 years ago
Applying the patch, 1 hunk failed. mbpurple-0.3.0.tar.gz
{{{
patching file microblog/twitter.c
Hunk #3 FAILED at 311.
Hunk #4 succeeded at 427 (offset -28 lines).
Hunk #5 succeeded at 915 (offset -28 lines).
Hunk #6 succeeded at 962 (offset -28 lines).
Hunk #7 succeeded at 988 (offset -28 lines).
Hunk #8 succeeded at 1029 (offset -28 lines).
Hunk #9 succeeded at 1158 (offset -28 lines).
Hunk #10 succeeded at 1177 (offset -28 lines).
1 out of 10 hunks FAILED -- saving rejects to file microblog/twitter.c.rej
patching file microblog/twitterim.c
Hunk #1 succeeded at 169 (offset -2 lines).
}}}

Original comment by rabes...@gmail.com on 30 Jul 2014 at 7:09

GoogleCodeExporter commented 9 years ago
Did you apply the patch to the svn checkout? It will most likely fail with the 
packaged sources from the Downloads.

Original comment by biosera...@gmail.com on 30 Jul 2014 at 7:17

GoogleCodeExporter commented 9 years ago
I used a release version 0.3.0.

Well, I applied your patch semi-manually, and I am using it now. Do you plan to 
release your version?

Original comment by rabes...@gmail.com on 30 Jul 2014 at 9:19

GoogleCodeExporter commented 9 years ago
I was actually thinking about a release for a while, so I just made a 
repository at github with the code and my patch applied already:
https://github.com/fr0nk/microblog-purple2

There is also a release ready to download:
https://github.com/fr0nk/microblog-purple2/releases

Still no windows binaries, but I will try to build some in the coming days. 
Can't be that difficult :) And maybe I'll fix a few other issues.

And FYI I've been using the patch for almost 3 weeks now on two computers and 
had no problems yet.

@ak.hep: I can't reproduce the crash on sign out. But I suspect I introduced a 
memory leak or two. I will try to fix them and maybe the crashes are gone then.

Original comment by biosera...@gmail.com on 30 Jul 2014 at 10:51

GoogleCodeExporter commented 9 years ago
Nice, thanks biosera! Sorry for asking, but could somebody tell me what I have 
to with the tar.gz? I tried to tar -zxvf it, but I'm fairly to new to linux and 
I don't really understand the next step to install it.

Original comment by sc0repi0...@gmail.com on 31 Jul 2014 at 12:35

GoogleCodeExporter commented 9 years ago
@sc0repi0...: Read how to make a package in your Linux distribution. If you are 
using Arch Linux, you can wait until I create one.

Original comment by rabes...@gmail.com on 31 Jul 2014 at 11:17

GoogleCodeExporter commented 9 years ago
@biosera...

I've got a lot of client protocols open (yahoo, irc, msn, icq, sipe, mbpidgin, 
facebook)   so it's possible that the memory leak is exacerbated by having all 
of these active.

I wish that the kde crash manager would let me save the crashinfo separately, 
because then I could upload it...

Original comment by ak.hep...@gmail.com on 1 Aug 2014 at 4:48

GoogleCodeExporter commented 9 years ago
Arch Linux package: https://aur.archlinux.org/packages/microblog-purple2/ . 
(The directory name "microblog-purple2-microblog-purple2-0.4" in the archive is 
kind of strange.)

Original comment by rabes...@gmail.com on 9 Aug 2014 at 5:03

GoogleCodeExporter commented 9 years ago
@ak.hep: I've pushed a small change to my repo, freeing memory where possible. 
That's all I could find and fix. Valgrind doesn't report many memory leaks, 
which are caused by the plugin code (but I'm no expert). If this doesn't fix 
your crashing issue, then I'm afraid I can't help you there. I'm not that good 
a C programmer actually.

On a different note: I've finally got a working windows build environment. So 
expect a Windows release soon.

Original comment by biosera...@gmail.com on 9 Aug 2014 at 7:26

GoogleCodeExporter commented 9 years ago
Building a plugin in windows is a major PITA :)
But it's finally done! I've built this on Windows 7 32bit. Hope it runs on all 
other windows versions too.

Get it here: https://github.com/fr0nk/microblog-purple2/releases

Original comment by biosera...@gmail.com on 12 Aug 2014 at 9:36

GoogleCodeExporter commented 9 years ago
Unzipped into Pidgin Portable, running under Windows XP.  Works OK so far.  
Will transfer the stick to a Windows 8.1 (64-bit) machine tomorrow and see if 
it still works OK.

Original comment by mousebot...@gmail.com on 12 Aug 2014 at 10:51

GoogleCodeExporter commented 9 years ago
@biosera - Built the new version this morning.

Was going fine, but then I tweeted once, and it crashed.  Yikes!

SegvAnalysis:
 Segfault happened at: 0x7f2f8a150725 <malloc_consolidate+277>: mov    0x8(%r12),%r13
 PC (0x7f2f8a150725) ok
 source "0x8(%r12)" (0xfe5f1b3a5190) not located in a known VMA region (needed readable region)!
 destination "%r13" ok
SegvReason: reading unknown VMA

Original comment by ak.hep...@gmail.com on 13 Aug 2014 at 5:29

GoogleCodeExporter commented 9 years ago
Oops, sorry about that. I fixed it in the current release.
Please everyone update to the latest release.

Original comment by biosera...@gmail.com on 13 Aug 2014 at 6:08

GoogleCodeExporter commented 9 years ago
rebuilt, with test tweets  (@ak_hepcat  if you can believe that!)   and so far 
I haven't had a crash.

I'll keep poking at it.

Original comment by ak.hep...@gmail.com on 13 Aug 2014 at 6:15

GoogleCodeExporter commented 9 years ago
...And it just crashed again.  Unfortunately, it didn't generate a core-dump, 
so i can't see what's happening.

I guess i can run it in gdb?

Original comment by ak.hep...@gmail.com on 13 Aug 2014 at 7:11

GoogleCodeExporter commented 9 years ago
Program received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x1) at malloc.c:2929
2929    malloc.c: No such file or directory.
(gdb) dns[10226]: nobody needs me... =(

Original comment by ak.hep...@gmail.com on 13 Aug 2014 at 7:12

GoogleCodeExporter commented 9 years ago
Please run it with pidgin -d and send me the output. Or the last few screens 
full of output. There we should see what it was trying to do.

Original comment by biosera...@gmail.com on 13 Aug 2014 at 7:14

GoogleCodeExporter commented 9 years ago
hrm.  kept crashing on startup until i disabled twitter auto-login, and then it 
came up cleanly.

It's not logging back in right now, for whatever reason either.
I'll keep it logged out for a few minutes, then attempt to log back in.

Original comment by ak.hep...@gmail.com on 13 Aug 2014 at 7:16

GoogleCodeExporter commented 9 years ago
Here's a sanitized last few pages of output before the segv above

Original comment by ak.hep...@gmail.com on 13 Aug 2014 at 8:00

Attachments:

GoogleCodeExporter commented 9 years ago
Though I can't reproduce the crash, I at least know now that it happens in 
twitter_decode_messages() or at least the problem starts there.
I think I'm doing something wrong reading arrays in the JSON response.

I'm away for a few days now, so it might take till next weekend until I can do 
some more. In the meantime, try the attached patch. I removed a free that was 
definitely not needed.

Original comment by biosera...@gmail.com on 14 Aug 2014 at 9:28

Attachments:

GoogleCodeExporter commented 9 years ago
http://twitter.com/ak_hepcat/status/500041993779544064

we'll see how long this goes.

Thanks for the patch

Original comment by ak.hep...@gmail.com on 14 Aug 2014 at 10:12

GoogleCodeExporter commented 9 years ago
FYI, there's still an odd bug somewhere in the freeing, i think.

Most of the time the crashes happen when I'm logging out of the client (but not 
quitting it) but if it happens to survive a logout-login cycle, it'll crash in 
the middle of a session.

It's not obvious when it'll happen, so it's more than a little harder to grab a 
dump, but I'll keep trying.

--

 For the windows build,  i'm unable to see replies after the "/replies" command is given.   The command is accepted, but nothing is printed.

(3.10.9, 32-bit build running on Win7-x64)

Original comment by ak.hep...@gmail.com on 5 Sep 2014 at 6:00

GoogleCodeExporter commented 9 years ago
Has anyone managed to get this working with Pidgin 2.10.10?  I was using 
microblog-purple2 0.4.1.1 downloaded from 
https://github.com/fr0nk/microblog-purple2/releases successfully with 2.10.9 
but it seems to hang 2.10.10.

What I did was:

1. Install the plugin files in 2.10.10.
2. Run 2.10.10.
3. Delete existing Twitter accounts.
4. Re-create a Twitter account.
5. Creation process works OK, fires up web browser where I'm invited to log in 
and authorise the app.  I do that and am presented with a PIN, which I copy.
6. I paste the PIN into the dialogue box and click on OK.
7. Pidgin then hangs and I have to force it to close.

Original comment by mousebot...@gmail.com on 27 Oct 2014 at 10:43

GoogleCodeExporter commented 9 years ago
I updated Pidgin 2.10.9->2.10.10, and it does not hang, and the plugin works.

Original comment by rabes...@gmail.com on 27 Oct 2014 at 4:02

GoogleCodeExporter commented 9 years ago
I upgraded again and this time it worked.  It's perhaps worth detailing how I 
did it this time in case it makes a difference.  I should have said at the 
outset that I'm actually using the PortableApps version of Pidgin.

Here's what I did:

1. Allowed the PortableApps update routine to download and install the new 
version.
2. I DIDN'T run Pidgin - this may be important.
3. I extracted microblog-purple2-0.4.1.1-win32.zip to the installation again 
(as I assumed the update had probably overwritten some of the files).
4. Started Pidgin and all worked as expected.  This time I didn't have to 
delete and re-create the Twitter accounts - they worked fine as they were.

Original comment by mousebot...@gmail.com on 1 Nov 2014 at 11:21