Snap logs does not show the logs even though they are in journalctl?

Hello everyone! I hope you’re all doing fine in these strange times.

I am trying to make a snap for a server app (written in Kotlin/JVM). So far, everything is working properly, but snap logs does not show the logs, even though they can be found by using journalctl -xe.

Here, I am trying to find the logs for the epilink.epilink app (the snap I am building being named epilink), but nothing shows up when using sudo snap logs epilink or sudo snap logs epilink.epilink

matthieu@jirachi:~/EpiLink$ journalctl -xe
avril 23 16:00:36 jirachi epilink.epilink[29043]: 2020-04-23 16:00:36.884 WARN  epilink.main - No privacy policy provided. Please provide one using the 'legal' part of the
avril 23 16:00:36 jirachi epilink.epilink[29043]: 2020-04-23 16:00:36.884 WARN  epilink.main - No identity prompt text provided. Please provide one using the 'legal' part 
avril 23 16:00:36 jirachi epilink.epilink[29043]: 2020-04-23 16:00:36.903 INFO  epilink.main - Environment created, starting My Tasty Instance
avril 23 16:00:37 jirachi epilink.epilink[29043]: 2020-04-23 16:00:37.823 INFO  io.lettuce.core.EpollProvider - Starting with epoll library
avril 23 16:00:37 jirachi epilink.epilink[29043]: 2020-04-23 16:00:37.825 INFO  io.lettuce.core.KqueueProvider - Starting without optional kqueue library
avril 23 16:00:38 jirachi epilink.epilink[29043]: 2020-04-23 16:00:38.899 INFO  epilink.bot.discord4j - Discord bot launched, invite link: https://discordapp.com/api/oauth
avril 23 16:00:38 jirachi epilink.epilink[29043]: 2020-04-23 16:00:38.954 INFO  epilink.http - Bundled front-end will be served. To disable that, set a front-end URL in th
avril 23 16:00:38 jirachi epilink.epilink[29043]: 2020-04-23 16:00:38.954 INFO  ktor.application - No ktor.deployment.watch patterns specified, automatic reload is not act
avril 23 16:00:39 jirachi epilink.epilink[29043]: 2020-04-23 16:00:39.031 INFO  ktor.application - Responding at http://0.0.0.0:8080
avril 23 16:00:39 jirachi sudo[29132]: matthieu : TTY=pts/0 ; PWD=/home/matthieu/EpiLink ; USER=root ; COMMAND=/usr/bin/snap logs epilink
avril 23 16:00:39 jirachi sudo[29132]: pam_unix(sudo:session): session opened for user root by (uid=0)
avril 23 16:00:39 jirachi snapd[9473]: response.go:365: cannot stream response; problem reading: json: cannot unmarshal array into Go value of type string
avril 23 16:00:39 jirachi sudo[29132]: pam_unix(sudo:session): session closed for user root
matthieu@jirachi:~/EpiLink$ sudo snap logs epilink.epilink
matthieu@jirachi:~/EpiLink$ sudo snap logs epilink

One thing to note is that this snap also includes a Redis server, but it looks like sudo snap logs is working correctly for these ones.

matthieu@jirachi:~/EpiLink$ sudo snap logs epilink.redis-server
2020-04-23T14:00:21Z epilink.redis-server[28951]:  |    `-._`-._        _.-'_.-'    |
2020-04-23T14:00:21Z epilink.redis-server[28951]:   `-._    `-._`-.__.-'_.-'    _.-'
2020-04-23T14:00:21Z epilink.redis-server[28951]:       `-._    `-.__.-'    _.-'
2020-04-23T14:00:21Z epilink.redis-server[28951]:           `-._        _.-'
2020-04-23T14:00:21Z epilink.redis-server[28951]:               `-.__.-'
2020-04-23T14:00:21Z epilink.redis-server[28951]: 28951:M 23 Apr 2020 16:00:21.978 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
2020-04-23T14:00:21Z epilink.redis-server[28951]: 28951:M 23 Apr 2020 16:00:21.978 # Server initialized
2020-04-23T14:00:21Z epilink.redis-server[28951]: 28951:M 23 Apr 2020 16:00:21.978 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
2020-04-23T14:00:21Z epilink.redis-server[28951]: 28951:M 23 Apr 2020 16:00:21.978 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
2020-04-23T14:00:21Z epilink.redis-server[28951]: 28951:M 23 Apr 2020 16:00:21.978 * Ready to accept connections

Any ideas? I am pretty sure the line

avril 23 16:00:39 jirachi snapd[9473]: response.go:365: cannot stream response; problem reading: json: cannot unmarshal array into Go value of type string

may indicate something, but I have no idea of what it’s referring to.

Hi, this looks like a bug you have found. Could you file a bug about this on bugs.launchpad.net/snapd ? When you do so, can you include the output snap version on your system?

Thanks