Battlenet installation fails with %AppData% returned empty string, error message "" (solved)

I’m trying to install battle.net using the website script on a thinkpad 490 with Debian 12 and XFCE. The installation aborts wit code 256.

lutris -d
(lutris:9539): Gtk-WARNING **: 21:04:36.712: Theme parsing error: gtk.css:19:26: The style property GtkRange:slider-width is deprecated and shouldn't be used anymore. It will be removed in a future version
(lutris:9539): Gtk-WARNING **: 21:04:36.712: Theme parsing error: gtk.css:20:26: The style property GtkRange:stepper-size is deprecated and shouldn't be used anymore. It will be removed in a future version
INFO     2024-07-17 21:04:36,797 [application.do_command_line:479]:Starting Lutris 0.5.17
INFO     2024-07-17 21:04:36,821 [startup.run_all_checks:120]:Intel UHD Graphics 620 (8086:3ea0 17aa:2279 i915) Driver 22.3.6
DEBUG    2024-07-17 21:04:36,929 [xrandr.get_resolutions:91]:Retrieving resolution list
DEBUG    2024-07-17 21:04:36,945 [xrandr._get_vidmodes:18]:Retrieving 43 video modes from XrandR
DEBUG    2024-07-17 21:04:37,029 [path_cache._update_missing_games:114]:Checking for missing games
DEBUG    2024-07-17 21:04:37,077 [api.check_stale_runtime_versions:52]:Modified at Mi 17 Jul 2024 15:04:11 , will update after Mi 17 Jul 2024 21:04:11
DEBUG    2024-07-17 21:04:37,077 [http._request:88]:GET https://lutris.net/api/runtimes/versions?pci_ids=8086:3EA0%2017AA:2279
DEBUG    2024-07-17 21:04:37,312 [lutriswindow.create_runtime_updater_cb:1244]:Runtime up to date
DEBUG    2024-07-17 21:04:43,257 [application.show_window:394]:Showing window AddGamesWindow{'parent': <lutriswindow.LutrisWindow object at 0x7f94f40d81c0 (LutrisWindow at 0x19b02a0)>}
DEBUG    2024-07-17 21:04:48,220 [http._request:88]:GET https://lutris.net/api/games?search=battlenet&with-installers=True
DEBUG    2024-07-17 21:04:49,811 [api.get_game_installers:395]:Fetching installer https://lutris.net/api/installers/battlenet
DEBUG    2024-07-17 21:04:49,811 [http._request:88]:GET https://lutris.net/api/installers/battlenet
DEBUG    2024-07-17 21:04:49,812 [application.on_app_window_destroyed:419]:Removed window AddGamesWindow{'parent': <lutriswindow.LutrisWindow object at 0x7f94f40d81c0 (LutrisWindow at 0x19b02a0)>}
DEBUG    2024-07-17 21:04:50,031 [application.show_window:394]:Showing window InstallerWindowbattlenet
DEBUG    2024-07-17 21:04:52,069 [xrandr._get_vidmodes:18]:Retrieving 43 video modes from XrandR
DEBUG    2024-07-17 21:05:16,132 [xrandr._get_vidmodes:18]:Retrieving 43 video modes from XrandR
DEBUG    2024-07-17 21:05:19,873 [wine.get_installer_runner_version:815]:Default wine version is wine-ge-8-26
DEBUG    2024-07-17 21:05:19,907 [installerwindow.on_files_prepared:608]:Game files prepared.
DEBUG    2024-07-17 21:05:19,909 [installerwindow.present_installer_files_page:623]:Presenting installer files page
DEBUG    2024-07-17 21:05:25,535 [downloader.start:60]:⬇ https://www.battle.net/download/getInstallerForGame?os=win&version=LIVE&gameProgram=BATTLENET_APP
DEBUG    2024-07-17 21:05:26,945 [downloader.on_download_completed:166]:Finished downloading https://www.battle.net/download/getInstallerForGame?os=win&version=LIVE&gameProgram=BATTLENET_APP
INFO     2024-07-17 21:05:27,039 [file_box.on_download_complete:223]:Download completed
DEBUG    2024-07-17 21:05:27,040 [files_box.on_file_available:108]:setup is available
INFO     2024-07-17 21:05:27,040 [files_box.on_file_available:114]:All files available
INFO     2024-07-17 21:05:27,040 [installerwindow.on_files_available:653]:All files are available, continuing install
INFO     2024-07-17 21:05:27,044 [installerwindow.launch_installer_commands:661]:Launching installer commands
DEBUG    2024-07-17 21:05:27,047 [interpreter._iter_commands:315]:Installer command: {'task': {'arch': 'win64', 'name': 'create_prefix', 'prefix': '$GAMEDIR'}}
INFO     2024-07-17 21:05:27,149 [wine.create_prefix:108]:Creating a win64 prefix in /home/<user>/Games/battlenet
INFO     2024-07-17 21:05:27,149 [wine.create_prefix:126]:Winepath: /home/<user>/.local/share/lutris/runners/wine/wine-ge-8-26-x86_64/bin/wine
DEBUG    2024-07-17 21:05:27,150 [system._execute:109]:Executing /home/<user>/.local/share/lutris/runners/wine/wine-ge-8-26-x86_64/bin/wineboot
DEBUG    2024-07-17 21:05:27,150 [system._execute:115]:WINEARCH=win64 WINEPREFIX=/home/<user>/Games/battlenet WINEDLLOVERRIDES=winemenubuilder= WINE_MONO_CACHE_DIR=/home/<user>/.local/share/lutris/runners/wine/wine-ge-8-26-x86_64/mono WINE_GECKO_CACHE_DIR=/home/<user>/.local/share/lutris/runners/wine/wine-ge-8-26-x86_64/gecko
INFO     2024-07-17 21:10:27,675 [wine.create_prefix:175]:win64 Prefix created in /home/<user>/Games/battlenet
DEBUG    2024-07-17 21:10:27,722 [interpreter._iter_commands:315]:Installer command: {'task': {'app': 'arial', 'arch': 'win64', 'name': 'winetricks', 'prefix': '$GAMEDIR'}}
Started initial process 9744 from /home/<user>/.local/share/lutris/runtime/winetricks/winetricks --unattended arial
Start monitoring process.
Executing cd /home/<user>/.local/share/lutris/runtime/winetricks
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.

WINEPREFIX INFO:
Drive C: insgesamt 28
drwxr-xr-x  7 <user> <user> 4096 17. Jul 21:05 .
drwxr-xr-x  4 <user> <user> 4096 17. Jul 21:10 ..
drwxr-xr-x  3 <user> <user> 4096 17. Jul 21:05 ProgramData
drwxr-xr-x  6 <user> <user> 4096 17. Jul 21:05 Program Files
drwxr-xr-x  3 <user> <user> 4096 17. Jul 21:05 Program Files (x86)
drwxr-xr-x  4 <user> <user> 4096 17. Jul 21:10 users
drwxr-xr-x 17 <user> <user> 4096 17. Jul 21:05 windows

Registry info:
/home/<user>/Games/battlenet/system.reg:#arch=win64
/home/<user>/Games/battlenet/user.reg:#arch=win64
/home/<user>/Games/battlenet/userdef.reg:#arch=win64

warning: /home/<user>/.local/share/lutris/runners/wine/wine-ge-8-26-x86_64/bin/wine cmd.exe /c echo '%AppData%' returned empty string, error message ""
Monitored process exited.
Initial process has exited (return code: 256)
All processes have quit
Exit with return code 256
DEBUG    2024-07-17 21:10:28,536 [monitored_command.on_stop:228]:Process 9742 has terminated with code 256
DEBUG    2024-07-17 21:10:28,852 [commands._monitor_task:444]:Return code: 256
ERROR    2024-07-17 21:10:28,853 [errors.__init__:19]:Befehl beendet mit dem Code 256
ERROR    2024-07-17 21:10:28,854 [exception_backstops.error_wrapper:110]:Error handling timeout function: Befehl beendet mit dem Code 256
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/lutris/exception_backstops.py", line 108, in error_wrapper
    return handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/lutris/installer/commands.py", line 446, in _monitor_task
    raise ScriptingError(_("Command exited with code %s") % command.return_code)
lutris.installer.errors.ScriptingError: Befehl beendet mit dem Code 256
INFO     2024-07-17 21:21:39,123 [interpreter.revert:385]:Cancelling installation of Blizzard Battle.net
DEBUG    2024-07-17 21:21:39,215 [wine.winekill:200]:Killing all wine processes ([]) in prefix /home/<user>/Games/battlenet: ['/home/<user>/.local/share/lutris/runners/wine/wine-ge-8-26-x86_64/bin/wineserver', '-k']
DEBUG    2024-07-17 21:21:39,215 [wine.winekill:201]:['/home/<user>/.local/share/lutris/runners/wine/wine-ge-8-26-x86_64/bin/wineserver', '-k']
DEBUG    2024-07-17 21:21:39,215 [wine.winekill:202]:/home/<user>/.local/share/lutris/runners/wine/wine-ge-8-26-x86_64/bin/wineserver -k
DEBUG    2024-07-17 21:21:39,266 [wine.winekill:205]:Waiting for wine processes to terminate
DEBUG    2024-07-17 21:21:39,266 [wine.winekill:221]:Done waiting.
DEBUG    2024-07-17 21:21:39,266 [system.delete_folder:387]:Deleting folder /home/<user>/.cache/lutris/installer/battlenet
DEBUG    2024-07-17 21:21:39,267 [application.on_app_window_destroyed:419]:Removed window InstallerWindowbattlenet
INFO     2024-07-17 21:21:49,916 [application.do_shutdown:1051]:Shutting down Lutris

Filesystem is ext4 and chmod to 777 as recommended elsewhere did not help.

I installed all dependencies except libsdl2 since XFCE does not support wayland and I could not figure out how to install that library without installing wayland, see Battle.net dependecy libsdl2 installs wayland?. Also I do not think its related.

My guess is that there is a problem with winetricks. I installed the latest version as required by lutris into the runtime dir, but I think it does not have an omportant Debian patch. But also using system winetricks resulted in errors.

Other people said they installed battle.net without lutris so I did, but after importing it into lutris it does not load:

Started initial process 12951 from /home/<user>/.local/share/lutris/runners/wine/wine-ge-8-26-x86_64/bin/wine /home/<user>/Games/battlenet/dosdevices/c:/Program Files (x86)/Battle.net/Battle.net Launcher.exe
Start monitoring process.
fsync: up and running.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
Initial process has exited (return code: 0)     

Then I tried to install World of Warcraft, which of course wants to execute the battlenet script first, which again fails.

Install the wine dependencies per this link

Install the drivers dependencies per this link - DO NOT COPY PASTE - you need to edit the command for Intel to remove the PPA instructions as Debian does not use PPA’s

Make sure that your ~/Games folder does not have any battlenet folders in it

try the install again.

If it still fails, use flatpak lutris

Drivers: check
Wine dependencies: check, except libsdl2. I cannot install it because it installs wayland. My system does not support wayland. Is there a way to configure libsdl2 to NOT use wayland but xorg? I tried to search for it but cannot find anything.

With flatpak the battlenet install finishes but upon start is unresponsive stuck on "Welcome to Battle.net. That’s the intro, I managed to skip it. And WoW retail starts - as a slideshow, I noticed during install:

ERROR:dxva_video_decode_accelerator_win.cc(1459)] DXVAVDA fatal error: could not LoadLibrary: msvproc.dll: Modul not found. (0x7E)

Could that be the cause of the problem? There were also lots of font errors and sandbox errors related to BrowserCaches but I don’t think they are related.

I did not manage to create desktop shortcuts - clicked on the lutris menu entry to do so, but nothing happened. Probably due to flatpak.

Now on to analyze the config in order to get rid of flatpak. Where can I find the files usually in ~/.local/share/lutris from the flatpak installation?

Edit: found them in ~/.var/app. Thanks for your help.

I finally managed to figure several things out:

  1. The dependencies I was missing were dependencies from that dependency that I did not want to install because of wayland.
    libsdl2-2.0-0:i386 pulls in libdecor-0-0:i386 libxcursor1:i386 libxi6:i386 libxkbcommon0:i386 libxrandr2:i386 libxss1:i386 which ARE needed.
    It also pulls in libgbm1:i386 libsdl2-2.0-0:i386 libwayland-cursor0:i386 libwayland-egl1:i386 libwayland-server0:i386 - those have the wayland dependency and are NOT needed, contrary to what the wiki says.
  2. I did not want to restart the installation so I copied ~/.var/app/net.lutris.Lutris/data/lutris/pga.db into my systems ~/.local/share/lutris/ directory. Took me several hours to find the information that the yml files in the games subdir are useless and that the db has the important info. So if anyone ever wants to transfer old installations into a new lutris install, copy that db.
  3. Game starts, the 1GB flatpak monster can go, thankfully. Thanks again for your help @OJ1 . You did not have the exact info but you put me on the right path to figure it out myself.

Where did you get this list of dependencies from??? ie Whatever wiki you followed is not applicable in 2024…

I have ran BNet for years on Mint, I didn’t have these issues

  1. If it installed in flatpak lutris, you took the longest route possible to add it to your local lutris - close flatpak lutris, launch local lutris, if it is not automatically detected, press the plus button in lutris → Import previously installed lutris games.

  2. You really need to check the date and distro on whatever wiki you have referenced for this installation and complain that the writer needs to update it for 2024

  3. The slideshow with WoW is enjoyable on an iGPU, the error you had is not related, I got it on Mint, you could try to find the exact gstreamer bits and Mesa bits to fix it, but not related to WoW performance.

  4. WoW dropped a bunch of prerelease content today, and judging by what I experienced on the Beta, get the popcorn and drinks cause the slideshow is going to get worse until they optimise the new graphics

The dependencies were from the lutris wiki link you posted docs/WineDependencies.md at master · lutris/docs · GitHub. One of the packages listed in the wiki (libsdl2-2.0-0:i386) is unnecessary but it pulls in some more dependencies during installation and HALF OF THOSE dependecies are necessary. As I wrote, those dependencies-of-a-dependency that pull in wayland-server are not necessary - but the other half of dependencies of libsdl2-2.0-0:i386 are necessary. You cannot see that in the lutris wiki and that was the source of my problem.
I did run BNet on Debian for years too. But at the time of that installation the list of dependencies in the lutris wiki was correct. Now its not.

  1. That does not work. No automatic detection and import did not work. I tried all offered possibilities without success. I found other people on the Internet who had the same problem (migrating a setup), that’s why I’m writing here how I did it.
  2. I used the lutris wiki you linked (docs/WineDependencies.md at master · lutris/docs · GitHub ). It’s wrong for non-wayland systems and needs to be updated.
  3. Yeah probably. That’s fine for now though,I lowered the graphic settings and I’ll manage.
  4. I can imagine. I’ll get a new machine with dedicated graphics for the new content.