Snap not working in terminal on Ubuntu 17.10

I get this error:

# snap --version
2017/10/25 12:41:03.424311 main.go:136: PANIC argument "ack"'s "forutsetningsfil>" should have <>s
panic: argument "ack"'s "forutsetningsfil>" should have <>s [recovered]
	panic: argument "ack"'s "forutsetningsfil>" should have <>s

goroutine 1 [running]:
main.main.func1()
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:287 +0x73
panic(0x55ecf7e34d20, 0xc42018d3b0)
	/usr/lib/go-1.8/src/runtime/panic.go:489 +0x2d3
github.com/snapcore/snapd/logger.Panicf(0x55ecf7b4330a, 0x20, 0xc42011fa90, 0x2, 0x2)
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/logger/logger.go:66 +0x171
main.lintArg(0x55ecf7b309d0, 0x3, 0xc42008d460, 0x11, 0xc4200ca340, 0x10, 0x0, 0x0)
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:136 +0x19b
main.Parser(0x55ecf76ded60)
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:206 +0x988
main.run(0xc400000000, 0x55ecf7ef02a0)
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:307 +0x2b
main.main()
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:292 +0x16f

I googled another have the same error: https://askubuntu.com/questions/926468/some-problem-using-snap (but no solution).

I’ve got som help trying to solve this by the good people at Hiri which sugested we report the problem. Hope this si the right place.

i have tried rebooting the computer, and run:

sudo apt install --reinstall snapd
with no luck.

I also had this error before upgrading from 17.04 to 17.10, but before upgrade I was able to start Hiri from Software Center which is not the case anymore.

I believe this is being caused by a broken translation file. Can you please let us know what your locale command outputs, and then try to run the command as:

$ LC_ALL=C snap --version

Thanks for quick reply! :slight_smile:

# locale
LANG=nb_NO.UTF-8
LANGUAGE=nb_NO:nb:no_NO:no:nn_NO:nn:en
LC_CTYPE="nb_NO.UTF-8"
LC_NUMERIC="nb_NO.UTF-8"
LC_TIME="nb_NO.UTF-8"
LC_COLLATE="nb_NO.UTF-8"
LC_MONETARY="nb_NO.UTF-8"
LC_MESSAGES="nb_NO.UTF-8"
LC_PAPER="nb_NO.UTF-8"
LC_NAME="nb_NO.UTF-8"
LC_ADDRESS="nb_NO.UTF-8"
LC_TELEPHONE="nb_NO.UTF-8"
LC_MEASUREMENT="nb_NO.UTF-8"
LC_IDENTIFICATION="nb_NO.UTF-8"
LC_ALL=

~ ❯❯❯ LC_ALL=C snap --version                                                                                           ⏎
2017/10/25 13:01:14.419690 main.go:136: PANIC argument "ack"'s "forutsetningsfil>" should have <>s
panic: argument "ack"'s "forutsetningsfil>" should have <>s [recovered]
	panic: argument "ack"'s "forutsetningsfil>" should have <>s

goroutine 1 [running]:
main.main.func1()
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:287 +0x73
panic(0x55e9471c4d20, 0xc42017f4e0)
	/usr/lib/go-1.8/src/runtime/panic.go:489 +0x2d3
github.com/snapcore/snapd/logger.Panicf(0x55e946ed330a, 0x20, 0xc420119a90, 0x2, 0x2)
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/logger/logger.go:66 +0x171
main.lintArg(0x55e946ec09d0, 0x3, 0xc42000d900, 0x11, 0xc4200c4470, 0x10, 0x0, 0x0)
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:136 +0x19b
main.Parser(0x55e946a6ed60)
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:206 +0x988
main.run(0xc400000000, 0x55e9472802a0)
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:307 +0x2b
main.main()
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:292 +0x16f

i think that should be

$ LC_ALL=C.UTF-8 snap --version

which is the default fallback nowadays …

Still no luck

~ ❯❯❯ LC_ALL=C.UTF-8 snap --version                                                                                     ⏎
    2017/10/25 13:08:46.807413 main.go:136: PANIC argument "ack"'s "forutsetningsfil>" should have <>s
    panic: argument "ack"'s "forutsetningsfil>" should have <>s [recovered]
    	panic: argument "ack"'s "forutsetningsfil>" should have <>s

goroutine 1 [running]:
main.main.func1()
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:287 +0x73
panic(0x55dc94142d20, 0xc420171500)
	/usr/lib/go-1.8/src/runtime/panic.go:489 +0x2d3
github.com/snapcore/snapd/logger.Panicf(0x55dc93e5130a, 0x20, 0xc42010ba90, 0x2, 0x2)
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/logger/logger.go:66 +0x171
main.lintArg(0x55dc93e3e9d0, 0x3, 0xc42000d900, 0x11, 0xc4200b6480, 0x10, 0x0, 0x0)
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:136 +0x19b
main.Parser(0x55dc939ecd60)
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:206 +0x988
main.run(0xc400000000, 0x55dc941fe2a0)
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:307 +0x2b
main.main()
	/build/snapd-Swa7kC/snapd-2.28.5+17.10/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:292 +0x16f

Please try to reset the LANG and LANGUAGE variables as well:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
snap --version

Which platform is this? Is this in stock Ubuntu 17.10?

Sorry for the trouble there.

Thanks! That fix’ed it!

This was stock Ubuntu 17.10 yes.

~ ❯❯❯ lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3 Processor DRAM Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3 Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:16.3 Serial controller: Intel Corporation 8 Series/C220 Series Chipset Family KT Controller (rev 04)
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 05)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation C226 Series Chipset Family Server Advanced SKU LPC Controller (rev 05)
00:1f.2 RAID bus controller: Intel Corporation SATA Controller [RAID mode] (rev 05)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
1 Like

This is a known issue that is addressed by https://github.com/snapcore/snapd/pull/4050 by the way.

As a rather nasty workaround to unblock you, you could remove or rename /usr/share/locale-langpack/nb/LC_MESSAGES/snappy.mo.

1 Like