tgalal / yowsup

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

Exception: No such prekeyRecord! #1180

Closed kndone closed 5 years ago

kndone commented 8 years ago

Hi, I tried to run the script, I got it running, but after sending the Song command, I got an error "Exception: No such prekeyRecord!", I restarted the Raspberry, installed Yowsup again, but the error persist everytime I run ./whatsapp or python run.py. I hope anyone could help me, thanks. Here is the error I got:

root@jarvian:/home/pi/apps/chatbot/yowsup_python# python run.py No handlers could be found for logger "yowsup.stacks.yowstack" Traceback (most recent call last): File "run.py", line 39, in stack.loop() File "build/bdist.linux-armv7l/egg/yowsup/stacks/yowstack.py", line 195, in loop File "/usr/lib/python2.7/asyncore.py", line 216, in loop poll_fun(timeout, map) File "/usr/lib/python2.7/asyncore.py", line 156, in poll read(obj) File "/usr/lib/python2.7/asyncore.py", line 87, in read obj.handle_error() File "/usr/lib/python2.7/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event self.handle_read() File "build/bdist.linux-armv7l/egg/yowsup/layers/network/layer.py", line 86, in handle_read self.toLower(receipt) File "build/bdist.linux-armv7l/egg/yowsup/layers/network/layer.py", line 94, in receive "Usage: \nweather {city_name}", File "build/bdist.linux-armv7l/egg/yowsup/layers/init.py", line 59, in toUpper File "build/bdist.linux-armv7l/egg/yowsup/layers/stanzaregulator/layer.py", line 28, in receive class EchoLayer(YowInterfaceLayer): File "build/bdist.linux-armv7l/egg/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived r = song.download(t1,'3gp','./videosongs/') File "build/bdist.linux-armv7l/egg/yowsup/layers/init.py", line 59, in toUpper File "build/bdist.linux-armv7l/egg/yowsup/layers/auth/layer_crypt.py", line 63, in receive File "build/bdist.linux-armv7l/egg/yowsup/layers/init.py", line 59, in toUpper File "build/bdist.linux-armv7l/egg/yowsup/layers/coder/layer.py", line 35, in receive if True: File "build/bdist.linux-armv7l/egg/yowsup/layers/init.py", line 59, in toUpper File "build/bdist.linux-armv7l/egg/yowsup/layers/axolotl/layer.py", line 117, in receive self.toLower(receipt) File "build/bdist.linux-armv7l/egg/yowsup/layers/axolotl/layer.py", line 139, in onMessage

File "build/bdist.linux-armv7l/egg/yowsup/layers/axolotl/layer.py", line 222, in handleEncMessage

File "build/bdist.linux-armv7l/egg/yowsup/layers/axolotl/layer.py", line 259, in handlePreKeyWhisperMessage

File "/usr/local/lib/python2.7/dist-packages/python_axolotl-0.1.7-py2.7.egg/axolotl/sessioncipher.py", line 91, in decryptPkmsg File "/usr/local/lib/python2.7/dist-packages/python_axolotl-0.1.7-py2.7.egg/axolotl/sessionbuilder.py", line 43, in process File "/usr/local/lib/python2.7/dist-packages/python_axolotl-0.1.7-py2.7.egg/axolotl/sessionbuilder.py", line 113, in processV3 File "build/bdist.linux-armv7l/egg/yowsup/layers/axolotl/store/sqlite/liteaxolotlstore.py", line 32, in loadPreKey File "build/bdist.linux-armv7l/egg/yowsup/layers/axolotl/store/sqlite/liteprekeystore.py", line 20, in loadPreKey Exception: No such prekeyRecord!

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

CG22 commented 8 years ago

I was getting that error too. Did you manage to resolve it? My solution was to exclude the file axolot.db and run again. Everytime I get that error I have to do it. Don't know how to properly fix it.

virtualart-online commented 8 years ago

I have this problem too. It seems to occur "randomly" every couple of days.

What i discovered:

emralddenin commented 8 years ago

I have this problem too in sample application. Any solutions? Got same error for "./yowsup-cli demos -c config -e" also. @CG22 How to exclude axolot.db?

thundergreen commented 8 years ago

2016-02-11 00:14:58,803 ERROR transwhat: Traceback (most recent call last): File "/opt/transwhat/transwhat.py", line 95, in asyncore.loop(timeout=1.0, count=10, use_poll = True) File "/usr/lib/python2.7/asyncore.py", line 220, in loop poll_fun(timeout, map) File "/usr/lib/python2.7/asyncore.py", line 201, in poll2 readwrite(obj, flags) File "/usr/lib/python2.7/asyncore.py", line 123, in readwrite obj.handle_error() File "/usr/lib/python2.7/asyncore.py", line 108, in readwrite obj.handle_read_event() File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event self.handle_read() File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/network/layer.py", line 86, in handle_read self.receive(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/network/layer.py", line 94, in receive self.toUpper(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/init.py", line 59, in toUpper self.upper.receive(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/stanzaregulator/layer.py", line 28, in receive self.processReceived() File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/stanzaregulator/layer.py", line 51, in processReceived self.processReceived() File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived self.toUpper(oneMessageData) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init.py", line 59, in toUpper self.upper.receive(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/auth/layer_crypt.py", line 63, in receive self.toUpper(payload) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/init.py", line 59, in toUpper self.upper.receive(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/coder/layer.py", line 35, in receive self.toUpper(node) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/init.py", line 59, in toUpper self.__upper.receive(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/layer.py", line 117, in receive self.onMessage(protocolTreeNode) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/layer.py", line 139, in onMessage self.handleEncMessage(protocolTreeNode) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/layer.py", line 222, in handleEncMessage self.handlePreKeyWhisperMessage(node) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/layer.py", line 259, in handlePreKeyWhisperMessage plaintext = sessionCipher.decryptPkmsg(preKeyWhisperMessage) File "/usr/local/lib/python2.7/dist-packages/axolotl/sessioncipher.py", line 91, in decryptPkmsg unsignedPreKeyId = self.sessionBuilder.process(sessionRecord, ciphertext) File "/usr/local/lib/python2.7/dist-packages/axolotl/sessionbuilder.py", line 43, in process unsignedPreKeyId = self.processV3(sessionRecord, message) File "/usr/local/lib/python2.7/dist-packages/axolotl/sessionbuilder.py", line 113, in processV3 parameters.setOurOneTimePreKey(self.preKeyStore.loadPreKey(message.getPreKeyId()).getKeyPair()) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/store/sqlite/liteaxolotlstore.py", line 32, in loadPreKey return self.preKeyStore.loadPreKey(preKeyId) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/store/sqlite/liteprekeystore.py", line 20, in loadPreKey raise Exception("No such prekeyRecord!") Exception: No such prekeyRecord!

thundergreen commented 8 years ago

I fixed this issue also by deleting axolotl.db ..will see how long but now I'm facing new issue with disconnects all the time

jlguardi commented 8 years ago

I've got this exception and couldn't fix it. I've ack'd the message and lost it.

pabloruan0710 commented 7 years ago

I Have this error, Somebody caned have fix?

tgalal commented 5 years ago

a88844f629905ab6ccfcd5f5a3f1eacc605dcd10