5

I'm running CentOS 7 in a Google Compute Engine VM, and trying to connect to it via Chrome Remote Desktop. When I run the start-host command, it fails with "OAuth error" and no more information.

I accessed the https://remotedesktop.google.com/headless site with Chrome, filled out the choices, and went through the authorization phase. There was not an option for CentOS, so I chose "Debian" and when it gave me the connect command, I replaced the path to start-host with the CentOS one of /usr/lib64/chrome-remote-desktop/start-host, and running the resulting command fails.

I did the likely web searches and found some fairly old and unhelpful information, but nothing useful.

If I can't get Chrome Remote Desktop working, I'd be willing to try another method to run GUI-based applications (in this case, IBM's oneWEX). I can get X11 to sort-of work remotely, but not well enough to run oneWEX.

This is the command I got from the Chrome site, modified to work with CentOS:

DISPLAY= /usr/lib64/chrome-remote-desktop/start-host --code="<code>" --redirect-url="https://remotedesktop.google.com/_/oauthredirect" --name=

The start-host command asked the expected questions of the computer name and PIN, then gave the error:

Couldn't start host: OAuth error.
John Rehwinkel
  • 61
  • 1
  • 1
  • 4
  • Having same problem... did you manage to solve it? In my case I have a debian but perhaps your fix would address my issue as well. – Valentin Ruano Nov 08 '19 at 16:01
  • Never did solve it, ended up switching to TigerVNC. – John Rehwinkel Nov 11 '19 at 13:52
  • In the end it work for me although I cannot tell how I (or rather it) did it. restarted the host didn't change anything but at some point latter I re-submit the registration of the host in the chrome-remote desktop webservice and this time it worked. Not sure if this is a chrome-remote-desktop server issue or a X / virtual display set up issue. – Valentin Ruano Nov 11 '19 at 18:59

4 Answers4

12

When you get the code from https://remotedesktop.google.com/headless it is only good for a few minutes, and only one time use. Just go back to https://remotedesktop.google.com/headless follow the prompts and get a new code for every attempt.

In my case, I got another error when I first ran the command. I tried to resolve it, and reran the same command (with the original code). I kept getting the "Couldn't start host: OAuth error." until I figured out I needed to get a new code from https://remotedesktop.google.com/headless for each attempt.

FYI: The error message is not given right away, but after entering the computer name and double entering the pin.

JavaMan07
  • 121
  • 1
  • 5
  • I can confirm this answer. If you mess up entering the PIN, you will need to start over with a new authorization command. – tdensmore Aug 26 '22 at 13:08
3

According to https://bugs.chromium.org/p/chromium/issues/detail?id=1039016, this could apparently also happen if the /usr/lib64/chrome-remote-desktop/start-host binary is not one from the "official" DEBian package built and distributed by Google, but one built from source e.g. by yourself or your Linux distribution (such as the chrome-remote-desktop package built by Fedora; https://bugzilla.redhat.com/show_bug.cgi?id=1788448 aims to clarify how to use that one).

vorburger
  • 3,439
  • 32
  • 38
0

What I can see here is that you previously added some libraries to your CentOS instance, I tried replicating the error myself and inside my CentOS 7 instance (from Compute Engine) I don't seem to have any /usr/lib64/chrome-remote-desktop/ folder.

Or is it from your local machine?

Fran Zama
  • 106
  • 3
  • Previously I had done "sudo yum install chrome-remote-desktop" to install the host software. – John Rehwinkel Sep 16 '19 at 13:22
  • As the Chrome Remote Desktop indicates, there is only chance to use either Windows or Debian Linux, but you could try having a look at the following link: https://askubuntu.com/questions/795703/chrome-remote-desktop-access-to-headless-ubuntu-server-16-04-machine – Fran Zama Sep 20 '19 at 19:58
-1

I had the same error and found that refreshing the headless page to get a new code string in the command worked.

J C
  • 1