2

Everytime I start chromium on debian 9, I get the following syslog error, which is very annoying:

ERROR:browser_dm_token_storage_linux.cc(93)] \
    Error: /etc/machine-id contains 32 characters (32 were expected).

The message makes no sense to me as my /etc/machine contains 32 random characters as it should. But maybe someone knows why this happens?

manifestor
  • 2,423
  • 6
  • 22
  • 47
  • Did you look to actually find out what `/etc/machine-id` contains? Answerers have no access to your machine and cannot look for you, and are not telepathic so cannot reach into your mind to find out something that you know that you have not [edit]ed into the question. – JdeBP Oct 23 '18 at 07:10
  • @JdeBP - yeah, very smart. You don't need to be "telepathic", as the error message already implies, that my machine-id contains 32 characters. Anyway, I edited my question, thanks for your hint. – manifestor Oct 23 '18 at 08:12
  • 4
    Actually, answerers still do have to be telepathic, because the error message is known to be wrong and _you still have not_ shown them in the question what is in the file. Your description of what it _should_ contain is erroneous. Show answerers a hexdump of the file. Do not hand-wave an erroneous description of what it contains, because that just muddies the waters and requires _more_ telepathy. – JdeBP Oct 23 '18 at 08:18
  • 3
    FWIW, `od -c /etc/machine-id`'s output might be useful, to verify it doesn't contain some extra non-printing characters or similar. – muru Oct 23 '18 at 08:41

1 Answers1

6

There was a mistake in the logging code, which printed machine_id_size instead of the size of input read. That's why it says 32 both times. Since the mistake has been fixed, a more sensible message can be expected in a future release.

It's likely caused by some error in reading /etc/machine-id. If /etc/machine-id doesn't exist, try looking for /var/lib/dbus/machine-id or /var/db/dbus/machine-id. If one of those exists, move it to /etc/machine-id and make it a symlink to /etc/machine-id. (See JdeBP's answer for more.)

Sources:

muru
  • 69,900
  • 13
  • 192
  • 292
  • 1
    It's important to make that symbolic link that way around and not the other. https://unix.stackexchange.com/a/395460/5132 https://unix.stackexchange.com/a/396053/5132 – JdeBP Oct 23 '18 at 08:05
  • As the error message implies: I truly do have a machine ID, which contains 32 characters. – manifestor Oct 23 '18 at 08:15
  • @chevallier and you're sure your version of chromium doesn't have the buggy logging code? – muru Oct 23 '18 at 08:17
  • 1
    Can someone please explain how this is the answer to the question? @chevallier says that his `/etc/machine-id` is not empty and his Chromium install is up to date. This reply only seems to address cases where those conditions are not met. I seem to be having the same issue. I'm using google-chrome-stable (71.0.3578.98-1), instead of of chromium, though, so I'm not sure how to check if the fix that @muru mentions has been fixed. FYI 0000000 3 4 8 e a 5 f a a 5 d 1 9 6 b 7 0000020 5 c b d 2 3 2 1 5 9 1 c b 6 a d 0000040 \n – carpiediem Dec 19 '18 at 08:19
  • @carpiediem that doesn't seem to be valid. Two nonprinting characters in it. See JdeBP's answer on how to generate a valid one. – muru Dec 19 '18 at 09:08
  • Two characters meaning the linebreak at the end? Isn't `\n` just one? In any case, I'm no longer seeing the error (despite not changing or linking the file myself), so I'm not sure what changed. – carpiediem Dec 19 '18 at 09:19
  • That said, I am still getting an error; it just doesn't mention /etc/machine-id anymore. I'll try JdeBP's method to see if it helps. Here's the error I'm getting now, if you have any insights: https://stackoverflow.com/questions/53847644/puppeteer-on-aws-ec2-ubuntu-with-google-chrome-stable – carpiediem Dec 19 '18 at 09:21