unknownskl / greenlight

Greenlight is an open-source client for xCloud and Xbox home streaming made in Typescript.
MIT License
2.21k stars 124 forks source link

Steam Deck Spinning Green Circle #1049

Closed dougfultz closed 10 months ago

dougfultz commented 11 months ago

After authenticating with my Microsoft account, I am presented with a spinning green circle. It never seems to connect. I've verified my console settings and rebooted the Xbox console.

Screenshot_20231127_221848

I've used both the AppImage and flatpak with the same results.

Terminal output:

$ flatpak run dev.unknownskl.greenlight
total 904
drwxr-xr-x 2 nfsnobody nfsnobody   4096 Dec 31  1969 .
drwxr-xr-x 6 nfsnobody nfsnobody   4096 Nov 27 21:56 ..
-rwxr-xr-x 2 nfsnobody nfsnobody     26 Dec 31  1969 gvfs-trash
-rwxr-xr-x 2 nfsnobody nfsnobody  18712 Dec 31  1969 notify-send
-rwxr-xr-x 2 nfsnobody nfsnobody     69 Dec 31  1969 run.sh
-rwxr-xr-x 2 nfsnobody nfsnobody 532512 Dec 31  1969 zypak-helper
-rwxr-xr-x 2 nfsnobody nfsnobody 347752 Dec 31  1969 zypak-sandbox
lrwxrwxrwx 1 nfsnobody nfsnobody     25 Nov 27 21:56 zypak-wrapper -> /app/bin/zypak-wrapper.sh
-rwxr-xr-x 3 nfsnobody nfsnobody    370 Dec 31  1969 zypak-wrapper.sh
[4:1127/220943.233961:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
/app/main/resources/app.asar/app/background.js[constructor()] Starting Greenlight v2.0.0-beta15
Gtk-Message: 22:09:43.755: Failed to load module "canberra-gtk-module"
[4:1127/220943.812782:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[4:1127/220943.812835:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
$ ./Greenlight-2.0.0-beta15.AppImage 
/tmp/.mount_GreenlK1Yuhr/resources/app.asar/app/background.js[constructor()] Starting Greenlight v2.0.0-beta15
unknownskl commented 11 months ago

Thanks for the report. Can you run using DEBUG=greenlight* flatpak run dev.unknownskl.greenlight? That should output more information on the inner workings. Please be cautious when sharing this log to remove the tokens and such from the output.

dougfultz commented 11 months ago
$ DEBUG=greenlight* flatpak run dev.unknownskl.greenlight
total 904
drwxr-xr-x 2 nfsnobody nfsnobody   4096 Dec 31  1969 .
drwxr-xr-x 6 nfsnobody nfsnobody   4096 Nov 27 21:56 ..
-rwxr-xr-x 2 nfsnobody nfsnobody     26 Dec 31  1969 gvfs-trash
-rwxr-xr-x 2 nfsnobody nfsnobody  18712 Dec 31  1969 notify-send
-rwxr-xr-x 2 nfsnobody nfsnobody     69 Dec 31  1969 run.sh
-rwxr-xr-x 2 nfsnobody nfsnobody 532512 Dec 31  1969 zypak-helper
-rwxr-xr-x 2 nfsnobody nfsnobody 347752 Dec 31  1969 zypak-sandbox
lrwxrwxrwx 1 nfsnobody nfsnobody     25 Nov 27 21:56 zypak-wrapper -> /app/bin/zypak-wrapper.sh
-rwxr-xr-x 3 nfsnobody nfsnobody    370 Dec 31  1969 zypak-wrapper.sh
[4:1128/083620.777848:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
/app/main/resources/app.asar/app/background.js[constructor()] Starting Greenlight v2.0.0-beta15
2023-11-28T13:36:21.268Z greenlight:application /app/main/resources/app.asar/app/background.js[readStartupFlags()] Program args detected: [ '/app/main/greenlight' ]
2023-11-28T13:36:21.271Z greenlight:application /app/main/resources/app.asar/app/background.js[readStartupFlags()] End result of startupFlags: { fullscreen: false, autoStream: '' }
2023-11-28T13:36:21.272Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startSilentFlow()] Starting silent auth flow
2023-11-28T13:36:21.272Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startSilentFlow()] Found tokens in store: {
  token_type: 'bearer',
  expires_in: 86400,
  scope: 'service::user.auth.xboxlive.com::MBI_SSL',
  access_token: 'SNIP'
} {
  DeviceToken: 'SNIP',
  TitleToken: {
    DisplayClaims: { xti: [Object] },
    IssueInstant: '2023-11-28T02:40:19.473485Z',
    NotAfter: '2023-12-12T02:40:19.473485Z',
    Token: 'SNIP'
  },
  UserToken: {
    DisplayClaims: { xui: [Array] },
    IssueInstant: '2023-11-28T02:40:19.4593976Z',
    NotAfter: '2023-12-02T02:40:19.4593976Z',
    Token: 'SNIP'
  },
  AuthorizationToken: {
    DisplayClaims: { xui: [Array] },
    IssueInstant: '2023-11-28T02:40:19.6644126Z',
    NotAfter: '2023-11-28T18:40:19.6644126Z',
    Token: 'SNIP'
  },
  WebPage: 'https://sisu.xboxlive.com/client/v32/SNIP/view/index.html',
  Sandbox: 'RETAIL',
  UseModernGamertag: true,
  Flow: ''
}
2023-11-28T13:36:21.273Z greenlight:authentication /app/main/resources/app.asar/app/background.js[retrieveTokens()] Retrieving tokens...
Gtk-Message: 08:36:21.296: Failed to load module "canberra-gtk-module"
[4:1128/083621.353794:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[4:1128/083621.353833:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
2023-11-28T13:36:21.382Z greenlight:updater /app/main/resources/app.asar/app/background.js[checkForUpdates()] Running updater... true false
2023-11-28T13:36:21.383Z greenlight:updater /app/main/resources/app.asar/app/background.js[checkForUpdates()] Checking for updates on GitHub: https://api.github.com/repos/unknownskl/greenlight/releases
2023-11-28T13:36:21.391Z greenlight:electron /app/main/resources/app.asar/app/background.js[loadApplicationDefaults()] Electron has been fully loaded. Ready to open windows
2023-11-28T13:36:21.392Z greenlight:electron /app/main/resources/app.asar/app/background.js[openMainWindow()] Creating new main window
2023-11-28T13:36:21.421Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startWebviewHooks()] Setting up authentication hooks
2023-11-28T13:36:21.421Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startAuthflow()] Starting full authentication flow
2023-11-28T13:36:21.421Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startAuthflow()] Cancelling flow because we are already in an authentication process
2023-11-28T13:36:21.498Z greenlight:updater /app/main/resources/app.asar/app/background.js[checkForUpdates()] Application is newest version. Current version: 2.0.0-beta15 Newest version: v2.0.0-beta15
2023-11-28T13:36:21.678Z greenlight:Ipc:Recv Received event: [app] { id: 307, action: 'loadCachedUser', data: {} }
2023-11-28T13:36:21.680Z greenlight:Ipc:Send Sending event: [app] {
  id: 0,
  action: 'authState',
  data: {
    isAuthenticating: true,
    isAuthenticated: false,
    user: {
      signedIn: false,
      type: 'user',
      gamertag: '',
      gamerpic: '',
      gamerscore: '',
      level: 0
    }
  }
}
2023-11-28T13:36:21.680Z greenlight:Ipc:Send Sending event: [app] {
  action: 'loadCachedUser',
  id: 307,
  data: {
    signedIn: false,
    type: 'user',
    gamertag: '',
    gamerpic: '',
    gamerscore: '',
    level: 0
  }
}
2023-11-28T13:36:21.846Z greenlight:Ipc:Send Sending event: [app] {
  id: 0,
  action: 'authState',
  data: {
    isAuthenticating: true,
    isAuthenticated: false,
    user: {
      signedIn: false,
      type: 'user',
      gamertag: '',
      gamerpic: '',
      gamerscore: '',
      level: 0
    }
  }
}
2023-11-28T13:36:21.847Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxCloudToken()] Requesting xHome streaming tokens
2023-11-28T13:36:22.064Z greenlight:authentication /app/main/resources/app.asar/app/background.js[request()] Request error [403] {"code":"OfferingAccessDenied","statusCode":403,"message":""}
2023-11-28T13:36:22.064Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxCloudToken()] xCloud token retrieval error: {
  status: 403,
  body: '{"code":"OfferingAccessDenied","statusCode":403,"message":""}'
}
2023-11-28T13:36:22.065Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxCloudToken()] Requesting xHome streaming tokens
2023-11-28T13:36:22.317Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxCloudToken()] Retrieved xHome streaming tokens
2023-11-28T13:36:22.317Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxHomeToken()] Requesting xHome streaming tokens
2023-11-28T13:36:41.728Z greenlight:electron /app/main/resources/app.asar/app/background.js[openMainWindow()] Main windows has been closed
2023-11-28T13:36:41.740Z greenlight:electron /app/main/resources/app.asar/app/background.js[loadApplicationDefaults()] Electron detected that all windows are closed. Quitting app...
FatCache commented 11 months ago

I had the same issue @unknownskl I ran your project in debug mode to figure out what is going on. While it ran in debug mode, it eventually connected. I have no idea what caused it to connect.

Originalimoc commented 10 months ago

Why the 403 Forbidden? Xbox side settings wrong? My patched AMD (eg. Steam Deck) build is working really well though: https://github.com/unknownskl/greenlight/discussions/958#discussioncomment-7453293, but that's for hardware video decoding not connection issue, you better check if Xbox setting correct, can official Windows client or Android client connect?

FatCache commented 10 months ago

@Originalimoc I will give your client a try tonight. The SteamDeck version .. the prior release from current - does not connect at all. It is stuck in the spinning green circle.

Whereas official Xbox official app (pc/android) Client, and XBPlay connect instantly.

Do you know what I should keep an eye out when it's printing the logs in electron app console?

Originalimoc commented 10 months ago

Try logout and re-login

dougfultz commented 10 months ago

@Originalimoc I confirmed that I was able to remote play with the Xbox App on my Android phone. I do not have xCloud, so a 403 makes sense there.

I left the client sit for a while and captured some additional log message:

$ DEBUG=greenlight* flatpak run dev.unknownskl.greenlight
total 904
drwxr-xr-x 2 nfsnobody nfsnobody   4096 Dec 31  1969 .
drwxr-xr-x 6 nfsnobody nfsnobody   4096 Nov 27 21:56 ..
-rwxr-xr-x 2 nfsnobody nfsnobody     26 Dec 31  1969 gvfs-trash
-rwxr-xr-x 2 nfsnobody nfsnobody  18712 Dec 31  1969 notify-send
-rwxr-xr-x 2 nfsnobody nfsnobody     69 Dec 31  1969 run.sh
-rwxr-xr-x 2 nfsnobody nfsnobody 532512 Dec 31  1969 zypak-helper
-rwxr-xr-x 2 nfsnobody nfsnobody 347752 Dec 31  1969 zypak-sandbox
lrwxrwxrwx 1 nfsnobody nfsnobody     25 Nov 27 21:56 zypak-wrapper -> /app/bin/zypak-wrapper.sh
-rwxr-xr-x 3 nfsnobody nfsnobody    370 Dec 31  1969 zypak-wrapper.sh
[4:1130/210412.451538:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
/app/main/resources/app.asar/app/background.js[constructor()] Starting Greenlight v2.0.0-beta15
2023-12-01T02:04:12.941Z greenlight:application /app/main/resources/app.asar/app/background.js[readStartupFlags()] Program args detected: [ '/app/main/greenlight' ]
2023-12-01T02:04:12.943Z greenlight:application /app/main/resources/app.asar/app/background.js[readStartupFlags()] End result of startupFlags: { fullscreen: false, autoStream: '' }
2023-12-01T02:04:12.944Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startSilentFlow()] Starting silent auth flow
2023-12-01T02:04:12.944Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startSilentFlow()] Found tokens in store: {
  token_type: 'bearer',
  expires_in: 86400,
  scope: 'service::user.auth.xboxlive.com::MBI_SSL',
  access_token: 'SNIP',
  user_id: 'SNIP'
} {
  DeviceToken: 'SNIP',
  TitleToken: {
    DisplayClaims: { xti: [Object] },
    IssueInstant: '2023-11-28T02:40:19.473485Z',
    NotAfter: '2023-12-12T02:40:19.473485Z',
    Token: 'SNIP'
  },
  UserToken: {
    DisplayClaims: { xui: [Array] },
    IssueInstant: '2023-11-28T02:40:19.4593976Z',
    NotAfter: '2023-12-02T02:40:19.4593976Z',
    Token: 'SNIP'
  },
  AuthorizationToken: {
    DisplayClaims: { xui: [Array] },
    IssueInstant: '2023-11-28T02:40:19.6644126Z',
    NotAfter: '2023-11-28T18:40:19.6644126Z',
    Token: 'SNIP'
  },
  WebPage: 'https://sisu.xboxlive.com/client/v32/SNIP/view/index.html',
  Sandbox: 'RETAIL',
  UseModernGamertag: true,
  Flow: ''
}
2023-12-01T02:04:12.945Z greenlight:authentication /app/main/resources/app.asar/app/background.js[retrieveTokens()] Retrieving tokens...
Gtk-Message: 21:04:12.969: Failed to load module "canberra-gtk-module"
[4:1130/210413.025649:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[4:1130/210413.025724:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
2023-12-01T02:04:13.052Z greenlight:updater /app/main/resources/app.asar/app/background.js[checkForUpdates()] Running updater... true false
2023-12-01T02:04:13.053Z greenlight:updater /app/main/resources/app.asar/app/background.js[checkForUpdates()] Checking for updates on GitHub: https://api.github.com/repos/unknownskl/greenlight/releases
2023-12-01T02:04:13.059Z greenlight:electron /app/main/resources/app.asar/app/background.js[loadApplicationDefaults()] Electron has been fully loaded. Ready to open windows
2023-12-01T02:04:13.059Z greenlight:electron /app/main/resources/app.asar/app/background.js[openMainWindow()] Creating new main window
2023-12-01T02:04:13.088Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startWebviewHooks()] Setting up authentication hooks
2023-12-01T02:04:13.088Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startAuthflow()] Starting full authentication flow
2023-12-01T02:04:13.089Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startAuthflow()] Cancelling flow because we are already in an authentication process
2023-12-01T02:04:13.305Z greenlight:Ipc:Send Sending event: [app] {
  id: 0,
  action: 'authState',
  data: {
    isAuthenticating: true,
    isAuthenticated: false,
    user: {
      signedIn: false,
      type: 'user',
      gamertag: '',
      gamerpic: '',
      gamerscore: '',
      level: 0
    }
  }
}
2023-12-01T02:04:13.305Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxCloudToken()] Requesting xHome streaming tokens
2023-12-01T02:04:13.343Z greenlight:Ipc:Recv Received event: [app] { id: 108, action: 'loadCachedUser', data: {} }
2023-12-01T02:04:13.344Z greenlight:Ipc:Send Sending event: [app] {
  id: 0,
  action: 'authState',
  data: {
    isAuthenticating: true,
    isAuthenticated: false,
    user: {
      signedIn: false,
      type: 'user',
      gamertag: '',
      gamerpic: '',
      gamerscore: '',
      level: 0
    }
  }
}
2023-12-01T02:04:13.345Z greenlight:Ipc:Send Sending event: [app] {
  action: 'loadCachedUser',
  id: 108,
  data: {
    signedIn: false,
    type: 'user',
    gamertag: '',
    gamerpic: '',
    gamerscore: '',
    level: 0
  }
}
2023-12-01T02:04:13.606Z greenlight:authentication /app/main/resources/app.asar/app/background.js[request()] Request error [403] {"code":"OfferingAccessDenied","statusCode":403,"message":""}
2023-12-01T02:04:13.606Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxCloudToken()] xCloud token retrieval error: {
  status: 403,
  body: '{"code":"OfferingAccessDenied","statusCode":403,"message":""}'
}
2023-12-01T02:04:13.606Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxCloudToken()] Requesting xHome streaming tokens
2023-12-01T02:04:13.621Z greenlight:updater /app/main/resources/app.asar/app/background.js[checkForUpdates()] Application is newest version. Current version: 2.0.0-beta15 Newest version: v2.0.0-beta15
2023-12-01T02:04:13.890Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxCloudToken()] Retrieved xHome streaming tokens
2023-12-01T02:04:13.891Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxHomeToken()] Requesting xHome streaming tokens
2023-12-01T02:06:23.070Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxHomeToken()] xHome token retrieval error: {
  error: Error: connect ETIMEDOUT 2620:1ec:bdf::40:443
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
    errno: -110,
    code: 'ETIMEDOUT',
    syscall: 'connect',
    address: '2620:1ec:bdf::40',
    port: 443
  }
}
2023-12-01T02:06:23.072Z greenlight:authentication /app/main/resources/app.asar/app/background.js[retrieveTokens()] Failed to retrieve tokens
2023-12-01T02:07:18.553Z greenlight:electron /app/main/resources/app.asar/app/background.js[openMainWindow()] Main windows has been closed
2023-12-01T02:07:18.563Z greenlight:electron /app/main/resources/app.asar/app/background.js[loadApplicationDefaults()] Electron detected that all windows are closed. Quitting app...

When you say Try logout and re-login can you provide instructions for that? The window does not have any options on it and I'm unsure where the auth tokens are stored so I can't delete them either.

Originalimoc commented 10 months ago

"ETIMEDOUT 2620:1ec:bdf::40:443", you can not connect to MS, disable ipv6 try again?

FatCache commented 10 months ago

When you say Try logout and re-login can you provide instructions for that? The window does not have any options on it and I'm unsure where the auth tokens are stored so I can't delete them either

Click on 'Setting' in the top nav bar and you should see 'Logout User' in the first panel/box - right below 'Current User'

Originalimoc commented 10 months ago

@FatCache No it seems the home page is not even present at this point 😂

arikardo commented 10 months ago

I have been having this exact same issue since the beginning of October. When I first got my SD in September, Greenlight was working flawlessly. One day while streaming it disconnected and I have had the endlessly spinning circle ever since. I can connect to my Xbox just fine with the official IOS app.

Originalimoc commented 10 months ago

@arikardo Try this build https://github.com/Originalimoc/greenlight/releases/tag/v2.0.0-beta15-AMD-3, uninstall first to clear data. Launch it in game mode from a script(create the script file then add the file to steam): https://github.com/unknownskl/greenlight/pull/1055/commits/31be90277075048d979f40586d0dc20d74dd6376 If video is blocky, set resolution to 1920x1080 in Steam UI(at also where executable file(the script) is set) then map a back button to F11 to "fullscreen" it.

FatCache commented 10 months ago

@arikardo Try this build https://github.com/Originalimoc/greenlight/releases/tag/v2.0.0-beta15-AMD-3, uninstall first to clear data. Launch it in game mode from a script(create the script file then add the file to steam): 31be902 If video is blocky, set resolution to 1920x1080 in Steam UI(at also where executable file(the script) is set) then map a back button to F11 to "fullscreen" it.

I tried your version on SD OLED. First off, the authentication works but attempting to Stream Xbox, this gets thrown:

Streammanager - state: {
  state: 'Failed',
  detailedSessionState: 0,
  errorDetails: {
    code: 'AgentCommandError',
    message: 'Agent : -2147019873 : Timed out waiting for Cloud Streaming Service to be ready. : State ServerStartStreamingV2CommandSent'
  }
}
Warning: terminator_CreateInstance: Failed to CreateInstance in ICD 2.  Skipping ICD.

A bit odd it says, 'Cloud Streaming' when this is Remote Desktop.

Secondly, why do we need the command script you pointed out to run this. My understanding is .AppImage handles this for us. All we need to append in the Steam is the command --fullscreen.

Originalimoc commented 10 months ago

Hard reboot your Xbox. The launch script is for flatpak version and enable hardware video decoding on AMD GPU.On Dec 2, 2023 10:20 AM, Abdusamed @.***> wrote:

@arikardo Try this build https://github.com/Originalimoc/greenlight/releases/tag/v2.0.0-beta15-AMD-3, uninstall first to clear data. Launch it in game mode from a script(create the script file then add the file to steam): 31be902 If video is blocky, set resolution to 1920x1080 in Steam UI(at also where executable file(the script) is set) then map a back button to F11 to "fullscreen" it.

I tried your version on SD OLED. First off, the authentication works but attempting to Stream Xbox, this gets thrown: Streammanager - state: { state: 'Failed', detailedSessionState: 0, errorDetails: { code: 'AgentCommandError', message: 'Agent : -2147019873 : Timed out waiting for Cloud Streaming Service to be ready. : State ServerStartStreamingV2CommandSent' } } Warning: terminator_CreateInstance: Failed to CreateInstance in ICD 2. Skipping ICD.

A bit odd it says, 'Cloud Streaming' when this is Remote Desktop. Secondly, why do we need the command script you pointed out to run this. My understanding is .AppImage handles this for us. All we need to append in the Steam is the command --fullscreen.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

arikardo commented 10 months ago

@arikardo Try this build https://github.com/Originalimoc/greenlight/releases/tag/v2.0.0-beta15-AMD-3, uninstall first to clear data. Launch it in game mode from a script(create the script file then add the file to steam): 31be902 If video is blocky, set resolution to 1920x1080 in Steam UI(at also where executable file(the script) is set) then map a back button to F11 to "fullscreen" it.

I tried this and still have the same issue.

Originalimoc commented 10 months ago

Tried disable ipv6?

dougfultz commented 10 months ago

@Originalimoc I disabled IPv6 and was able to get to a screen to login or clear data, but login kept prompting me to login to xCloud, which I don't have. I cleared the data and logged into my Microsoft account again and I'm back to the same spot.

After waiting 15 minutes, I'm no longer getting a message that the connection timed out, but I'm still stuck on the spinning circle.

$ DEBUG=greenlight* flatpak run dev.unknownskl.greenlight
total 904
drwxr-xr-x 2 nfsnobody nfsnobody   4096 Dec 31  1969 .
drwxr-xr-x 6 nfsnobody nfsnobody   4096 Nov 27 21:56 ..
-rwxr-xr-x 2 nfsnobody nfsnobody     26 Dec 31  1969 gvfs-trash
-rwxr-xr-x 2 nfsnobody nfsnobody  18712 Dec 31  1969 notify-send
-rwxr-xr-x 2 nfsnobody nfsnobody     69 Dec 31  1969 run.sh
-rwxr-xr-x 2 nfsnobody nfsnobody 532512 Dec 31  1969 zypak-helper
-rwxr-xr-x 2 nfsnobody nfsnobody 347752 Dec 31  1969 zypak-sandbox
lrwxrwxrwx 1 nfsnobody nfsnobody     25 Nov 27 21:56 zypak-wrapper -> /app/bin/zypak-wrapper.sh
-rwxr-xr-x 3 nfsnobody nfsnobody    370 Dec 31  1969 zypak-wrapper.sh
[4:1202/132946.761203:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
/app/main/resources/app.asar/app/background.js[constructor()] Starting Greenlight v2.0.0-beta15
2023-12-02T18:29:47.256Z greenlight:application /app/main/resources/app.asar/app/background.js[readStartupFlags()] Program args detected: [ '/app/main/greenlight' ]
2023-12-02T18:29:47.258Z greenlight:application /app/main/resources/app.asar/app/background.js[readStartupFlags()] End result of startupFlags: { fullscreen: false, autoStream: '' }
2023-12-02T18:29:47.259Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startSilentFlow()] Starting silent auth flow
2023-12-02T18:29:47.260Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startSilentFlow()] No tokens present on device. We need to start the login flow
Gtk-Message: 13:29:47.264: Failed to load module "canberra-gtk-module"
[4:1202/132947.318576:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[4:1202/132947.318627:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
2023-12-02T18:29:47.344Z greenlight:updater /app/main/resources/app.asar/app/background.js[checkForUpdates()] Running updater... true false
2023-12-02T18:29:47.345Z greenlight:updater /app/main/resources/app.asar/app/background.js[checkForUpdates()] Checking for updates on GitHub: https://api.github.com/repos/unknownskl/greenlight/releases
2023-12-02T18:29:47.365Z greenlight:electron /app/main/resources/app.asar/app/background.js[loadApplicationDefaults()] Electron has been fully loaded. Ready to open windows
2023-12-02T18:29:47.365Z greenlight:electron /app/main/resources/app.asar/app/background.js[openMainWindow()] Creating new main window
2023-12-02T18:29:47.393Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startWebviewHooks()] Setting up authentication hooks
2023-12-02T18:29:47.394Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startAuthflow()] Starting full authentication flow
2023-12-02T18:29:47.631Z greenlight:Ipc:Recv Received event: [app] { id: 890, action: 'loadCachedUser', data: {} }
2023-12-02T18:29:47.632Z greenlight:Ipc:Send Sending event: [app] {
  id: 0,
  action: 'authState',
  data: {
    isAuthenticating: false,
    isAuthenticated: false,
    user: {
      signedIn: false,
      type: 'user',
      gamertag: '',
      gamerpic: '',
      gamerscore: '',
      level: 0
    }
  }
}
2023-12-02T18:29:47.633Z greenlight:Ipc:Send Sending event: [app] {
  action: 'loadCachedUser',
  id: 890,
  data: {
    signedIn: false,
    type: 'user',
    gamertag: '',
    gamerpic: '',
    gamerscore: '',
    level: 0
  }
}
2023-12-02T18:29:47.904Z greenlight:updater /app/main/resources/app.asar/app/background.js[checkForUpdates()] Application is newest version. Current version: 2.0.0-beta15 Newest version: v2.0.0-beta15
2023-12-02T18:29:47.935Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startAuthflow()] get_device_token() returned: {
  IssueInstant: '2023-12-02T18:29:47.9231562Z',
  NotAfter: '2023-12-16T18:29:47.9231562Z',
  Token: 'SNIP',
  DisplayClaims: { xdi: { did: 'SNIP', dcs: '0' } }
}
2023-12-02T18:29:48.021Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startAuthflow()] do_sisu_authentication() returned: {
  IssueInstant: '2023-12-02T18:29:47.9231562Z',
  NotAfter: '2023-12-16T18:29:47.9231562Z',
  Token: 'SNIP',
  DisplayClaims: { xdi: { did: 'SNIP', dcs: '0' } }
}
2023-12-02T18:30:17.674Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startWebviewHooks()] Got response: ms-xal-000000004c20a908://auth/?code=SNIP
2023-12-02T18:30:17.677Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startWebviewHooks()] Login success! Retrieved code and state: SNIP
2023-12-02T18:30:18.771Z greenlight:authentication /app/main/resources/app.asar/app/background.js[startWebviewHooks()] Retrieved sisu tokens: {
  DeviceToken: 'SNIP',
  TitleToken: {
    DisplayClaims: { xti: [Object] },
    IssueInstant: '2023-12-02T18:30:18.5385228Z',
    NotAfter: '2023-12-16T18:30:18.5385228Z',
    Token: 'SNIP'
  },
  UserToken: {
    DisplayClaims: { xui: [Array] },
    IssueInstant: '2023-12-02T18:30:18.5374857Z',
    NotAfter: '2023-12-06T18:30:18.5374857Z',
    Token: 'SNIP'
  },
  AuthorizationToken: {
    DisplayClaims: { xui: [Array] },
    IssueInstant: '2023-12-02T18:30:18.6581736Z',
    NotAfter: '2023-12-03T10:30:18.6581736Z',
    Token: 'SNIP'
  },
  WebPage: 'https://sisu.xboxlive.com/client/v32/SNIP/view/index.html',
  Sandbox: 'RETAIL',
  UseModernGamertag: true,
  Flow: ''
}
2023-12-02T18:30:18.778Z greenlight:authentication /app/main/resources/app.asar/app/background.js[openAuthWindow()] Closed auth window
2023-12-02T18:30:18.779Z greenlight:authentication /app/main/resources/app.asar/app/background.js[retrieveTokens()] Retrieving tokens...
2023-12-02T18:30:20.421Z greenlight:Ipc:Send Sending event: [app] {
  id: 0,
  action: 'authState',
  data: {
    isAuthenticating: true,
    isAuthenticated: false,
    user: {
      signedIn: false,
      type: 'user',
      gamertag: '',
      gamerpic: '',
      gamerscore: '',
      level: 0
    }
  }
}
2023-12-02T18:30:20.422Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxCloudToken()] Requesting xHome streaming tokens
2023-12-02T18:30:20.933Z greenlight:authentication /app/main/resources/app.asar/app/background.js[request()] Request error [403] {"code":"OfferingAccessDenied","statusCode":403,"message":""}
2023-12-02T18:30:20.934Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxCloudToken()] xCloud token retrieval error: {
  status: 403,
  body: '{"code":"OfferingAccessDenied","statusCode":403,"message":""}'
}
2023-12-02T18:30:20.934Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxCloudToken()] Requesting xHome streaming tokens
2023-12-02T18:30:21.292Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxCloudToken()] Retrieved xHome streaming tokens
2023-12-02T18:30:21.292Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxHomeToken()] Requesting xHome streaming tokens
2023-12-02T18:30:21.908Z greenlight:authentication /app/main/resources/app.asar/app/background.js[requestxHomeToken()] Retrieved xHome streaming tokens
2023-12-02T18:30:22.818Z greenlight:authentication /app/main/resources/app.asar/app/background.js[retrieveTokens()] Failed to retrieve tokens
2023-12-02T18:46:57.693Z greenlight:electron /app/main/resources/app.asar/app/background.js[openMainWindow()] Main windows has been closed
2023-12-02T18:46:57.711Z greenlight:electron /app/main/resources/app.asar/app/background.js[loadApplicationDefaults()] Electron detected that all windows are closed. Quitting app...

Digging into the package this line is the last log line that gets printed before I get stuck.

FatCache commented 10 months ago

Hard reboot your Xbox. The launch script is for flatpak version and enable hardware video decoding on AMD GPU.

Thanks. TBH, I did not reboot Xbox Series X at all and it connected on first try after are reinstall on the SD OLED.

My gut feeling tells me there is something missing in the authentication to start the stream. I am not sure if you noticed but if you used the official Xbox Remote App on Windows or Android, it connects the first always - in my experience.

The initial authentication is flawless, its the one to start the remote Xbox experience.

FatCache commented 10 months ago

Tried disable ipv6?

I used your version of the app today and I am not sure if its placebo but the video stream is so crystal clear! I did not see any blockyness at all! Did the MESA driver or AMD Hardware decoding meant to have such a drastic change in the visual quality?

One thing is, maybe due to the sharpness, the text looks very 'thin', it is readable but maybe the increase sharpness has some impact on the text. Regardless, the video looks very native on SD

Originalimoc commented 10 months ago

@FatCache I guess it's because the downscaling filter is not linear, but nearest neighbor. To use linear filter set game resolution in steam ui to 1920x1080 then F11 to "fullscreen" it. @dougfultz I've never seen an "xCloud" prompt, any ideas? @unknownskl

unknownskl commented 10 months ago

@dougfultz Can you double check if the time is synced with the internet? I noticed that the xal implementation is very picky about the time to generate the proper signature for authentication. Edit: Actually it is able to retrieve the tokens. Do you have gamepass enabled on your account or do you only use the remote home streaming function?

@Originalimoc I probably know what is mentioned here. Some games supports scaling on the in-game ui and currently we send over the full resolution of the stream instead of the current display resolution. The resolution is set here: https://github.com/unknownskl/xbox-xcloud-player/blob/main/src/Channel/Message.ts#L52 Will dive into it soon.

dougfultz commented 10 months ago

@unknownskl none of the commands I found to sync the hardware clock seemed to find the clock. Strange. But through some other magic it seems that I got past the spinning green circle and it started working. It's unclear what did it. So I'm fine closing this issue as transient. Thanks for the help!