aebruno / whisperfish

Signal client for Sailfish OS
GNU General Public License v3.0
61 stars 16 forks source link

panic: runtime error: index out of range #123

Closed marxistvegan closed 3 years ago

marxistvegan commented 6 years ago

This is an odd situation, but i can give the context. Some one added me to a group, then a second group, both have the same name, but clearly different groups, as they asked people to leave the first one and stay in the second one. I see this on the desktop Signal App. So when I went to look at whisperfish, the app was in a moment of stasis, so when i selected it from the overview, as it was running, it restarted and asked for the password. It accepts my password, shows the messages from folks but does not show the new group and then I get the following output in the command line.


[nemo@Sailfish ~]$ harbour-whisperfish 
INFO[0000] Starting Whisperfish version 0.5.1-0-ge8942f9 
INFO[0000] No translations found for system locale. Using default  locale=C
[D] unknown:0 - Using Wayland-EGL
INFO[0000] Setting up whisperfish directories           
INFO[0000] Config dir: /home/nemo/.config/harbour-whisperfish 
INFO[0000] Data dir: /home/nemo/.local/share/harbour-whisperfish 
INFO[0000] Attachments dir: /home/nemo/.local/share/harbour-whisperfish/storage/attachments 
INFO[0000] Checking search path: /home/nemo/Pictures    
INFO[0000] Attachment search paths: [/home/nemo/Pictures] 
INFO[0000] Parsing Signal config                        
INFO[0000] Storage dir: /home/nemo/.local/share/harbour-whisperfish/storage 
INFO[0000] Server: https://textsecure-service.whispersystems.org:443 
INFO[0000] Identity key found. Already registered       
INFO[0001] Setting up whisperfish client                
INFO[2018/08/24 10:39:59] Prompting for storage password               
[D] onTriggered:164 - Page status: 2
[W] unknown:202 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:202: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:197 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:197: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:255 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:255: TypeError: Cannot read property 'forwardIndicatorDown' of null
[W] unknown:250 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:250: TypeError: Cannot read property 'forwardIndicatorDown' of null
INFO[2018/08/24 10:40:07] Attempting to open encrypted datastore       
INFO[2018/08/24 10:40:07] Database dir: /home/nemo/.local/share/harbour-whisperfish/db 
INFO[2018/08/24 10:40:07] Connecting to encrypted data store           
DEBU[2018/08/24 10:40:07] Get local contacts handler                   
DEBU[2018/08/24 10:40:09] PUT /v1/directory/tokens 200

DEBU[2018/08/24 10:40:10] GET /v1/devices/ 200

DEBU[2018/08/24 10:40:13] Starting client websocket listener           
DEBU[2018/08/24 10:40:13] Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/ 
DEBU[2018/08/24 10:40:13] Websocket Connected successfully             
panic: runtime error: index out of range

goroutine 16 [running]:
github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure/axolotl.LoadPreKeyWhisperMessage(XXXXXXXXXXXXXXXXXXXXXXXXXXXX)
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure/axolotl/messages.go:149 +0x440
github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure.handleReceivedMessage(0x1115c900, 0x16b, 0x16b, 0x74ff10, 0x1118f460)
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure/textsecure.go:501 +0x588
github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure.StartListening(0x0, 0x0)
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure/websocket.go:183 +0x550
github.com/aebruno/whisperfish/worker.(*ClientWorker).start(0x11164cc0)
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/worker/client.go:95 +0xa4
created by github.com/aebruno/whisperfish/worker.(*ClientWorker).init.func1
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/worker/client.go:68 +0x78

Below is the -d output

time="2018-08-24T09:25:58-04:00" level=info msg="Starting Whisperfish version 0.5.1-0-ge8942f9"
time="2018-08-24T09:25:58-04:00" level=info msg="Successfully loaded system locale" locale=en_US
time="2018-08-24T09:25:58-04:00" level=info msg="Setting up whisperfish directories"
time="2018-08-24T09:25:58-04:00" level=info msg="Config dir: /home/nemo/.config/harbour-whisperfish"
time="2018-08-24T09:25:58-04:00" level=info msg="Data dir: /home/nemo/.local/share/harbour-whisperfish"
time="2018-08-24T09:25:58-04:00" level=info msg="Attachments dir: /home/nemo/.local/share/harbour-whisperfish/storage/attachments"
time="2018-08-24T09:25:58-04:00" level=info msg="Checking search path: /home/nemo/Pictures"
time="2018-08-24T09:25:58-04:00" level=info msg="Attachment search paths: [/home/nemo/Pictures]"
time="2018-08-24T09:25:58-04:00" level=info msg="Parsing Signal config"
time="2018-08-24T09:25:58-04:00" level=info msg="Storage dir: /home/nemo/.local/share/harbour-whisperfish/storage"
time="2018-08-24T09:25:58-04:00" level=info msg="Server: https://textsecure-service.whispersystems.org:443"
time="2018-08-24T09:25:58-04:00" level=info msg="Identity key found. Already registered"
time="2018-08-24T09:25:59-04:00" level=info msg="Setting up whisperfish client"
time="2018/08/24 09:25:59" level=info msg="Prompting for storage password"
time="2018/08/24 09:26:09" level=info msg="Attempting to open encrypted datastore"
time="2018/08/24 09:26:09" level=info msg="Database dir: /home/nemo/.local/share/harbour-whisperfish/db"
time="2018/08/24 09:26:09" level=info msg="Connecting to encrypted data store"
time="2018/08/24 09:26:10" level=debug msg="Get local contacts handler"
time="2018/08/24 09:26:11" level=debug msg="PUT /v1/directory/tokens 200\n"
time="2018/08/24 09:26:12" level=debug msg="GET /v1/devices/ 200\n"
time="2018/08/24 09:26:15" level=debug msg="Starting client websocket listener"
time="2018/08/24 09:26:15" level=debug msg="Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/"
time="2018/08/24 09:26:15" level=debug msg="Websocket Connected successfully"

Any ideas?

marxistvegan commented 6 years ago

FYI I ended up reinstalling the app and so far though no group test yet, it is not constantly crashing but will report more as i test it out.

marxistvegan commented 6 years ago

I do rely on this application a lot so for the time being I may have to use the apk version until this is resolved.

Here is the update after reinstalling it worked for a bit with individual messages, and though group messages worked on the desktop version they did not appear on whisperfish. I then received a message from a new individual whom I had not communicated with Signal and was shown in the desktop that there was an 'Error handling the incoming message' then the whisperfish crashed. I ran the debug mode and have the info below

<pre>[nemo@Sailfish ~]$ harbour-whisperfish -d
[D] unknown:0 - Using Wayland-EGL
[D] onTriggered:164 - Page status: 2
[W] unknown:202 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:202: TypeError: Cannot read property &apos;backIndicatorDown&apos; of null
[W] unknown:197 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:197: TypeError: Cannot read property &apos;backIndicatorDown&apos; of null
[W] unknown:255 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:255: TypeError: Cannot read property &apos;forwardIndicatorDown&apos; of null
[W] unknown:250 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:250: TypeError: Cannot read property &apos;forwardIndicatorDown&apos; of null
panic: runtime error: index out of range

goroutine 73 [running]:
github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure/axolotl.LoadPreKeyWhisperMessage(0x0, 0x0, 0x0, 0x74fcf0, 0x111603c0, 0x0)
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure/axolotl/messages.go:149 +0x440
github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure.handleReceivedMessage(0x11286460, 0xdb, 0xdb, 0x74ff10, 0x1140ea60)
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure/textsecure.go:501 +0x588
github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure.StartListening(0x0, 0x0)
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure/websocket.go:183 +0x550
github.com/aebruno/whisperfish/worker.(*ClientWorker).start(0x11256d80)
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/worker/client.go:95 +0xa4
created by github.com/aebruno/whisperfish/worker.(*ClientWorker).init.func1
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/worker/client.go:68 +0x78
[nemo@Sailfish ~]$ 

</pre>

I then reran the application without debug and saw this


[nemo@Sailfish ~]$ harbour-whisperfish   
INFO[0000] Starting Whisperfish version 0.5.1-0-ge8942f9 
INFO[0000] No translations found for system locale. Using default  locale=C
[D] unknown:0 - Using Wayland-EGL
INFO[0000] Setting up whisperfish directories           
INFO[0000] Config dir: /home/nemo/.config/harbour-whisperfish 
INFO[0000] Data dir: /home/nemo/.local/share/harbour-whisperfish 
INFO[0000] Attachments dir: /home/nemo/.local/share/harbour-whisperfish/storage/attachments 
INFO[0000] Checking search path: /home/nemo/Pictures    
INFO[0000] Attachment search paths: [/home/nemo/Pictures] 
INFO[0000] Parsing Signal config                        
INFO[0000] Storage dir: /home/nemo/.local/share/harbour-whisperfish/storage 
INFO[0000] Server: https://textsecure-service.whispersystems.org:443 
INFO[0000] Identity key found. Already registered       
INFO[0001] Setting up whisperfish client                
INFO[2018/08/26 18:59:39] Prompting for storage password               
[D] onTriggered:164 - Page status: 2
[W] unknown:202 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:202: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:197 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:197: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:255 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:255: TypeError: Cannot read property 'forwardIndicatorDown' of null
[W] unknown:250 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:250: TypeError: Cannot read property 'forwardIndicatorDown' of null
INFO[2018/08/26 18:59:46] Attempting to open encrypted datastore       
INFO[2018/08/26 18:59:46] Database dir: /home/nemo/.local/share/harbour-whisperfish/db 
INFO[2018/08/26 18:59:46] Connecting to encrypted data store           
DEBU[2018/08/26 18:59:46] Get local contacts handler                   
DEBU[2018/08/26 18:59:49] PUT /v1/directory/tokens 200

DEBU[2018/08/26 18:59:54] GET /v1/devices/ 200

DEBU[2018/08/26 18:59:57] Starting client websocket listener           
DEBU[2018/08/26 18:59:57] Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/ 
DEBU[2018/08/26 18:59:59] Websocket Connected successfully             
DEBU[2018/08/26 18:59:59] Message receipt handler                      
DEBU[2018/08/26 18:59:59] Receipt handler                               devID=3 source=+1XXXXXXXXXX timestamp=1535320764432
DEBU[2018/08/26 18:59:59] receiptHandler can't find message. Trying again later 
DEBU[2018/08/26 19:00:00] receiptHandler can't find message. Trying again later 
DEBU[2018/08/26 19:00:00] receiptHandler can't find message. Trying again later 
ERRO[2018/08/26 19:00:01] Failed to mark message received               error="sql: no rows in result set" source=+1XXXXXXXXXX timestamp=1535320764432
DEBU[2018/08/26 19:00:01] Websocket sending message                    
ERRO[2018/08/26 19:00:01] Failed to send websocket message              error="tls: use of closed connection"
DEBU[2018/08/26 19:00:01] Closing writeWorker                          
panic: runtime error: index out of range

goroutine 19 [running]:
github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure/axolotl.LoadPreKeyWhisperMessage(0x0, 0x0, 0x0, 0x74fcf0, 0x1104ae40, 0x0)
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure/axolotl/messages.go:149 +0x440
github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure.handleReceivedMessage(0x11094460, 0xdb, 0xdb, 0x74ff10, 0x11111ea0)
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure/textsecure.go:501 +0x588
github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure.StartListening(0x0, 0x0)
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/vendor/github.com/aebruno/textsecure/websocket.go:183 +0x550
github.com/aebruno/whisperfish/worker.(*ClientWorker).start(0x11064cc0)
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/worker/client.go:95 +0xa4
created by github.com/aebruno/whisperfish/worker.(*ClientWorker).init.func1
    /home/src1/projects/go/src/github.com/aebruno/whisperfish/worker/client.go:68 +0x78
[nemo@Sailfish ~]$ 
aebruno commented 6 years ago

@marxistvegan Thanks for the detailed logs. I'll take a look and see if I can fix.

marxistvegan commented 6 years ago

@aebruno sorry to bug but any movement on this? I am using the apk version and it is killing my battery, anxious to get this back up :)

frefell commented 5 years ago

Just wanted to add, that I have the same problem. There is one contact from which I won't see any messages in group chats and writing directs messages leads to same (ish) error messages until reinstall.

marxistvegan commented 5 years ago

Just wanted to add, that I have the same problem. There is one contact from which I won't see any messages in group chats and writing directs messages leads to same (ish) error messages until reinstall.

I had this fixed in part after reinstall and then it came back again. At the moment I am using the apk.

aebruno commented 5 years ago

Apologies for the delay on this bug. I'm unable to reproduce which is making it more challenging to fix. Will keep you posted if I make any progress.

marxistvegan commented 5 years ago

Apologies for the delay on this bug. I'm unable to reproduce which is making it more challenging to fix. Will keep you posted if I make any progress.

I am testing it out with my alternate number (i.e. google voice number) to see if I can recreate it again. I miss using whisperfish and hope other updates are coming too!

omartijn commented 5 years ago

I am now getting the same error as well. Is there anything I can do to help debug this error?