xeals / signal-back

Decrypt Signal encrypted backups outside the app
Apache License 2.0
704 stars 67 forks source link

Unexpected error: runtime error: invalid memory address or nil pointer dereference #62

Open Aviortheking opened 5 years ago

Aviortheking commented 5 years ago

Full relevant output

» ./signal-back --version
signal-back devel
proto commit: d6610f0
avior at Archvior in ~/Downloads
» ./signal-back format -v -f xml -o backup.xml -p pass.txt signal-2019-09-23-22-17-01.backup
2019/09/23 23:30:59 Unexpected error: runtime error: invalid memory address or nil pointer dereference
2019/09/23 23:30:59 TEMP: statement is 
2019/09/23 23:30:59 TEMP: statement is &signal.SqlStatement{Statement:(*string)(nil), Parameters:[]*signal.SqlStatement_SqlParameter(nil), XXX_unrecognized:[]uint8(nil)}
goroutine 1 [running]:
runtime/debug.Stack(0xc0000b8000, 0x2, 0xc0004a0460)
    /usr/lib/go/src/runtime/debug/stack.go:24 +0x9d
runtime/debug.PrintStack()
    /usr/lib/go/src/runtime/debug/stack.go:16 +0x22
github.com/xeals/signal-back/cmd.XML.func2.1(0xc00005e0c0)
    /home/avior/go/src/github.com/xeals/signal-back/cmd/format.go:169 +0x142
panic(0x5e0520, 0x7bb900)
    /usr/lib/go/src/runtime/panic.go:522 +0x1b5
github.com/xeals/signal-back/cmd.XML.func2(0xc00005e0c0, 0x0, 0x0)
    /home/avior/go/src/github.com/xeals/signal-back/cmd/format.go:175 +0x93
github.com/xeals/signal-back/types.(*BackupFile).Consume(0xc00048a070, 0xc000086bd0, 0xc000084260, 0xc00000e040, 0x0, 0x0)
    /home/avior/go/src/github.com/xeals/signal-back/types/backup.go:260 +0x14d
github.com/xeals/signal-back/cmd.XML(0xc00048a070, 0x656c40, 0xc000010008, 0x3, 0x1)
    /home/avior/go/src/github.com/xeals/signal-back/cmd/format.go:203 +0x201
github.com/xeals/signal-back/cmd.glob..func4(0xc0000a6580, 0x0, 0x0)
    /home/avior/go/src/github.com/xeals/signal-back/cmd/format.go:70 +0x457
github.com/xeals/signal-back/vendor/github.com/urfave/cli.HandleAction(0x5d55c0, 0x622cf0, 0xc0000a6580, 0xc00009c200, 0x0)
    /home/avior/go/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/app.go:490 +0xc8
github.com/xeals/signal-back/vendor/github.com/urfave/cli.Command.Run(0x615b53, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x61c4ef, 0x1f, 0x621f7b, ...)
    /home/avior/go/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/command.go:210 +0x996
github.com/xeals/signal-back/vendor/github.com/urfave/cli.(*App).Run(0xc0000a2340, 0xc0000a0000, 0xa, 0xa, 0x0, 0x0)
    /home/avior/go/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/app.go:255 +0x6af
main.main()
    /home/avior/go/src/github.com/xeals/signal-back/main.go:52 +0x2d0

@xeals thanks in advance for looking into this error

eeik commented 5 years ago

Same same here ... both on 1.6 and 1.7a2 ... format incompatibility introduced by Signal App team since the previous release perhaps?

Windows 10 signal-back v0.1.7-alpha.2 proto commit: d6610f0

TM818 commented 4 years ago

Yes, this utility is no longer compatible with current versions of Signal (I'm using this in May of 2020).

Every time I try to decrypt on Windows, I get this error. Different errors appear when building from source on MacOS or Linux. Have double-checked password, tried different instances of backup, different output types, all to no avail.

This should be considered a dead utility.

wehkah commented 4 years ago

Yes, it's a shame that Signal does not offer an option to export SMS into the system's database. SMS are unencrypted anyway, so there's no point in worrying about security there.

I know this question is a bit off topic, but in case this program will not be able to convert Signal's new database format into a valid XML file correctly: what about the CSV file? If this program can create a valid CSV, that can be opened with LibreCalc or Excel without errors, shouldn't it be possible to re-import the message into the system database using this file? Does anyone know of an app or a program that can do this?