tgalal / yowsup

The WhatsApp lib
GNU General Public License v3.0
7.02k stars 2.23k forks source link

Current problems: Use the master branch of jlguardi/yowsup ? #1401

Closed chriso0710 closed 8 years ago

chriso0710 commented 8 years ago

I am suffering from the changes in whatsapp too. I was monitoring and reading the issues here for the last couple of days, but without actually trying the various solutions or suggestions. Looks like @tgalal does not have the time for merging pull requests or making patches.

What can we do to handle the current chaos? @jlguardi seems to be doing the best job of patching and keeping track of all the problems. Perhaps we should use his master branch? Anyone having success with it?

Christian

cfenollosa commented 8 years ago

@jlguardi's master branch is at the moment the most current code. It is lacking some of the new protocol's features, but at least it works. @tgalal probably doesn't have much time to port ChatAPI anymore so we are in a weird situation.

Let me repeat, at this moment there is no bugfree python code that works with the current Whatsapp protocol. At some point, some messages are bound to break it.

Maintaining this project is a lot of work but right now the only person with enough knowledge to maintain the current code is @tgalal

yniv commented 8 years ago

@jlguardi 's branch doesn't support media encryption so it's not a solution currently... looks like this lib is going to trash if @tgalal won't come back.

chriso0710 commented 8 years ago

Yes, it looks bad. But let's try to recap the most important issues from #1389 and #1387:

At the moment to me the best path seems to support @jlguardi in testing and trying to fix those encryption issues... Maybe we could get some hints from @mgp25?

cfenollosa commented 8 years ago

Currently, after installing @jlguardi's master code and re-registering the number, I can:

  1. Send and receive group messages, including images and audio, with encryption on
  2. Send private messages by using the CLI client, however, I can't receive private messages. There is a theory that apparently some of the layers don't send the ACKs properly and thus Whatsapp's servers stop sending us some messages.

However, after a few retries, (1) doesn't work anymore. So I cannot receive any message, either with axoltl enabled or disabled. Deleting axolotl.db has no effect.

What's weird is that I have other bots running from other numbers and they still work (group and private, text and images). My theory is that since the protocol change, old axolotl.db (i.e. generated before the change) still work, who knows until when, but newly generated files have this non-ack issue and thus the clients don't work.

Let's see if we can at least narrow down the exact issue so that people with a bit of knowledge of yowsup internals can create a patch until @tgalal can work again on porting the new protocol.

eduardobento commented 8 years ago

@cfenollosa Same results here... In my case, the msgs not received (Bad Mac or not session) occurs in ChatApi too.

Waiting for new commits...

t0rr3sp3dr0 commented 8 years ago

I think @cfenollosa is right about the ACKs, because I keep receiving from WhatsApp the same notifications every time that I restart my script. It's as I had never received them from WhatsApp. Then the only logical explanation for that is that not all ACKs are being sent properly.

schoerg commented 8 years ago

https://github.com/tgalal/yowsup/issues/898#issuecomment-196263109

payamazadi commented 8 years ago

looks like using @jlguardi branch fixes issues with acks using a counter, so that's a big step in the right direction with debugging. i think i prefer to use his branch, since basically all i'm doing is applying @jlguard's patches to this master anyway.

my only issue atm is dealing w the encrypted messages, which is captured in #1400

payamazadi commented 8 years ago

regarding point 2, some people are trying to fix #1400 just by ignoring media messages to prevent a crash. that's not a solution.. some people actually have a use case for processing received images. i'm pretty new to this project so i'm trying to figure out how to do the decryption. anyone available to help, would be awesome. besides that, using jlguardi's fork pretty much fixes all issues w registration, environment, sending/receiving messages.

yniv commented 8 years ago

@payamazadi you are right. hope someone will fix it soon. currently the best thing to do is port @mgp25 's chat-api support for this.

chriso0710 commented 8 years ago

Looks like some guys are making some progress with #1400. Huge thanks to everyone, who is working hard on this!

Let's try to keep things together and make @jlguardi's forks the new recommended/"officials" for all fixes and patches.

thundergreen commented 8 years ago

here still it wont work.. i can send messages. don't get ackn. and i am not able to receive messages yet

Am 25.03.2016 um 13:25 schrieb Christian Ott:

Looks like some guys are making some progress with #1400 https://github.com/tgalal/yowsup/issues/1400. Huge thanks to everyone, who is working hard on this!

Let's try to keep things together and make @jlguardi https://github.com/jlguardi's forks the new recommended/"officials" for all fixes and patches.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/tgalal/yowsup/issues/1401#issuecomment-201261350

michjans commented 8 years ago

Hello, My whatsapp client using yowsup from @tgalal, also stopped working, so I just installed yowsup from the @jlguardi yowsup master branch. Connecting and authorization works fine, but when sending a message from my custom ReceiverLayer (mylayer.py) I get the following stack trace:

  File "mylayer.py", line 76, in sendMessage
    self.toLower(entity)
  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 63, in toLower
    self.__lower.send(data)
  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 173, in send
    s.send(data)
  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 111, in send
    send(entity)
  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/protocol_messages/layer.py", line 15, in sendMessageEntity
    self.entityToLower(entity)
  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 115, in entityToLower
    self.toLower(entity.toProtocolTreeNode())
  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 63, in toLower
    self.__lower.send(data)
  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/layer.py", line 108, in send
    self.handlePlaintextNode(node)
  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/layer.py", line 186, in handlePlaintextNode
    padded.extend(plaintext)
TypeError: an integer or string of size 1 is required

Here a snippet of the relevant code in "mylayer.py":

class ReceiverLayer(YowInterfaceLayer):
    ....

    def sendMessage(self, phone, message):
        entity = TextMessageProtocolEntity(message, to=phone)
        self.toLower(entity) #File "mylayer.py", line 76

Any suggestions?

Thanks for the support, Michiel

jlguardi commented 8 years ago

@chriso0710 I haven't too much time to check this but sending pkmsg was working long time ago and no more issues about sending exceptions have been reported. Moreover, the exception is produced before encryption, while padding. Are you sending an empty string?

michjans commented 8 years ago

@jlguardi I started debugging my code and in the end I found out that the message that I was trying to send was not of type str but of type unicode. Passing a unicode into a TextMessageProtocolEntity results in this exception, while padding in handlePlaintextNode. The cause is probably that I am reading the source of my message strings from a file and somehow they are converted to type unicode instead of str. I probably can fix it by calling encode, to convert the unicode to a str, before creating the TextMessageProtocolEntity

I didn't change my code recently, so I don't really understand why this suddenly stopped working.

abloch commented 8 years ago

@tgalal - I really wish you could add @jlguardi as an admin to this lovely project so that we have a single place to look for updates

chriso0710 commented 8 years ago

I strongly think we need a repository which is actively maintained and patched. Unfortunately this is not the tgalal/yowsup master. At the moment @jlguardi is doing a great job of keeping things together. We all should try to support him and make his master repository the new "official" one.

I fear if we fail to organize and join our efforts, yowsup will be dead.

mgp25 commented 8 years ago

When i finish the release of WA 2.0 in Chat API im going to update yowsup here. @tgalal is busy now

thundergreen commented 8 years ago

That's great man! Happy this project is keeping alive ! Great guys

Thorsten Fröhlich Am 27.03.2016 15:41 schrieb "mgp25" notifications@github.com:

When i finish the release of WA 2.0 in Chat API im going to update yowsup here. @tgalal https://github.com/tgalal is busy now

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/tgalal/yowsup/issues/1401#issuecomment-202065429

chenwayne commented 8 years ago

Thanks for the summary, so what functions are tested and running well now? Can someone help list down and so that we have a clear view. Don't know who to trust now.

Best, Wayne

cfenollosa commented 8 years ago

@chenwayne Have a look at https://github.com/jlguardi/yowsup/wiki

chriso0710 commented 8 years ago

BTW: I really am getting tired of reading all these repeating general issues. We have 468 open issues ATM. This makes the github issue tracker almost unusable IMHO and it further increases the feeling of chaos. We need to at least close issues and reference them. I just looked into chat-api and I think @mgp25 and all contributors are doing a very good job with the issues. Perhaps yowsup should also have some rules for opening new issues...

thundergreen commented 8 years ago

I totally agree. The issues should be monitored somehow . I totally lost the red rope

Thorsten Fröhlich Am 28.03.2016 14:28 schrieb "Christian Ott" notifications@github.com:

BTW: I really am getting tired of reading all these repeating general issues. We have 468 open issues ATM. This makes the github issue tracker almost unusable IMHO and it further increases the feeling of chaos. We need to at least close issues and reference them. I just looked into chat-api and I think @mgp25 https://github.com/mgp25 and all contributors are doing a very good job with the issues. Perhaps yowsup should also have some rules for opening new issues...

  • which repository are you using?
  • did you read the FAQ/wiki?
  • did you check, if someone has already asked the same issue you have?
  • did you attach your code, debug logs or tracebacks?
  • ...

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/tgalal/yowsup/issues/1401#issuecomment-202364618

jlguardi commented 8 years ago

I agree with you but we haven't moderators now.

mgp25 commented 8 years ago

I'll ask @tgalal to make me moderator of this repo until he come back. Afortunately, we almost finished the new version of WA in Chat API, so i can help here. One thing: i`ll block any user related to spamming or commercial use of this.

If any of you use this API you agree to use it only for personal usage

hjvl commented 8 years ago

I hope that tgalai has not run into the same problem as venomous0x: https://github.com/venomous0x/WhatsAPI

thundergreen commented 8 years ago

Would be awesome if tgalal would just give a life sign to let the community know what's going on

Thorsten Fröhlich Am 29.03.2016 12:58 schrieb "hjvl" notifications@github.com:

I hope that tgalai has not run into the same problem as venomous0x: https://github.com/venomous0x/WhatsAPI

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/tgalal/yowsup/issues/1401#issuecomment-202831186

relima commented 8 years ago

@thundergreen - It seems he is working on it. https://github.com/tgalal?tab=activity

thundergreen commented 8 years ago

Sorry guys I really appreciate your work but for us it's not traceable anymore which branch is used. Please guys can u clarify this for us? I'm sure here's a mix of setups with different branches.would be helpful if everybody here tests and uses the same branch and setup

Thorsten Fröhlich Am 29.03.2016 21:15 schrieb "relima" notifications@github.com:

@thundergreen https://github.com/thundergreen - It seems he is working on it. https://github.com/tgalal?tab=activity

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/tgalal/yowsup/issues/1401#issuecomment-203058608

freelo commented 8 years ago

if everybody here tests and uses the same branch and setup

If I understood correctly how github works, you cannot modify someone else's repository. Therefore, the maintainer of a single repository/branch would need to check for and merge pull requests each and every second (which is impractical). Yes, we could all test the tgalal yowsup master branch, but it is of no use if the development branch contains the fixes I need right now. If we use the devel branch and the protocol changes again and jlguardi was fast and tgalal had no time to keep up, what do you do? Eventually, the changes may be merged into the master, but until then, I prefer using/testing more current forks/branches rather than being idle. But you cannot tell in advance whose branch that will be.

thundergreen commented 8 years ago

that's exactly what I already said here several times. No maintaining actually oficially. jlguardi and his master branch seems to be the most updated but stil confusing with other branches. It's like tgalal is not present anymore for this project. so it would be nice if he can close or delete his repo that everything is centralized.

I would kindly ask to bring some order into this mess here to keep everybody up to date. this would decrease the 1000 questions regarding yowsup and decrease confusions on the site of users.

@jlguardi can u please try to rech tgalal and find a solution for ONE REPO?

Have a good day and anyway SPECIAL THANKS to everyboy who is involved in this project

2016-03-30 15:46 GMT+02:00 freelo notifications@github.com:

if everybody here tests and uses the same branch and setup

If I understood correctly how github works, you cannot modify someone else's repository. Therefore, the maintainer of a single repository/branch would need to check for and merge pull requests each and every second (which is impractical). Yes, we could all test the tgalal yowsup master branch, but it is of no use if the development branch contains the fixes I need right now. If we use the devel branch and the protocol changes again and jlguardi was fast and tgalal had no time to keep up, what do you do? Eventually, the changes may be merged into the master, but until then, I prefer using/testing more current forks/branches rather than being idle. But you cannot tell in advance whose branch that will be.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/tgalal/yowsup/issues/1401#issuecomment-203440548

freelo commented 8 years ago

As relima said: tgalal is still in the game. There is activity in the development branch. This one still is the "big" repo, which deserves attention and updates.

gkawamoto commented 8 years ago

I believe @freelo is right. We should respect @tgalal and @jlguardi's decisions in terms of which repositories and branches are actually the official ones. That said, I guess that we could all benefit from two changes: 1) writing on README.md a explanation on which branch is which and 2) better guidelines towards opening issues, kinda like what @mgp25's been doing on his repository. Besides that, there's nothing much more that we can do. There's no "tidying up this mess" because it's not exactly a mess. The official branch is the master one, and anyone who wants to be involved in the advances of the project should keep up with the progress in the commits and issues opened in the repository. It's not easy, but delegating this task to the people actively involved in developing it's not exactly fair either. We all have our own lives besides GitHub.

Well, that's just my 2 cents.

chriso0710 commented 8 years ago

@gkawamoto Well, I have to slightly disagree with you here :-) I think this repo is a mess right now.

We have no notice from @tgalal regarding the future. Nobody knows if or when PR will be accepted or repos will get merged. No guidelines for opening issues. No one is closing (duplicate) issues.

Of course you are right that this is "community work" and "open source style" and we all have a life beside github. But thats not the point. I think a little more organization, structure and information would definitely NOT hurt. If this repo is going to have a future it should not be depending on a single person.

mgp25 commented 8 years ago

Sigh... as soon as @tgalal answer me, i'll be moderating this repo (im not moderating yet, waiting for his answer) until he comes back. In the meanwhile i recommend people to:

Starting from here:

Note: One thing to be improved in the code is the debug log

And finally, try to get the information as tidy as possible, so later is easier to check it and merge it.

Until this happens try to be patient. Use whatever repo you like, it doesn't matter, but always update to latest commit in the most updated branch.

As soon as i have a response, i'll get back here.

Regards

abloch commented 8 years ago

I just want to take a small moment and really thank @tgalal for his fabulous work he did till now!

@chriso0710 - I wish we all let him decide for himself if/when/how he wants to keep doing this very demanding ongoing labor before makingpersonal changes in here. that's the least he deserves.

if, when time comes, issues will become unmaintainable - I'm sure we as a community could find means to keep this alive