FriendsOfGalaxy / galaxy-integration-battlenet

:warning: This project is no longer maintained. Please use this repository https://github.com/FriendsOfGalaxy/galaxy-integration-blizzard
MIT License
124 stars 6 forks source link

Play button doesn't start the game #8

Closed PastorGL closed 4 years ago

PastorGL commented 5 years ago

Plugin version 0.38.

I have currently Hearthstone and Destiny 2 installed.

From plugin log:

2019-08-29 22:32:38,147 - root - INFO - Games found in db [ProductDbInfo(uninstall_tag='client', ngdp='clnt', install_path='C:/ProgramData/Battle.net/Client', version='', playable=False), ProductDbInfo(uninstall_tag='s1', ngdp='s1', install_path='G:/Games/StarCraft', version='1.23.0.6398', playable=False), ProductDbInfo(uninstall_tag='hs_beta', ngdp='hsb', install_path='G:/Games/Hearthstone', version='15.0.4.33402', playable=True), ProductDbInfo(uninstall_tag='destiny2', ngdp='dst2', install_path='G:/Games/Destiny 2', version='2.5.2.1 (6104665)', playable=True)]

BNet client path is detected incorrectly. Actually it is installed under G:/Battle.net. Games paths are detected correctly, all are under G:\Games.

After clicking Play button on Destiny 2 page:

2019-08-29 22:37:29,927 - root - INFO - Handling notification: method=launch_game, params={'game_id': '1146311730'} 2019-08-29 22:37:29,927 - root - INFO - Launching game of id: 1146311730, <game.InstalledGame object at 0x042C3B30> 2019-08-29 22:37:30,544 - root - ERROR - Launching game 1146311730 failed: [WinError 2] The system cannot find the file specified Traceback (most recent call last): File "C:\Users\x\AppData\Local\GOG.com\Galaxy\plugins\installed\battle.net\plugin.py", line 402, in launch_game await self.local_client.launch_game(game, wait_sec=60) File "C:\Users\x\AppData\Local\GOG.com\Galaxy\plugins\installed\battle.net\local_client.py", line 152, in launch_game await self._prepare_to_launch(game.info.uid, timeout) File "C:\Users\x\AppData\Local\GOG.com\Galaxy\plugins\installed\battle.net\local_client.py", line 95, in _prepare_to_launch subprocess.Popen([self._exe, f'--game={uid}'], cwd=os.path.dirname(self._exe)) File "D:\obj\Windows-Release\37win32_Release\msi_python\zip_win32\subprocess.py", line 775, in init File "D:\obj\Windows-Release\37win32_Release\msi_python\zip_win32\subprocess.py", line 1178, in _execute_child FileNotFoundError: [WinError 2] The system cannot find the file specified

And it doesn't start. Same with Hearthstone.

sirsmeghead commented 5 years ago

Same here, it just opens download page for Battle.net client in my browser instead of starting the game. Not sure where I find the log for the plugin though, so can't check what it says.

ElAlderson commented 4 years ago

Hearthstone causes no problem (at least for me). If you have Destiny 2 from Battle.net, then it will certainly give you an error now (a message saying: "You can't install this game yet") as it has migrated over to Steam and is not playable anymore on Battle.net. The Steam version should work fine (although haven't tested it yet).

@PastorGL Going by the logs, have you tried "Scan and Repair" on Battle.net ? I have games installed under D:\ and I have no issues (as of now).

FriendsOfGalaxy commented 4 years ago

@PastorGL Sorry for late response. I couldn't reproduce. Bnet install location is read from battlenet database at %ALLUSERSPROFILE%\Battle.net\Agent\product.db

Maybe another user has battlenet installed previously in other location? Clearning database and reinstalling Battle.net client or scan&repair as ElAlderson suggested may help.

PastorGL commented 4 years ago

@FriendsOfGalaxy I previously tried an uninstall of BNet via Settings->Apps and then reinstalled it from web, and it didn't help.

So today I performed a full manual cleanup of all traces of Blizzard/BNet client folders I found in all AppData folders (both common and my account, local and remote — there are a lot of these) and registry, and reinstalled BNet another time, and that helped. product.db you've mentioned points to correct locations now.

Not sure why their uninstaller doesn't the required cleanup 🤷‍♂️