bottlesdevs / programs

Repository for programs installation
70 stars 74 forks source link

[Bug] Battle.net does not launch due to locked database #216

Open faeyben opened 1 year ago

faeyben commented 1 year ago

Hello,

I created a new Bottle with the standard Gaming preset. After that I tried to install Battle.net using the Bottles installer. The installation process did not finish completely, the logs were filled with hundreds of the following line per second:

[Main] {Main} Query failed: database is locked

After waiting for about 10 minutes, I used kill to stop the Battle.net process after which the installation "finished". However, starting Battle.net then yields the same behavior.

Full log from starting Battle.net:

I 2023-03-17 15:01:33.245116 [Main] {Main} Logging started for Battle.net build 2.18.1.14033
I 2023-03-17 15:01:33.245540 [Configuration] {Main} SharedConfigRoot: C:\ProgramData\Battle.net
I 2023-03-17 15:01:33.246059 [Configuration] {Main} RoamingConfigRoot: C:\users\name\AppData\Roaming\Battle.net
I 2023-03-17 15:01:33.246064 [Configuration] {Main} LocalConfigRoot: C:\users\name\AppData\Local\Battle.net
D 2023-03-17 15:01:33.247244 [Configuration] {Main} Searching for config file: C:\Program Files (x86)\Battle.net\Battle.net.14033\Battle.net.config
D 2023-03-17 15:01:33.248056 [Configuration] {Main} Searching for config file: C:\Program Files (x86)\Battle.net\Battle.net.config
D 2023-03-17 15:01:33.250553 [Configuration] {Main} User Configuration File: C:\users\name\AppData\Roaming\Battle.net\Battle.net.config
I 2023-03-17 15:01:33.251392 [Main] {Main} Command line arguments: {}
I 2023-03-17 15:01:33.255360 [Main] {Main} Opening IPC shared memory. queueName=User:name:Battle.net IPC ShMem mode=server
I 2023-03-17 15:01:33.297335 [Main] {Main} Adding ObserverRecord: QtLoggingRules
I 2023-03-17 15:01:33.306527 [Frontend] {Main} Supplying list of renderers: d3d11,warp,desktop
I 2023-03-17 15:01:33.673498 [LocalizationData] {Main} 21 language(s) loaded from languages.xml, default=enUS
D 2023-03-17 15:01:33.813987 [Main] {Main} Adding application font: resources/fonts/BlizzardReg.ttf
D 2023-03-17 15:01:33.818387 [Main] {Main} Adding application font: resources/fonts/BlizzardLig.ttf
D 2023-03-17 15:01:33.823232 [Main] {Main} Adding application font: resources/fonts/BlizzardBol.ttf
D 2023-03-17 15:01:33.827782 [Main] {Main} Adding application font: resources/fonts/NotoSans-Bold.ttf
D 2023-03-17 15:01:33.835053 [Main] {Main} Adding application font: resources/fonts/NotoSans-BoldItalic.ttf
D 2023-03-17 15:01:33.842562 [Main] {Main} Adding application font: resources/fonts/NotoSans-Italic.ttf
D 2023-03-17 15:01:33.849486 [Main] {Main} Adding application font: resources/fonts/NotoSans-Regular.ttf
D 2023-03-17 15:01:33.856315 [Main] {Main} Adding application font: resources/fonts/ObjectSans-Bold.ttf
D 2023-03-17 15:01:33.860996 [Main] {Main} Adding application font: resources/fonts/ObjectSans-Medium.ttf
W 2023-03-17 15:01:35.930920 [Qt] {Main} Unable to enumerate family ' "Noto Sans Inscriptional Parthian" '
D 2023-03-17 15:01:37.368920 [Main] {Main} Setting font to: Blizzard
I 2023-03-17 15:01:37.377121 [CacheManager] {Main} Local storage cache at: C:\users\name\AppData\Local\Battle.net\Cache
I 2023-03-17 15:01:37.427689 [Main] {Main} Opened database at: C:\users\name\AppData\Local\Battle.net\CachedData.db
E 2023-03-17 15:01:38.729913 [Main] {Main} Query failed: database is locked
[Previous line repeated hundred of times per second]

Using fuser to see what process accesses CachedData.db, I can see that after attempting to start Battle.net /usr/libexec/xdg-document-portal is accessing that file. Though I am not sure if that is the indeed the database it's complaining about.

EvoXCX commented 1 year ago

Same here, I think it"s a permission problem with Flatpak package, because with AUR package where bottles is not sandboxed Battle.net work perfectly. Need to more investigate about this problem.

Same logs as you in my case.

EvoXCX commented 1 year ago

@faeyben Are you trying to install on different disk/directory than the default flatpak bottles directory ? Because in my case is it (Bottles create directory on my 2nd drive), I tried to install it in default flatpak directory on another PC and it's working, this can confirm my theory if it's your case.

EDIT: Confirmed ! Installing programs in default flatpak folder works good and installing games on my other drive is the solution I found.

faeyben commented 1 year ago

@EvoXCX Yes, I install flatpaks onto my /home disk (with flatpak --user), whereas I have separate disks for games that are mounted under /home/\<username>/Games.