aebruno / whisperfish

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

handshake fails #77

Closed Nokius closed 7 years ago

Nokius commented 7 years ago

First I assumed it's because of 2.1.0.x EA SailfishOS version on my JollaC. So I setup my Xiaomi Mi4 with Whisperfish.

But here I see also this in the console :(

[nemo@Sailfish]$ harbour-whisperfish 
INFO[0000] Starting Whisperfish version 0.4.2-0-gcd02c33 
INFO[0000] No translations found for system locale. Using default  locale=C
[D] QWaylandEglClientBufferIntegration::QWaylandEglClientBufferIntegration:62 - 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:                                      
INFO[0000] Identity key found. Already registered       
[W] Silica::ThemePrivate::ThemePrivate:432 - Defaulting to webview scaling factor of 1.0 
[W] DeclarativeWindow::DeclarativeWindow:94 - No default allowed orientations defined. Check your device configuration! 
[W] unknown:38 - file:///usr/lib/qt5/qml/Sailfish/Silica/private/Util.js:38: TypeError: Cannot read property 'parent' of null
INFO[0002] Setting up whisperfish client                
INFO[2017/03/23 19:52:30] Prompting for storage password               
[D] SeasideCache::startRequest:1610 - Starting favorites query at 182 ms 
[W] unknown:189 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:189: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:194 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:194: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:247 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:247: TypeError: Cannot read property 'forwardIndicatorDown' of null
[W] unknown:242 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:242: TypeError: Cannot read property 'forwardIndicatorDown' of null
[D] SeasideCache::requestStateChanged:2819 - Favorites queried in 333 ms 
[D] SeasideCache::startRequest:1655 - Starting metadata query at 375 ms 
[D] SeasideCache::requestStateChanged:2827 - All queried in 433 ms 
[D] SeasideCache::startRequest:1665 - Starting online  query at 433 ms 
[D] SeasideCache::requestStateChanged:2834 - Online queried in 443 ms 
[D] onTriggered:156 - Page status: 2
[W] unknown:189 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:189: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:194 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:194: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:247 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:247: TypeError: Cannot read property 'forwardIndicatorDown' of null
[W] unknown:242 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:242: TypeError: Cannot read property 'forwardIndicatorDown' of null
INFO[2017/03/23 19:52:39] Attempting to open encrypted datastore       
INFO[2017/03/23 19:52:39] Database dir: /home/nemo/.local/share/harbour-whisperfish/db 
INFO[2017/03/23 19:52:39] Connecting to encrypted data store           
DEBU[2017/03/23 19:52:39] Get local contacts handler                   
DEBU[2017/03/23 19:52:40] PUT /v1/directory/tokens 401

ERRO[2017/03/23 19:52:40] Failed to fetch signal contacts               error=status code 401

DEBU[2017/03/23 19:52:41] GET /v1/devices/ 401

DEBU[2017/03/23 19:52:44] Starting client websocket listener           
DEBU[2017/03/23 19:52:44] Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/ 
ERRO[2017/03/23 19:52:44] Error processing Websocket event from Signal  error=websocket: bad handshake
DEBU[2017/03/23 19:52:47] Starting client websocket listener           
DEBU[2017/03/23 19:52:47] Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/ 
ERRO[2017/03/23 19:52:48] Error processing Websocket event from Signal  error=websocket: bad handshake
DEBU[2017/03/23 19:52:51] Starting client websocket listener           
DEBU[2017/03/23 19:52:51] Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/ 
ERRO[2017/03/23 19:52:51] Error processing Websocket event from Signal  error=websocket: bad handshake
DEBU[2017/03/23 19:52:54] Starting client websocket listener           
DEBU[2017/03/23 19:52:54] Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/ 
ERRO[2017/03/23 19:52:55] Error processing Websocket event from Signal  error=websocket: bad handshake
DEBU[2017/03/23 19:52:58] Starting client websocket listener           
DEBU[2017/03/23 19:52:58] Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/ 
ERRO[2017/03/23 19:52:58] Error processing Websocket event from Signal  error=websocket: bad handshake
DEBU[2017/03/23 19:53:01] Starting client websocket listener           
DEBU[2017/03/23 19:53:01] Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/ 
ERRO[2017/03/23 19:53:02] Error processing Websocket event from Signal  error=websocket: bad handshake
DEBU[2017/03/23 19:53:05] Starting client websocket listener           
DEBU[2017/03/23 19:53:05] Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/ 
ERRO[2017/03/23 19:53:06] Error processing Websocket event from Signal  error=websocket: bad handshake

The Mi4 runs with SFOS 2.0.5.6

[nemo@Sailfish]$ cat /etc/sailfish-release
NAME=SailfishOS
ID=sailfishos
VERSION="2.0.5.6 (Haapajoki) (armv7hl)"
VERSION_ID=2.0.5.6
PRETTY_NAME="SailfishOS 2.0.5.6 (Haapajoki) (armv7hl)"
SAILFISH_BUILD=6
SAILFISH_FLAVOUR=release
HOME_URL="https://sailfishos.org/"

The account was created with Whisperfish and just used with Whisperfish.

Thanks for your work and please let me know when you are around Berlin I own you more then one drink :)

aebruno commented 7 years ago

Can you confirm this file exists /home/nemo/.config/harbour-whisperfish/config.yml? Sounds like there is an issue with your signal credentials (identity keys or registration id). Did you copy them to another device?

Nokius commented 7 years ago

Yes it's missing on the Mi4

I copied over from the JollaC but I still see the error

[nemo@Sailfish]$ cat /home/nemo/.config/harbour-whisperfish/config.yml   
tel: "XXXremovedXXX"
server: https://textsecure-service.whispersystems.org:443
rootCA: ""
proxy: ""
verificationType: voice
storageDir: /home/nemo/.local/share/harbour-whisperfish/storage
unencryptedStorage: false
storagePassword: ""
loglevel: debug
userAgent: Whisperfish v0.3.0+0+g0ba480c
alwaysTrustPeerID: false
[nemo@Sailfish]$ harbour-whisperfish                                         
INFO[0000] Starting Whisperfish version 0.4.2-0-gcd02c33 
INFO[0000] No translations found for system locale. Using default  locale=C
[D] QWaylandEglClientBufferIntegration::QWaylandEglClientBufferIntegration:62 - 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       
[W] Silica::ThemePrivate::ThemePrivate:432 - Defaulting to webview scaling factor of 1.0 
[W] DeclarativeWindow::DeclarativeWindow:94 - No default allowed orientations defined. Check your device configuration! 
[W] unknown:38 - file:///usr/lib/qt5/qml/Sailfish/Silica/private/Util.js:38: TypeError: Cannot read property 'parent' of null
INFO[0002] Setting up whisperfish client                
INFO[2017/03/23 21:33:57] Prompting for storage password               
[D] SeasideCache::startRequest:1610 - Starting favorites query at 422 ms 
[D] SeasideCache::requestStateChanged:2819 - Favorites queried in 644 ms 
[D] SeasideCache::startRequest:1655 - Starting metadata query at 689 ms 
[W] unknown:189 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:189: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:194 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:194: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:247 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:247: TypeError: Cannot read property 'forwardIndicatorDown' of null
[W] unknown:242 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:242: TypeError: Cannot read property 'forwardIndicatorDown' of null
[D] SeasideCache::requestStateChanged:2827 - All queried in 733 ms 
[D] SeasideCache::startRequest:1665 - Starting online  query at 734 ms 
[D] SeasideCache::requestStateChanged:2834 - Online queried in 752 ms 
[D] onTriggered:156 - Page status: 2
[W] unknown:189 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:189: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:194 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:194: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:247 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:247: TypeError: Cannot read property 'forwardIndicatorDown' of null
[W] unknown:242 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:242: TypeError: Cannot read property 'forwardIndicatorDown' of null
INFO[2017/03/23 21:34:02] Attempting to open encrypted datastore       
INFO[2017/03/23 21:34:02] Database dir: /home/nemo/.local/share/harbour-whisperfish/db 
INFO[2017/03/23 21:34:02] Connecting to encrypted data store           
DEBU[2017/03/23 21:34:02] Get local contacts handler                   
DEBU[2017/03/23 21:34:03] PUT /v1/directory/tokens 401

ERRO[2017/03/23 21:34:03] Failed to fetch signal contacts               error=status code 401

DEBU[2017/03/23 21:34:04] GET /v1/devices/ 401

DEBU[2017/03/23 21:34:07] Starting client websocket listener           
DEBU[2017/03/23 21:34:07] Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/ 
ERRO[2017/03/23 21:34:08] Error processing Websocket event from Signal  error=websocket: bad handshake
DEBU[2017/03/23 21:34:11] Starting client websocket listener           
DEBU[2017/03/23 21:34:11] Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/ 
ERRO[2017/03/23 21:34:11] Error processing Websocket event from Signal  error=websocket: bad handshake
DEBU[2017/03/23 21:34:14] Starting client websocket listener           
DEBU[2017/03/23 21:34:14] Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/ 
ERRO[2017/03/23 21:34:15] Error processing Websocket event from Signal  error=websocket: bad handshake
DEBU[2017/03/23 21:34:18] Starting client websocket listener           
DEBU[2017/03/23 21:34:18] Websocket Connecting to https://textsecure-service.whispersystems.org:443/v1/websocket/ 
aebruno commented 7 years ago

Did you re-register with signal at some point? Without the config.yml file it should have prompted you to re-register. From the logs you sent it looks like your signal credentials are invalid. Guessing you'll have to re-register with signal and start fresh.

Nokius commented 7 years ago

No on the Mi4 I got no re-register when I missed the config.yml

Okay, How to trigger a re-register

Thanks for your help :)

Nokius commented 7 years ago

issue solved on the JollaC (SFOS EA) with deleting /home/nemo/.config/harbour-whisperfish/ and /home/nemo/.local/share/harbour-whisperfish and re-registering the device \o/

Thanks for the help :)

aebruno commented 7 years ago

Great! Glad to hear you got it sorted out.