unknownskl / greenlight

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

Beta 10 - stuck on "we are getrting your stream ready" #896

Open trebs24 opened 1 year ago

trebs24 commented 1 year ago

Updated to 10, was on 2 until I had other issues. Now I can authenticate but when launching it gets stuck at "Loading... We are getting your stream ready"

Is this a bug with this version? I updated from 2 to 10, on steam deck.

jshessen commented 1 year ago

Merging this comment from #895 as duplicate

Using Beta 10 -- after logging out, and clearing data, the following is written to the command prompt after attempting login:

$ ./Greenlight-2.0.0-beta10.AppImage 
/tmp/.mount_GreenlGSGnlz/resources/app.asar/app/background.js[constructor()] Starting Greenlight v2.0.0-beta10
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Decode, source: Error("EOF while parsing a value", line: 1, column: 0) }', src/rs_xal_authenticator.rs:236:28
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
(node:483396) UnhandledPromiseRejectionWarning: Error: sending on a closed channel
    at XalAuthenticator.close (/tmp/.mount_GreenlGSGnlz/resources/app.asar/app/background.js:1:682)
    at BrowserWindow.<anonymous> (/tmp/.mount_GreenlGSGnlz/resources/app.asar/app/background.js:1:98890)
    at BrowserWindow.emit (node:events:539:35)
    at /tmp/.mount_GreenlGSGnlz/resources/app.asar/app/background.js:1:100403
(Use `greenlight --trace-warnings ...` to show where the warning was created)
(node:483396) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

After terminating the command and relaunching, it progresses past the login, but hangs in the "We are getting your stream ready..."

$ ./Greenlight-2.0.0-beta10.AppImage 
/tmp/.mount_GreenlqVpknC/resources/app.asar/app/background.js[constructor()] Starting Greenlight v2.0.0-beta10
events.ts: Retrieved xuid: { xuid: '2801346196799550', state: 'Offline', cloaked: true }
Error fetching consoles. Status: 401 Body: 
(node:483612) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'code')
    at /tmp/.mount_GreenlqVpknC/resources/app.asar/app/background.js:1:91980
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
(Use `greenlight --trace-warnings ...` to show where the warning was created)
(node:483612) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

`

cg- commented 1 year ago

I'm also having these issues on beta 9 and 10 on a steamdeck.

thejae commented 1 year ago

Having the same issue but downgraded to beta 7, which still works.

On Mac OS Ventura 13.4.1

jshessen commented 1 year ago

Having the same issue but downgraded to beta 7, which still works.

On Mac OS Ventura 13.4.1

Just an FYI -- I am also able to work in Beta 8

unknownskl commented 1 year ago

There has been reports of increased waiting times on xCloud. Currently Greenlight cannot show the waiting times but it should connect eventually.

cg- commented 1 year ago

There has been reports of increased waiting times on xCloud. Currently Greenlight cannot show the waiting times but it should connect eventually.

To note, I'm having these issues on in home streaming. I've left it for several minutes before without success, but if I close the app and reopen it, sometimes it will work.

jshessen commented 1 year ago

There has been reports of increased waiting times on xCloud. Currently Greenlight cannot show the waiting times but it should connect eventually.

I think this is fair, but just to add context and color. At any time that Beta 10 is "hanging", I can connect with Beta 8 with no delay (immediately).

gh0sti commented 1 year ago

downgraded from b10 to b8 and can stream again

Kobi-Blade commented 1 year ago

Can confirm this affects remote play and is not exclusive to xCloud, beta 8 the connection is instant, beta 9 and 10 is constantly connecting until it errors.

johnmurphy01 commented 1 year ago

Tried beta 10, 8 and 6 and none work for me. I'm using a Macbook Pro M1 running Ventura 13. Can login fine and it says Connecting to console and powers on the Xbox from standby. But it never connects. I don't think it's an issue with this particular repo, more of an issue maybe with with the xbox-xcloud-player package. Is any work being done to resolve this?

m4tsu999 commented 1 year ago

Same for me. Tried different betas, all on Macbook Pro M1 (Ventura 13.5), remotly via Wifi or 5G (not inside Local Network). Keeps showing "getting stream ready". Xcloud seems to have no issues.

jshessen commented 1 year ago

Just noting updated testing. I noticed Beta 11 was released, and gave it a go (AppImage on Linux)

The "We are getting your stream ready..." issue persists.

/tmp/.mount_GreenlCrMAhS/resources/app.asar/app/background.js[constructor()] Starting Greenlight v2.0.0-beta11
events.ts: Retrieved xuid: { xuid: '2801346196799550', state: 'Offline', cloaked: true }
Error fetching consoles. Status: 401 Body: 
(node:201057) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'code')
    at /tmp/.mount_GreenlCrMAhS/resources/app.asar/app/background.js:1:93016
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
(Use `greenlight --trace-warnings ...` to show where the warning was created)
(node:201057) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
johnmurphy01 commented 1 year ago

I saw this too but even if I handle that error it's still not working. Seems like the connectionState event coming from the xcloud player isn't transmitting the connected state. The last state I get is connecting always.

johnmurphy01 commented 1 year ago

More info, it seems that this logic: https://github.com/unknownskl/xbox-xcloud-player/blob/main/src/Library.ts#L257 isn't being executed. It's confusing because the console output at the entry point of this function isn't being triggered for audio and video yet the VideoComponent has console output that is being executed.

Jayian1890 commented 1 year ago

Clicking on the Xbox logo to exit the app, then reopening seems to work for me. Maybe an incorrect closeure/cleanup?

johnmurphy01 commented 1 year ago

Clicking on the Xbox logo to exit the app, then reopening seems to work for me. Maybe an incorrect closeure/cleanup?

That doesn't appear to work for me. It still seems like there's some event that isn't being emitted and so it stays in the connecting state.

unknownskl commented 1 year ago

Thanks for the info. I don't have the issue on my side which makes it really difficult to reproduce, however I ran into it once on the steam deck yesterday (reconnecting worked for me). Any pointers would be handy to have. In meantime I will check the suggestions in this post.

Stealthieone commented 1 year ago

20230827_130645

I get this error when it just hangs at getting stream. I hope this helps (on beta 11)

Kobi-Blade commented 1 year ago

Thanks for the info. I don't have the issue on my side which makes it really difficult to reproduce, however I ran into it once on the steam deck yesterday (reconnecting worked for me). Any pointers would be handy to have. In meantime I will check the suggestions in this post.

I only got it working when I open a game on Xbox, if my Xbox is on Dashboard, GreenLight is unable to connect at all, even if I restart both GreenLight and Xbox.

This happens since Beta 9, all the way to latest release.

jshessen commented 1 year ago

Tested Beta 12 today -- went a step further just to add some detail.

If I force a log out I was able to successfully launch a title on 9-12 via "xCloud Library".

All versions (9/10/11/12) exhibit the same behavior (referenced above) when attempting to "Start Stream" directly to my console.

PS -- The update notification when launching previous versions is a welcome addition.

ahkdigital commented 1 year ago

My experience (different scenario) was that I could stream on Beta 8 but I downloaded Beta 12 today and it would not work.

What I decided to focus on was that the logged in user was carrying over between AppImages. That makes sense but I figured I would try doing the login process again in the newer one (i.e: in Beta 12, log out from Settings and then log in again) to see if it made a difference.

Yep, after logging in again then I was able to successfully start a stream on Beta 12. You (OP) mentioned that you upgraded from a previous one - so maybe trying logging out in the newest beta and then logging in again.


EDIT: Well, perhaps I spoke too soon. Now I'm still getting issues on Beta 12 ("We are getting your stream ready") but I can do the xCloud streaming. Beta 8 still works for console streaming.

Stealthieone commented 1 year ago

Confirmed beta 8 does not have this problem

Stealthieone commented 1 year ago

Spoke too soon beta 8 is giving me this problem. I've tried everything and if in standby I can't connect

Stealthieone commented 1 year ago

I think I might have figured out the problem.. In power options on Xbox you can customize your active hours.. I thought that was for the power save option and not the sleep option. I think even if you have your Xbox sleep if you set active hours then remote play will not work outside of those hours. I now have it set to always active and now remote play connects every time

cart-su commented 1 year ago

I've attempted this, that is, changing the active hours, but I'm still encountering the issue.

unknownskl commented 1 year ago

Problem has been identified and will be released with the next beta version :) It turned out to be an timing issue while retrieving the tokens.

cart-su commented 1 year ago

Should the commit referenced above resolve the issue, or is there more work to be done? I built the code with that commit, but still am encountering the problem.

unknownskl commented 1 year ago

The above commit should fix the code error in the console. It was thrown when there is no token found. Do you receive the same error with the new build?

cart-su commented 1 year ago

Yes, what seems to be happening is that it'll connect for a while (more reliably than before), but if I disconnect after a session and wait a little while, I can no longer re-connect until I remove power (unplug) the Xbox and plug it back in. After which case it'll connect that time, but the cycle will continue. I'm using a wired ethernet connection on the Xbox, and Wi-Fi on the MacBook. It may be something to do with the Xbox going to sleep, but I'm not sure. image

unknownskl commented 1 year ago

https://github.com/unknownskl/greenlight/actions/runs/6150587434 (Check below 'Artifacts') Made a quick build in between the releases. Does this version work? I havent encountered any issues on my side anymore.

cart-su commented 1 year ago

I'll do some testing over the next few days. Thanks!

jshessen commented 1 year ago

https://github.com/unknownskl/greenlight/actions/runs/6150587434 (Check below 'Artifacts') Made a quick build in between the releases. Does this version work? I havent encountered any issues on my side anymore.

I was able to successfully connect with this quick build -- Thank you for the continued work

gh0sti commented 1 year ago

So 2.0 RC? @unknownskl

cart-su commented 1 year ago

https://github.com/unknownskl/greenlight/actions/runs/6150587434 (Check below 'Artifacts') Made a quick build in between the releases. Does this version work? I havent encountered any issues on my side anymore.

I've done a bit of testing, both with putting the console to sleep, and allowing the console to sleep after the activity timer had expired. It seems to be working now, and waking the console from sleep successfully.

cart-su commented 1 year ago

I am seeing this error sometimes now, after further testing:

Screenshot 2023-09-13 at 8 08 15 AM

Not sure if it matters, but this local streaming, not cloud streaming. I'm not certain if the error message is the same for both. Otherwise, it's odd it calls out cloud streaming.

cart-su commented 1 year ago

Further testing ( I am trying to use this regularly to check for issues ) and it hasn't reoccurred except for that one day.

EDIT: Okay, this morning it's back. Right after posting this, unfortunately.

unknownskl commented 1 year ago

New beta version has been released which should improve the reliability of the stream. Please try it out and let me know if it fixed the issues with infinite loading screens.

cart-su commented 1 year ago

New beta version has been released which should improve the reliability of the stream. Please try it out and let me know if it fixed the issues with infinite loading screens.

Not sure about the experiences of others, but for me on macOS, the new build appears to have some regressions. I can no longer log in or out of my Microsoft account, and I cannot connect to the Xbox at all (I was logged in, till I wiped data and did a fresh install, at which point I could no longer log in). Older build seems more stable.

unknownskl commented 1 year ago

The logout button is indeed a big issue. The whole layer between the UI and backend had to be rewritten in favor of updating the other dependencies so some things might be unexpectedly broken. I will perform some more testing on my end and try to improve it.

The error in your screenshot is coming from the backend which means it couldnt connect to your console. It sometimes comes up and a power cycle will fix the issue most of the times.

jshessen commented 1 year ago

The logout button is indeed a big issue. The whole layer between the UI and backend had to be rewritten in favor of updating the other dependencies so some things might be unexpectedly broken. I will perform some more testing on my end and try to improve it.

The error in your screenshot is coming from the backend which means it couldnt connect to your console. It sometimes comes up and a power cycle will fix the issue most of the times.

Looks good with limited testing so far. I can share that the "vibration" seems to be resolved per your notes as well.

krztoff commented 1 year ago

Tested on Steam Deck last night and this definitely resolved my "we are getting your stream ready" issue.

ahkdigital commented 1 year ago

Mine does an interesting thing regarding the UI. I installed the Beta 13 deb package and when I launch it loads up fine and displays my console. However, after a second or two, the window goes blank (except for the title bar). Running from terminal I get:

_/opt/Greenlight/resources/app.asar/app/background.js[constructor()] Starting Greenlight v2.0.0-beta13

(greenlight:1559868): Gtk-WARNING **: 17:45:46.381: Theme parsing error: gtk.css:6616:68: Invalid name of pseudo-class events.ts: Retrieved xuid: { xuid: '2533274869039176', state: 'Offline', lastSeen: { deviceType: 'Scarlett', titleId: '750323071', titleName: 'Home', timestamp: '2023-09-12T01:17:20.3494526' } } [1559912:0919/174550.329463:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times! [1559912:0919/174554.655000:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times! [1559912:0919/174556.416977:ERROR:gl_surface_presentationhelper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!

So, I switched to the Yaru theme (away from another User Theme). This resolved the GTK warning but the same symptoms persist:

_/opt/Greenlight/resources/app.asar/app/background.js[constructor()] Starting Greenlight v2.0.0-beta13 events.ts: Retrieved xuid: { xuid: '2533274869039176', state: 'Offline', lastSeen: { deviceType: 'Scarlett', titleId: '750323071', titleName: 'Home', timestamp: '2023-09-12T01:17:20.3494526' } } [1561367:0919/174616.479708:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times! [1561367:0919/174616.489244:ERROR:gl_surface_presentationhelper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!

image

cart-su commented 1 year ago

The logout button is indeed a big issue. The whole layer between the UI and backend had to be rewritten in favor of updating the other dependencies so some things might be unexpectedly broken. I will perform some more testing on my end and try to improve it.

The error in your screenshot is coming from the backend which means it couldnt connect to your console. It sometimes comes up and a power cycle will fix the issue most of the times.

Is this a limitation of the interface being used? I've noticed the official Xbox app will connect without any issue, even during these times. However, I know this is using the limited access we're given by Microsoft.

unknownskl commented 1 year ago

@ahkdigital This seems to en issue with the electron dependency. Downgraded it to v25 and seems to have fixed the issue on my side. New version will be released soon

@comrade-skeleton The xbox app uses a different protocol (RTC) and way of streaming and i think that makes the difference (assumption from my side). Greenlight uses WebRTC which is optimised for xCloud but it is officially not supported to be used on home Xbox consoles. I've tried several workarounds like sending a power on command first but that seemed very unreliable back then.

ahkdigital commented 1 year ago

@unknownskl tried out the deb package version of the install - I still get the issue but the message has changed. Ignoring the GTK theme error - the main thing that jumps out is related to 'webFrameMain' saying that the Render frame was disposed before WebFrameMain could be accessed:

_/opt/Greenlight/resources/app.asar/app/background.js[constructor()] Starting Greenlight v2.0.0-beta14

(greenlight:146593): Gtk-WARNING **: 19:21:08.830: Theme parsing error: gtk.css:6616:68: Invalid name of pseudo-class Error sending from webFrameMain: Error: Render frame was disposed before WebFrameMain could be accessed at WebFrameMain.send (node:electron/js2c/browser_init:2:94495) at WebContents.send (node:electron/js2c/browser_init:2:79721) at Ft.send (/opt/Greenlight/resources/app.asar/app/background.js:1:107011) at Ft.sendAuthState (/opt/Greenlight/resources/app.asar/app/background.js:1:112475) at /opt/Greenlight/resources/app.asar/app/background.js:1:101163 Error sending from webFrameMain: Error: Render frame was disposed before WebFrameMain could be accessed at WebFrameMain.send (node:electron/js2c/browser_init:2:94495) at WebContents.send (node:electron/js2c/browser_init:2:79721) at Ft.send (/opt/Greenlight/resources/app.asar/app/background.js:1:107011) at Ft.sendAuthState (/opt/Greenlight/resources/app.asar/app/background.js:1:112475) at /opt/Greenlight/resources/app.asar/app/background.js:1:102346 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) events.ts: Retrieved xuid: { xuid: '2533274869039176', state: 'Offline', lastSeen: { deviceType: 'Scarlett', titleId: '750323071', titleName: 'Home', timestamp: '2023-09-19T22:14:16.1268438' } } Error sending from webFrameMain: Error: Render frame was disposed before WebFrameMain could be accessed at WebFrameMain.send (node:electron/js2c/browser_init:2:94495) at WebContents.send (node:electron/js2c/browser_init:2:79721) at Ft.send (/opt/Greenlight/resources/app.asar/app/background.js:1:107011) at Ft.sendAuthState (/opt/Greenlight/resources/app.asar/app/background.js:1:112475) at /opt/Greenlight/resources/app.asar/app/background.js:1:95128 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Error sending from webFrameMain: Error: Render frame was disposed before WebFrameMain could be accessed at WebFrameMain.send (node:electron/js2c/browser_init:2:94495) at WebContents.send (node:electron/js2c/browser_init:2:79721) at Ft.send (/opt/Greenlight/resources/app.asar/app/background.js:1:107011) at Ft.sendOnlineFriends (/opt/Greenlight/resources/app.asar/app/background.js:1:112707) at /opt/Greenlight/resources/app.asar/app/background.js:1:91258 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [146646:0921/192118.379232:ERROR:gl_surface_presentationhelper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!

Anaythesteve123 commented 1 year ago

Beta 14 is not working still still not working for me :(

HokiMinato commented 11 months ago

Hey guys, im still getting stuck on “connecting to console” on my steam deck.

I started with v13 a couple months ago and it worked fine all the way until now. I upgraded to v15 and tested all the way down to v10, nothing seems to work.

I do not get an error, it just stucks on connecting.

On my console everything at the settings seems fine, i tried the recommended energy options in this thread, still don’t work for me.

Any ideas?

charlesc commented 11 months ago

restart my macbook 1~2 times since works to me

TheOneAndOnly-Loup commented 8 months ago

@unknownskl It still doesn't work with version 2.12 for me. I tried downgrading to beta 8 but not working. the xbox turns on, but stays on connecting to console. I even tried launching it from my phone, then connecting through greenlight but doesnt work. I'm on a mac btw. Please can you or anyone else help me?

milesm31 commented 2 months ago

@unknownskl It still doesn't work with version 2.12 for me. I tried downgrading to beta 8 but not working. the xbox turns on, but stays on connecting to console. I even tried launching it from my phone, then connecting through greenlight but doesnt work. I'm on a mac btw. Please can you or anyone else help me?

Did you ever figure this out? Having the same issue on Steam deck and I've tried all the troubleshooting options