Cannot connect Ubisoft library to lutris

I installed the Ubisoft connect client and then tried to connect the account to Lutris through the connect button. The popup appeared and I logged in with prestored credentials and everything went normal, until the Webview was supposed to be redirected to connect_ubisoft_com/ready. The redirect happens automatically when doing the same in firefox. For some reason I can’t redirect the window even manually, therefore the whole process gets stuck on the loading animation which never finishes.
I downloaded Lutris directly from github in order to modify some code myself. While the javascript calls do get executed they have no effect, aka window_location_replace and window_location_href act as window_location_reload and even calling widget_load_uri(“https://connect_ubisoft_com/ready”) has no effect. Debugging is hard since the Webkit inspector doesn’t work.
I enabled developer extras and console to stdout and added some code myself, namely a print call in the on_navigation() after WebKit2_LoadEvent_FINISHED check with a counter (for the amount of times it was called), the url currently loaded and a load event log. After the second call (which is probably (unsuccessfully) automatically fired by the website) I tried manually invoking redirects using javascript and widget_load_uri(“https://connect_ubisoft_com/ready”), unsuccessfully. This is the log from ./bin/lutris -d: Ubuntu Pastebin

I admit to having no clue about what is going on, anything beyond some basic checks is beyond me. I though about manually obtaining credentials and storing them myself, but that would be a lot of work (reimplementing the whole login process) and it possibly wouldn’t even work.
Oh I also checked in with chatgpt and to noones suprise it has no clue either.

Thanks for your help :slight_smile:

I had to replace all dots with underscores because I can only include 2 links in a post apparently.

Ubisoft connect put out an update a few months ago which appears to have changed something in the ability of lutris to read games etc from it - so far no one I know has worked out how to fix it so we all just work out the correct uplay id for a game and add the string to the Arguments field on the Game Options tab eg:
for AFOP (Avatar game), the string to add is uplay://launch/4740/0

So I just add a locally installed game, pick the exe and add the correct id in the arguments field. How do I work out the game id?
Thanks for you help.

duplicate the existing Ubisoft entry (right click → duplicate), give it the name of the game in Ubisoft eg xDefiant

Launch Ubisoft connect → on the games management page, click the 3 dots → Manage → add desktop shortcut. This will create a file in your /drive_c/users/$USER/Desktop folder which you then open and extract the URL from eg doing this for xDefinat gives:

[InternetShortcut]
URL=uplay://launch/15657/0

in the file so you just copy the uplay:// onwards for use as the Argument in the new lutris entry you created

Thank you for your help. I will try to look into the problem more deeply myself and maybe (probably not) fix it.

Ok I spent a couple hours and managed to fix the issue it has something to do with misshandled policy decisions. I implemented a fix, I just need to figure out how to push it to github lol

Is this a fix for the Ubisoft Connect source? If so, head to the discord server and github_commits section and drop a comment to Strider to let him know you are planning to post a fix and what process he wants