xeals / signal-back

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

Output file empty #54

Open arfoxx opened 5 years ago

arfoxx commented 5 years ago

Detailed description

When I first run in terminal and enter the password I get this error Password: error: failed to format output: consume [avatar]: can't read attachment of length 0

However, if I run it again and just hit return for the password without entering it, it creates a file that is empty. Below is what I see in terminal

NEWs-MBP:Signal new$ ./signal-back_darwin_amd64 format -f XML -o backup.xml signal-2019-04-16-20-28-42.backup Password: goroutine 1 [running]: runtime/debug.Stack(0xc4200900f0, 0x2, 0xc42041c3c0) /home/travis/.gimme/versions/go1.10.7.linux.amd64/src/runtime/debug/stack.go:24 +0xa7 runtime/debug.PrintStack() /home/travis/.gimme/versions/go1.10.7.linux.amd64/src/runtime/debug/stack.go:16 +0x22 github.com/xeals/signal-back/cmd.XML.func2.1(0xc42001c800) /home/travis/gopath/src/github.com/xeals/signal-back/cmd/format.go:169 +0x142 panic(0x11c1f40, 0x130a250) /home/travis/.gimme/versions/go1.10.7.linux.amd64/src/runtime/panic.go:502 +0x229 github.com/xeals/signal-back/cmd.XML.func2(0xc42001c800, 0x0, 0x0) /home/travis/gopath/src/github.com/xeals/signal-back/cmd/format.go:175 +0x92 github.com/xeals/signal-back/types.(BackupFile).Consume(0xc42000e150, 0xc420088870, 0xc42005c210, 0xc42000a020, 0x0, 0x0) /home/travis/gopath/src/github.com/xeals/signal-back/types/backup.go:260 +0x14d github.com/xeals/signal-back/cmd.XML(0xc42000e150, 0x121c8a0, 0xc42000c008, 0x3, 0x1) /home/travis/gopath/src/github.com/xeals/signal-back/cmd/format.go:203 +0x24b github.com/xeals/signal-back/cmd.glob..func4(0xc42009c420, 0x0, 0x0) /home/travis/gopath/src/github.com/xeals/signal-back/cmd/format.go:70 +0x40f github.com/xeals/signal-back/vendor/github.com/urfave/cli.HandleAction(0x11b7a00, 0x1203488, 0xc42009c420, 0xc420068100, 0x0) /home/travis/gopath/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(0x11f70b7, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x11fd1e2, 0x1f, 0x1202719, ...) /home/travis/gopath/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/command.go:210 +0xa36 github.com/xeals/signal-back/vendor/github.com/urfave/cli.(App).Run(0xc42008c340, 0xc42000e070, 0x7, 0x7, 0x0, 0x0) /home/travis/gopath/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/app.go:255 +0x6a0 main.main() /home/travis/gopath/src/github.com/xeals/signal-back/main.go:52 +0x317 NEWs-MBP:Signal new$

Full relevant output

arfoxx commented 5 years ago

I also tried it on two other computers with the same results. An iMac, and a PC

ghost commented 5 years ago

Same issue here on Windows (amd64), the XML file is almost empty : the program behaves as if all worked well, but the XML only contains : "<"?xml version='1.0' encoding='UTF-8' standalone='yes' ?">" "<"?xml-stylesheet type="text/xsl" href="sms.xsl" ?">" "<"smses count="0"></smses">" (without the quotes at the begining and end of each line) which makes it around 1kb. The CSV export seems to work fine though (but I don't have any option to restore it as an SMS database for the moment so kinda useless) and the extract functions as well.

anandjay commented 5 years ago

Hi all, I'm having the same issue on Windows (amd64). The XML file just contains the wrapper, with SMS count at 0.

Have the binary file and the backup file in the same directory, and entered:

signal-back_windows_amd64.exe format -f XML -o backup.xml signal-2019-04-29-19-51-27.backup

Feel like I must be missing something simple...help?

edit: oh, found this previous issue (https://github.com/xeals/signal-back/pull/43), but having trouble figuring out how to adjust what i'm doing? should i be finding a different version of the binary or something?

more edits: ok, realized i didn't specify which release i was using. originally was using v0.1.6. After reading the pull request referenced above, tried the most recent pre-release (v0.1.7-alpha2), but then when i ran the command, when prompted for password it didn't seem to accept any text i entered, whether the password itself or trying to pass the file with -P pass.txt. what i mean by "didn't seem to accept", i mean the cursor doesn't move all when i try to respond to the password prompt.

returns error:

"error: failed to format output: consume [avatar]: can't read attachment of length 0"

which i assume means it couldn't parse the password, because of course it didn't receive anything from me.

tried going back one and using v.0.1.7-alpha1, same problem. any thoughts?

even more edits! Found in this issue (https://github.com/xeals/signal-back/issues/47) that the poster had used the -P pass.txt in the initial command, and tried that with v0.1.6 and, voila!

ghost commented 5 years ago

At this point, I'm waiting for help from the developer. We shall wait ;)

On Wed, May 1, 2019, 2:26 AM anandjay notifications@github.com wrote:

Hi all, I'm having the same issue on Windows (amd64). The XML file just contains the wrapper, with SMS count at 0.

Have the binary file and the backup file in the same directory, and entered:

signal-back_windows_amd64.exe format -f XML -o backup.xml signal-2019-04-29-19-51-27.backup

Feel like I must be missing something simple...help?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xeals/signal-back/issues/54#issuecomment-488161398, or mute the thread https://github.com/notifications/unsubscribe-auth/ALEGMI4Z4KTPT74CUXDE473PTDPTBANCNFSM4HHAYA2Q .

Jgarc2 commented 5 years ago

I am experiencing the same issue where the output file (backup.xml 0 kb) file is empty

$ ./signal-back_windows_amd64.exe format -f XML -o backup.xml signal-2019-04-29-13-56-09.backup Password: goroutine 1 [running]: runtime/debug.Stack(0xc000090000, 0x2, 0xc000014500) /usr/lib/go/src/runtime/debug/stack.go:24 +0xae runtime/debug.PrintStack() /usr/lib/go/src/runtime/debug/stack.go:16 +0x29 github.com/xeals/signal-back/cmd.XML.func2.1(0xc00003a6c0) /home/xeal/go/src/github.com/xeals/signal-back/cmd/format.go:169 +0x149 panic(0x5e9360, 0x7aa350) /usr/lib/go/src/runtime/panic.go:513 +0x1c7 github.com/xeals/signal-back/cmd.XML.func2(0xc00003a6c0, 0x0, 0x0) /home/xeal/go/src/github.com/xeals/signal-back/cmd/format.go:175 +0x99 github.com/xeals/signal-back/types.(BackupFile).Consume(0xc000482070, 0xc0000c11a0, 0xc0000381a0, 0xc000004040, 0x0, 0x0) /home/xeal/go/src/github.com/xeals/signal-back/types/backup.go:260 +0x15d github.com/xeals/signal-back/cmd.XML(0xc000482070, 0x6527e0, 0xc000006008, 0x3, 0x1) /home/xeal/go/src/github.com/xeals/signal-back/cmd/format.go:203 +0x229 github.com/xeals/signal-back/cmd.glob..func4(0xc000080420, 0x0, 0x0) /home/xeal/go/src/github.com/xeals/signal-back/cmd/format.go:70 +0x403 github.com/xeals/signal-back/vendor/github.com/urfave/cli.HandleAction(0x5de720, 0x62b5f8, 0xc000080420, 0xc00003c100, 0x0) /home/xeal/go/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/app.go:490 +0xcf github.com/xeals/signal-back/vendor/github.com/urfave/cli.Command.Run(0x61d1db, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x624e86, 0x1f, 0x62a881, ...) /home/xeal/go/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/command.go:210 +0x997 github.com/xeals/signal-back/vendor/github.com/urfave/cli.(App).Run(0xc00007c1a0, 0xc000074000, 0x7, 0x8, 0x0, 0x0) /home/xeal/go/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/app.go:255 +0x68e main.main() /home/xeal/go/src/github.com/xeals/signal-back/main.go:52 +0x2d7

Tomptez commented 5 years ago

I have the same issue

./signal-back_linux_amd64 format -f XML -o backup.xml signal-2019-05-04-1.backup
Password: ** fatal error: runtime: out of memory

runtime stack: runtime.throw(0x5d2957, 0x16) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/panic.go:616 +0x81 runtime.sysMap(0xc508a40000, 0xe25a0000, 0x1054000, 0x6f4d98) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/mem_linux.go:216 +0x20a runtime.(mheap).sysAlloc(0x6dc760, 0xe25a0000, 0x0) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/malloc.go:470 +0xd4 runtime.(mheap).grow(0x6dc760, 0x712ca, 0x0) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/mheap.go:907 +0x60 runtime.(mheap).allocSpanLocked(0x6dc760, 0x712ca, 0x6f4da8, 0x7fff7c79f2b0) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/mheap.go:820 +0x301 runtime.(mheap).alloc_m(0x6dc760, 0x712ca, 0xffffffffffff0101, 0x7fff7c79f2f0) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/mheap.go:686 +0x118 runtime.(mheap).alloc.func1() /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/mheap.go:753 +0x4d runtime.(mheap).alloc(0x6dc760, 0x712ca, 0x7fff7c010101, 0x41372c) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/mheap.go:752 +0x8a runtime.largeAlloc(0xe2593e42, 0x440101, 0x7fee5353bd90) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/malloc.go:826 +0x94 runtime.mallocgc.func1() /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/malloc.go:721 +0x46 runtime.systemstack(0x0) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/asm_amd64.s:409 +0x79 runtime.mstart() /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/proc.go:1175

goroutine 1 [running]: runtime.systemstack_switch() /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/asm_amd64.s:363 fp=0xc423551050 sp=0xc423551048 pc=0x44f6b0 runtime.mallocgc(0xe2593e42, 0x58c820, 0xc4237e4801, 0xc508a34000) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/malloc.go:720 +0x8a2 fp=0xc4235510f0 sp=0xc423551050 pc=0x40fd02 runtime.makeslice(0x58c820, 0xe2593e42, 0xe2593e42, 0x10, 0x10, 0x5f2540) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/slice.go:61 +0x77 fp=0xc423551120 sp=0xc4235510f0 pc=0x43c307 github.com/xeals/signal-back/types.(BackupFile).Frame(0xc420090150, 0xc4243d6280, 0x0, 0x0) /home/travis/gopath/src/github.com/xeals/signal-back/types/backup.go:116 +0x344 fp=0xc4235511d0 sp=0xc423551120 pc=0x55a454 github.com/xeals/signal-back/cmd.XML(0xc420090150, 0x5f2760, 0xc42008a018, 0x3, 0x1) /home/travis/gopath/src/github.com/xeals/signal-back/cmd/format.go:145 +0x112 fp=0xc423551998 sp=0xc4235511d0 pc=0x569cf2 github.com/xeals/signal-back/cmd.glob..func4(0xc4200a6420, 0x0, 0x0) /home/travis/gopath/src/github.com/xeals/signal-back/cmd/format.go:67 +0x40f fp=0xc423551a38 sp=0xc423551998 pc=0x56b7df github.com/xeals/signal-back/vendor/github.com/urfave/cli.HandleAction(0x593a80, 0x5daef0, 0xc4200a6420, 0xc4200a0100, 0x0) /home/travis/gopath/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/app.go:490 +0xc8 fp=0xc423551a60 sp=0xc423551a38 pc=0x4f44a8 github.com/xeals/signal-back/vendor/github.com/urfave/cli.Command.Run(0x5cef16, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5d51a1, 0x1f, 0x5da204, ...) /home/travis/gopath/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/command.go:210 +0xa36 fp=0xc423551cd0 sp=0xc423551a60 pc=0x4f5716 github.com/xeals/signal-back/vendor/github.com/urfave/cli.(App).Run(0xc4200a21a0, 0xc420090000, 0x7, 0x7, 0x0, 0x0) /home/travis/gopath/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/app.go:255 +0x6a0 fp=0xc423551ea8 sp=0xc423551cd0 pc=0x4f2830 main.main() /home/travis/gopath/src/github.com/xeals/signal-back/main.go:52 +0x317 fp=0xc423551f88 sp=0xc423551ea8 pc=0x56c637 runtime.main() /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/proc.go:198 +0x212 fp=0xc423551fe0 sp=0xc423551f88 pc=0x42a792 runtime.goexit() /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc423551fe8 sp=0xc423551fe0 pc=0x4520a1 [tom@archlinux Desktop]$ ./signal-back_linux_amd64 check signal-2019-05-04-1.backup Password: 621372240712911104713683018389 fatal error: runtime: out of memory

runtime stack: runtime.throw(0x5d2957, 0x16) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/panic.go:616 +0x81 runtime.sysMap(0xc508f40000, 0xe25a0000, 0x1054000, 0x6f4d98) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/mem_linux.go:216 +0x20a runtime.(mheap).sysAlloc(0x6dc760, 0xe25a0000, 0x7fe2430c4ab8) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/malloc.go:470 +0xd4 runtime.(mheap).grow(0x6dc760, 0x712ca, 0x0) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/mheap.go:907 +0x60 runtime.(mheap).allocSpanLocked(0x6dc760, 0x712ca, 0x6f4da8, 0xc420041ee0) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/mheap.go:820 +0x301 runtime.(mheap).alloc_m(0x6dc760, 0x712ca, 0x410101, 0xc41fffb0ff) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/mheap.go:686 +0x118 runtime.(mheap).alloc.func1() /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/mheap.go:753 +0x4d runtime.(mheap).alloc(0x6dc760, 0x712ca, 0xc420010101, 0x41372c) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/mheap.go:752 +0x8a runtime.largeAlloc(0xe2593e42, 0x440101, 0x7fe2430bf000) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/malloc.go:826 +0x94 runtime.mallocgc.func1() /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/malloc.go:721 +0x46 runtime.systemstack(0x0) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/asm_amd64.s:409 +0x79 runtime.mstart() /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/proc.go:1175

goroutine 1 [running]: runtime.systemstack_switch() /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/asm_amd64.s:363 fp=0xc420045810 sp=0xc420045808 pc=0x44f6b0 runtime.mallocgc(0xe2593e42, 0x58c820, 0xc4226c6001, 0xc42009e000) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/malloc.go:720 +0x8a2 fp=0xc4200458b0 sp=0xc420045810 pc=0x40fd02 runtime.makeslice(0x58c820, 0xe2593e42, 0xe2593e42, 0x10, 0x10, 0x5f2540) /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/slice.go:61 +0x77 fp=0xc4200458e0 sp=0xc4200458b0 pc=0x43c307 github.com/xeals/signal-back/types.(BackupFile).Frame(0xc4200ee0e0, 0xc423b0fd60, 0x0, 0x0) /home/travis/gopath/src/github.com/xeals/signal-back/types/backup.go:116 +0x344 fp=0xc420045990 sp=0xc4200458e0 pc=0x55a454 github.com/xeals/signal-back/cmd.Raw(0xc4200ee0e0, 0x5f2960, 0x6f3e10, 0x0, 0x4) /home/travis/gopath/src/github.com/xeals/signal-back/cmd/format.go:207 +0x2f fp=0xc4200459e0 sp=0xc420045990 pc=0x56a5df github.com/xeals/signal-back/cmd.glob..func2(0xc42009c420, 0x0, 0xc42009c420) /home/travis/gopath/src/github.com/xeals/signal-back/cmd/check.go:36 +0x8e fp=0xc420045a38 sp=0xc4200459e0 pc=0x56b11e github.com/xeals/signal-back/vendor/github.com/urfave/cli.HandleAction(0x593a80, 0x5daed8, 0xc42009c420, 0xc420096100, 0x0) /home/travis/gopath/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/app.go:490 +0xc8 fp=0xc420045a60 sp=0xc420045a38 pc=0x4f44a8 github.com/xeals/signal-back/vendor/github.com/urfave/cli.Command.Run(0x5ceb08, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5d55c3, 0x20, 0x5da3c3, ...) /home/travis/gopath/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/command.go:210 +0xa36 fp=0xc420045cd0 sp=0xc420045a60 pc=0x4f5716 github.com/xeals/signal-back/vendor/github.com/urfave/cli.(App).Run(0xc4200981a0, 0xc42007e060, 0x3, 0x3, 0x0, 0x0) /home/travis/gopath/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/app.go:255 +0x6a0 fp=0xc420045ea8 sp=0xc420045cd0 pc=0x4f2830 main.main() /home/travis/gopath/src/github.com/xeals/signal-back/main.go:52 +0x317 fp=0xc420045f88 sp=0xc420045ea8 pc=0x56c637 runtime.main() /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/proc.go:198 +0x212 fp=0xc420045fe0 sp=0xc420045f88 pc=0x42a792 runtime.goexit() /home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420045fe8 sp=0xc420045fe0 pc=0x4520a1

mkrelle commented 5 years ago

Version 1.7.2 32-bit fixes the one byte XML output issue for me on Windows 7.

Command: signal-back_windows_386.exe format -f XML -o backup.xml -P pass.txt signal.backup

Billy4130 commented 5 years ago

I've ran this from version 1.06 and also 1.7.2 both now and still get a zero byte xml file...

Running Windows 10 x64.

Are you guys trying to run the x386 binary?

I downloaded the amd64 version of 1.7.2 and ran it, then manually entered my pass code (no text file) and it worked. The password prompt is shielded so you wont get cursor feedback or see what you're typing but it does accept input.

This solved it for me and now I have a full size xml file, and it ran without errors too :-)

paperhurts commented 5 years ago

Having same issue now, 0 KB files output. However, I see this:

image

EvanK commented 5 years ago

Seeing similar issue in Windows 10 x64. Tried the precompiled binary, and even compiling the latest few commits, with or without the password file/prompt. Consistently getting the same error:

error: failed to format output: consume [avatar]: can't read attachment of length 0

I guess this project has been abandoned?

TM818 commented 4 years ago

Seeing similar issue in Windows 10 x64. Tried the precompiled binary, and even compiling the latest few commits, with or without the password file/prompt. Consistently getting the same error:

error: failed to format output: consume [avatar]: can't read attachment of length 0

I guess this project has been abandoned?

I'm getting the same issue too, I'm trying everything. Tried two different backup files, double-checked the password, tried entering the password manually and with the password file, tried all 3 different output types (raw, XML, CSV), and I always get the

error: failed to format output: consume [avatar]: can't read attachment of length 0

error. It's a real problem, I need this output for legal issues. A shame this has been abandoned. I've tried this using build binaries on MacOS and Centos, I've tried using the prebuilt binary on Windows, same issue.

I'm guessing this utility is simply no longer compatible with new versions of Signal (I'm trying this in May of 2020).