xbox-smartglass-core-python icon indicating copy to clipboard operation
xbox-smartglass-core-python copied to clipboard

HELP! Everything is broken! OMG

Open tuxuser opened this issue 3 years ago • 3 comments

xbox-smartglass-nano is broken!

YES, you are not alone. It currently is broken and there is no workaround. Be patient

After upgrading to xbox-smartglass-core v1.3.0 dependencies are broken, there are weird errors popping up!

You used python virtual environments, right?

Here is what you gotta do:

  1. Delete the old python virtual environment
  2. Create a new virtual environment
  3. Install latest xbox-smartglass-core via pip

Practical example

  1. Delete old virtual env folder. Now:
python3 -m venv venv
source venv/bin/activate
pip install xbox-smartglass-core

The ReST server is broken, none of the old requests work anymore!

Yup, that's expected too. The ReST server was migrated to the FastApi framework and the API was changed / cleaned up.

Check out: https://github.com/OpenXbox/xbox-smartglass-core-python#rest-api

Meh, the new upgrade to asyncio is shit, I want the old version.

Ok, whatever. Clone the old state of the repo and pin xbox-webapi to ==1.1.8. There obviously wont be any support for older versions tho.

The library reports something like xyz was not awaited ...

Thanks, good catch. I forgot something while migrating from gevent to asyncio. Please file an issue, attach a log and describe how this condition was reached.

tuxuser avatar Nov 03 '20 01:11 tuxuser

Hi,

I have some trouble while migrating to the new auth mechanics of the rest server, previously I logged in via a post request using email, username. Also, it was possible to load the old token, after restarting the rest server. Now after restarting the server, I have to again call the redirect uri of the auth/login endpoint via browser to get it working again. Isn't it possible to auth without manual user action after restarting the rest server once? I would expect that I can stay logged in for at least until my I forgot to refresh or token expired due to other reasons. According to the docs I can also not pass my existing token to the login, so I guess everything is handeld internally.

Would be nice, if you could guide me in the right direction.

Okay, so after first productive tests, I guess my real issue came up, until then I had rest server running on my dev machine, but now having it running on a SBC in my local network, the problem I face is, that the only allowed callback is localhost, but the rest server is running on another machine in my network. Is it somehow possible to get the callack called to the device where my rest server is running on?

foxriver76 avatar Nov 04 '20 12:11 foxriver76

Okay, according to https://stackoverflow.com/questions/58324124/access-local-web-server-from-another-device-on-the-network-using-azure-ad-for-au it seems like, this is not possible. Is there any chance to use the old authentication procedure. In my setup most users have the rest server running on a SBC in their network and of course will login with their PC, where the callback will always address the PC instead of the SBC where the server is running on, this makes it pretty impossible to work out of the box as previous versions did.

foxriver76 avatar Nov 11 '20 13:11 foxriver76

Also when not working in a virtualenv, which comes with requests installed, the requests package needs to be manually installed, especially on distros like Debian which are often used on SBCs this is not the case. Added it to my package as a module, but you could think about adding it at the origin.

foxriver76 avatar Mar 29 '21 09:03 foxriver76