janimo / textsecure-qml

TextSecure UI in Go and QML
GNU General Public License v3.0
44 stars 5 forks source link

textsecure crashes when connecting to server #47

Open MrSqueakySquirrel opened 7 years ago

MrSqueakySquirrel commented 7 years ago

What is expected: TextSecure is started and connects with server. What happens instead: When TextSecure is started and a connection to the internet is available the application crashes when trying to connect to the server.

Here are the latest log entries. The websocket.Dialerror appears multiple times in todays logs, but not in previous logs.

INFO[2017/04/11 20:29:32] websocket.Dial wss://textsecure-service.whispersystems.org:443/v1/websocket/?login=%2B49{PHONE_NUMBER}&password={PASSWORD}: dial tcp: lookup textsecure-service.whispersystems.org: Temporary failure in name resolution INFO[0000] Setup completed
DEBU[2017/04/11 20:29:46] PUT /v1/directory/tokens 200

When TextSecure is started and no connection to the internet is available the application shows a warning and remains responsive, (expected behaviour)

timothymctim commented 7 years ago

Since today (~ 8 hours ago), the app also crashes for me, however, I do receive new messages but the app intermediately quits after launch.

No errors get logged when there is a network connection:

INFO[0000] Setup completed                              
DEBU[2017/04/11 22:37:21] PUT /v1/directory/tokens 200

Following the advice in this report by launching the app in flight mode, does work: the app remains running. But then the following line (of course) shows up in the log:

INFO[0000] Setup completed                              
INFO[2017/04/11 22:38:34] websocket.Dial wss://textsecure-service.whispersystems.org:443/v1/websocket/?login=%2B{PHONE_NUMBER}&password={PASSWORD}: dial tcp: lookup textsecure-service.whispersystems.org: Temporary failure in name resolution 
kallekruse commented 7 years ago

@janimo wrote here:

sorry I don't know off the top of my head what it could be, I haven't worked on the project in over a year and no longer have a working phone to test with.

Lots of sad news these days for ubuntuphone users :-(

K14D commented 7 years ago

It seems that the application receives an empty message from the server an tries to extract the mac from a non-existing offset which causes a "panic: runtime error: slice bounds out of range". I could fix (?) this in the console version by adding:

if len(msg) == 0 {
    return nil
}

to the handleReceivedMessage (textsecure.go:460) function.

As far as I can see, there is nothing wrong with just ignoring those empty messages.

K14D commented 7 years ago

Are you going to release a fixed version for ubuntu phone?

janimo commented 7 years ago

Eventually I'll probably do so. I'll have to check my long unused build setup and ask others to test the click before uploading to the store.

luxpir commented 7 years ago

It'd be highly appreciated if you found time to do so. Just another +1.

K14D commented 7 years ago

I really appreciate your effort. Let me know if I can help.

janimo commented 7 years ago

I built a new click, could any of you test it, I don't have a phone anymore. BTW it's just running ./build.sh rel from the source dir, I'd be curious if that works for others as well. It pulls a few docker images and needs to have a local GOPATH with textsecure and textsecure-qml cloned. https://startx.ro/textsecure.jani_0.3.12_armhf.click

K14D commented 7 years ago

In a short test your click runs fine on my Aquaris E4.5.

I tried to build the click myself, but the package github.com/ubuntu-core/snappy/helpers could not be found. So the build failed.

janimo commented 7 years ago

It must have moved or gone away since I last built, I still have it in my local $GOPATH. I'll need to find its new location, thanks for the report.

Guillerm2 commented 7 years ago

I am very happy to read that you are finally work on the project. On Pro5 runs fine too.

Thanks for all Jani (your Signal client library for Go works perfect on Sailfish OS, under Whisperfish).

timothymctim commented 7 years ago

Any plans to upload to the store? Otherwise, how do I manually install? Just a pkcon install-local textsecure.jani_0.3.12_armhf.click without needing to uninstall the current app first?

K14D commented 7 years ago

Just a pkcon install-local textsecure.jani_0.3.12_armhf.click without needing to uninstall the current app first?

Yes. At least for me, this worked fine.

timothymctim commented 7 years ago

Works like a charm, thanks everybody!

kallekruse commented 7 years ago

Hi, everybody, the click package download link gives me a certificate warning, and trying to install it yields a 'signature verification error': $ pkcon install-local textsecure.jani_0.3.12_armhf.click ... Schwerwiegender Fehler: .../textsecure.jani_0.3.12_armhf.click failed to install. Cannot install .../textsecure.jani_0.3.12_armhf.click: Signature verification error: debsig: Origin Signature check failed. This deb might not be signed. I suppose this would work with the --allow-untrustedparameter? All those circumvented security barriers give me the creeps - any chance to upload the fixed version to the store (ideally the OpenStore), @janimo ?

janimo commented 7 years ago

I have pushed the 0.3.12 click that others here have tested to the app store, thanks @K14D @timothymctim ! I haven't done this since February 2016, I hope I didn't botch anything. Cheers

kallekruse commented 7 years ago

Works fine - thanks again, everybody!

AnneGilles commented 7 years ago

+1