Lauriethefish / QuestPatcher

Generic il2cpp modding tool for Oculus Quest (1/2/3) apps.
zlib License
261 stars 393 forks source link

Crash on startup (windows, Avalonia update) #137

Open ideasculptor opened 7 months ago

ideasculptor commented 7 months ago

When I launch the app with Oculus app running and quest3 linked (via cable), the app starts up, displays the border of a window, and then goes away - leaving no log or any other information. If I kill the oculus app, the app starts up and the contents of the window are displayed, but then it complains about the quest3 not being connected. I've rebooted all of the things to no avail. Headset is up to date. beat saber apk is downgraded to the correct apk. I can't figure out how to prove which version of the pak is installed, butt when I go to the app store in the headset, it offers me an 'upgrade' button so it is clearly no longer running the most recent version, at least.

Lauriethefish commented 7 months ago

This is a known issue currently. It doesn't have anything to do with your beat saber version, so don't worry about that.

Basically, ever since I upgraded QuestPatcher to Avalonia 11, these crashes happen for some people. Worse, they don't seem to log a critical error when they happen, making it almost impossible to debug.

ideasculptor commented 7 months ago

This is a known issue currently. It doesn't have anything to do with your beat saber version, so don't worry about that.

Basically, ever since I upgraded QuestPatcher to Avalonia 11, these crashes happen for some people. Worse, they don't seem to log a critical error when they happen, making it almost impossible to debug.

For those who have a similar problem, I was able to use the Mac version with no problem despite finding the windows version to be broken with my headset. I imagine the linux version might also work, though it didn't work when I tried to use it via WSL - but I didn't try very hard to make it work since my mac worked first try.

camdan-me commented 7 months ago

I'm experiencing the same issue, but QP wrote the below to the log file:

[2023-11-29 21:11:25 DBG] Saving default config file . . .
[2023-11-29 21:11:26 INF] Loading config . . .
[2023-11-29 21:11:26 DBG] QuestPatcherService constructed (QuestPatcher version 2.6.2)
[2023-11-29 21:11:26 DBG] Loading default themes
[2023-11-29 21:11:26 DBG] 2 themes loaded successfully!
[2023-11-29 21:11:26 INF] Starting QuestPatcher . . .
[2023-11-29 21:11:26 DBG] Checking for existing daemon
[2023-11-29 21:11:26 DBG] Found existing ADB daemon. Checking if it's valid for us to use
[2023-11-29 21:11:26 VRB] Checking if ADB at C:\Program Files (x86)\Touch Portal\plugins\adb\platform-tools\adb.exe is present and up-to-date

It seems to be looking for adb.exe in another program I have installed (touch portal). Not sure why.

The program ran in Windows Sandbox without issue, though I couldn't get it to connect to the quest.

Edit: After uninstalling TouchPortal, this line shows:

[2023-11-29 21:33:03 VRB] Checking if ADB at C:\Users\hello\AppData\Roaming\SideQuest\platform-tools\adb.exe is present and up-to-date
Lauriethefish commented 7 months ago

All this looks like intended behaviour (other than the crash). QP tries to use existing ADB daemons if one exists, as this helps compatibility with other programs.

Lauriethefish commented 6 months ago

I've managed to narrow down the issue to a potential bug in Avalonia's accessibility features, or maybe the Windows libraries it communicates with. A crash dump from a user has revealed that the crash is due to a buffer overrun in UIAutomationCore.dll.

This matches up with the fact that accessibility support was added to Avalonia in v11, and the issue was not present before the upgrade to v11.

Lauriethefish commented 6 months ago

@ideasculptor and @camdan-me, if you're still around, it would be very helpful if you could do some testing for me?

I can send you some programs that are intended to create a minimum reproducible example to send to Avalonia, see if I can get this fixed.

grego31430 commented 6 months ago

@Lauriethefish if needed I've the same error :)

Lauriethefish commented 6 months ago

@grego31430 Great!

If you could get a crash dump using the following steps, that would be great. (it would be useful if anybody experiencing this problem can carry out these steps)

  1. Extract the zip file attached to this comment.
  2. Open the batch file in the extracted folder and wait a few seconds.
  3. Open QuestPatcher and wait for it to crash.
  4. Send the .dmp file here. (found in the folder where you extracted the ZIP)
Lauriethefish commented 6 months ago

Also, to anybody that is not having this bug, it would be very helpful if you could tell me the ProductVersion and FileVersion of UIAutomationCore.dll, located in C:\Windows\System32.

If you are having this bug, but don't want to get a full crash dump, you could also perform the above steps ^^^, they would be useful information.

ALERTua commented 6 months ago

Windows 11 23H2 22635.2915 UIAutomationCore.dll Version 7.2.22621.2841 QuestPatcher.exe_231231_124633.dmp.zip

grego31430 commented 6 months ago

Here it is :)

For information the UIAutomationCore.dll : File Ver : 7.2.22.621.2792 Product Ver : 10.0.22621.2792 QuestPatcher.exe_231231_125353.dmp

PS : I have made an new user on my computer and it's work it 🤣

anastasty commented 6 months ago

I have an older Mac (10.12.6) and when opening also get a crash, and system crash report from QuestPatcher. I'm going to try my newer Mac, but if the log would be helpful I'll provide it. log.txt

qe201020335 commented 6 months ago

I don't have the crash but here is the info for my UIAutomationCore.dll ProductVersion: 10.0.19041.3636 FileVersion: 7.2.19041.3636 My windows is Windows 10 Pro 19045.3803

Lauriethefish commented 6 months ago

Hey @anastasty, this is a windows specific bug so it would be great if you could open your own issue. I've modified the title to clarify. Ideally include your questpatcher logs as well, located in ~/.config/QuestPatcher/logs.

ideasculptor commented 6 months ago

@ideasculptor and @camdan-me, if you're still around, it would be very helpful if you could do some testing for me?

I can send you some programs that are intended to create a minimum reproducible example to send to Avalonia, see if I can get this fixed.

I'm around and willing to help try to nail the problem down.

k9rdu commented 5 months ago

This is a known issue currently. It doesn't have anything to do with your beat saber version, so don't worry about that.

Basically, ever since I upgraded QuestPatcher to Avalonia 11, these crashes happen for some people. Worse, they don't seem to log a critical error when they happen, making it almost impossible to debug.

Is there an older version of questlauncher available that doesn't have this issue, or can it be rebuilt with an older version of Avalonia?

Lauriethefish commented 5 months ago

@k9rdu You can try version 2.6.0. NB you're missing some key fixes, including automatic granting of external storage permissions. These can be manually granted by running adb shell pm grant com.beatgames.beatsaber android.permission.MODIFY_EXTERNAL_STORAGE manually, e.g. with SideQuest.

k9rdu commented 5 months ago

This is for my son he's running Windows 10 with a quest 3 I will have him try this afternoon and let you know how it goes.

On Mon, Jan 15, 2024, 1:36 PM Lauriethefish @.***> wrote:

@k9rdu https://github.com/k9rdu You can try version 2.6.0 https://github.com/Lauriethefish/QuestPatcher/tree/2.6.0. NB you're missing some key fixes, including automatic granting of external storage permissions. These can be manually granted by running adb shell pm grant com.beatgames.beatsaber android.permission.MODIFY_EXTERNAL_STORAGE manually, e.g. with SideQuest.

— Reply to this email directly, view it on GitHub https://github.com/Lauriethefish/QuestPatcher/issues/137#issuecomment-1892628947, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXMZGZTVMP4XXAJ762V6NNLYOVZJVAVCNFSM6AAAAAA7PFP2L6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSGYZDQOJUG4 . You are receiving this because you were mentioned.Message ID: @.***>

k9rdu commented 5 months ago

2.5 worked ( well as far as getting the app loaded. there's some flakiness with modules but that's probably our fault). We couldn't try 2.6 because there was no windows installation facility for it.

Lauriethefish commented 5 months ago

@k9rdu Sorry, gave you the wrong link, if you want 2.6.0, the link is here for the windows installer.

2.5.0 might have patched your app, however it uses an outdated modloader that won't load mods properly with quest 3. Is this the flakiness you're referring to?

k9rdu commented 5 months ago

Yes exactly. We'll give it another try tonight or tomorrow with 2.6.0. Thank you

On Mon, Jan 15, 2024, 4:32 PM Lauriethefish @.***> wrote:

@k9rdu https://github.com/k9rdu Sorry, gave you the wrong link, if you want 2.6.0, the link is here https://github.com/Lauriethefish/QuestPatcher/releases/download/2.6.0/QuestPatcher-windows.exe for the windows installer.

2.5.0 might have patched your app, however it uses an outdated modloader that won't load mods properly with quest 3. Is this the flakiness you're referring to?

— Reply to this email directly, view it on GitHub https://github.com/Lauriethefish/QuestPatcher/issues/137#issuecomment-1892785973, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXMZGZRARO46FASZBYKHJJTYOWOABAVCNFSM6AAAAAA7PFP2L6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSG44DKOJXGM . You are receiving this because you were mentioned.Message ID: @.***>

KEZALIT commented 5 months ago

hello i have an issue with launching QuestPatcher. When i try to open it with connected quest 3, it says:

QuestPatcher.Core.AdbException: chmod: chmod '/sdcard/Android/data/com.beatgames.beatsaber/files/mods/' to 0777: Operation not permitted

at QuestPatcher.Core.AndroidDebugBridge.RunCommand(String command, Int32[] allowedExitCodes) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 149 at QuestPatcher.Core.AndroidDebugBridge.RunShellCommand(String command, Int32[] allowedExitCodes) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 187 at QuestPatcher.Core.AndroidDebugBridge.RunShellCommands(List1 commands) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 174 at QuestPatcher.Core.AndroidDebugBridge.Chmod(List1 paths, String permissions) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 319 at QuestPatcher.Core.Modding.ModManager.CreateModDirectories() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\Modding\ModManager.cs:line 117 at QuestPatcher.Core.Modding.ModManager.LoadModsForCurrentApp() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\Modding\ModManager.cs:line 123 at QuestPatcher.Core.QuestPatcherService.RunStartup() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\QuestPatcherService.cs:line 129 at QuestPatcher.Services.QuestPatcherUiService.LoadAndHandleErrors() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher\Services\QuestPatcherUiService.cs:line 91

KEZALIT commented 5 months ago

hello i have an issue with launching QuestPatcher. When i try to open it with connected quest 3, it says:

QuestPatcher.Core.AdbException: chmod: chmod '/sdcard/Android/data/com.beatgames.beatsaber/files/mods/' to 0777: Operation not permitted

at QuestPatcher.Core.AndroidDebugBridge.RunCommand(String command, Int32[] allowedExitCodes) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 149 at QuestPatcher.Core.AndroidDebugBridge.RunShellCommand(String command, Int32[] allowedExitCodes) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 187 at QuestPatcher.Core.AndroidDebugBridge.RunShellCommands(List1 commands) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 174 at QuestPatcher.Core.AndroidDebugBridge.Chmod(List1 paths, String permissions) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 319 at QuestPatcher.Core.Modding.ModManager.CreateModDirectories() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\Modding\ModManager.cs:line 117 at QuestPatcher.Core.Modding.ModManager.LoadModsForCurrentApp() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\Modding\ModManager.cs:line 123 at QuestPatcher.Core.QuestPatcherService.RunStartup() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\QuestPatcherService.cs:line 129 at QuestPatcher.Services.QuestPatcherUiService.LoadAndHandleErrors() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher\Services\QuestPatcherUiService.cs:line 91

i already launch it before and installed some mods, but when i closed QuestPatcher and tried to open again it says this error

sabermonkeGT commented 4 months ago

I Got a critical error how do i fix that

ghost commented 4 months ago

I take it this thing is dead. Is there an alternate/manual way to do same as thing QuestPatcher?

Lauriethefish commented 4 months ago

QuestPatcher is not dead. Funnily enough, I don't get paid to do this, and free time comes and goes. I will write back with some suggestions in a little while.

reallycoo1 commented 4 months ago

Hello! Sorry, I'm having the same issue as the original post. Ignore the last chap - I really appreciate all the work you've put in - but I'm freaking out a little because I'm not sure what to do now?

Lauriethefish commented 4 months ago

This particular problem can nearly always be fixed by running the app as administrator :) Although, you did indicate in another post that you were getting an unhandled load error, which is not related to this issue. (this issue is when the load error causes an outright crash instead of being handled, which shouldn't be possible but I digress)

If you are getting an unhandled load error, it would be best if you could copy the contents of the error message to that issue so I can look at it and figure out what the actual problem is.

Ka-Ekim commented 4 months ago

Hey, i see you responded 3 days ago that this issue could typically be resolved by running as admin. I have run the installer as well as the application as administrator and am still running into the border-outline then crash issue. Hoping for advice (Not as savy as some others here, i can give more info if told how to get it)

Update: It seems to work when i install the stand-alone up until the moment i tell the quest3 to allow this computer to access its files. At which point the application closes and has the same issue when trying to open again.

Fairy1234556789 commented 3 months ago

QuestPatcher.Core.AdbException: [ 0%] /data/app/~~BWZIKSEae7NhAXLdUcmzoA==/com.beatgames.beatsaber-aX44ues3S6H2NwoqEg8UbQ==/base.apk

at QuestPatcher.Core.AndroidDebugBridge.RunCommand(String command, Int32[] allowedExitCodes) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 150 at QuestPatcher.Core.AndroidDebugBridge.DownloadFile(String name, String destination) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 188 at QuestPatcher.Core.AndroidDebugBridge.DownloadApk(String packageId, String destination) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 202 at QuestPatcher.Core.InstallManager.LoadInstalledApp() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\InstallManager.cs:line 137 at QuestPatcher.Core.QuestPatcherService.RunStartup() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\QuestPatcherService.cs:line 131 at QuestPatcher.Services.QuestPatcherUiService.LoadAndHandleErrors() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher\Services\QuestPatcherUiService.cs:line 94

Unloading error no version opens on win 11 but 2.60 then when u do get it open this mess happens

Fairy1234556789 commented 3 months ago

This particular problem can nearly always be fixed by running the app as administrator :) Although, you did indicate in another post that you were getting an unhandled load error, which is not related to this issue. (this issue is when the load error causes an outright crash instead of being handled, which shouldn't be possible but I digress)

If you are getting an unhandled load error, it would be best if you could copy the contents of the error message to that issue so I can look at it and figure out what the actual problem is.

Done copied pasted. Also sidequest works perfectly fine just this app causing issues.

Fairy1234556789 commented 3 months ago

Loading app ID from legacy appId.txt Saving config file . . . Java version on "21.0.2" 2024-01-16 LTS

Platform-tools already installed Creating temporary directory . . . Pulling APK from Quest to check if modded . . . An unhandled error occured while loading QuestPatcher QuestPatcher.AdbException: adb: error: failed to get feature set: device offline

at QuestPatcher.DebugBridge.RunCommandAsync(String command) in D:\a\QuestPatcher\QuestPatcher\src\DebugBridge.cs:line 87 at QuestPatcher.ModdingHandler.CheckInstallStatus() in D:\a\QuestPatcher\QuestPatcher\src\ModdingHandler.cs:line 242 at QuestPatcher.MainWindow.OnLoadInternal() in D:\a\QuestPatcher\QuestPatcher\src\MainWindow.axaml.cs:line 157 at QuestPatcher.MainWindow.OnLoad(Object sender, EventArgs args) in D:\a\QuestPatcher\QuestPatcher\src\MainWindow.axaml.cs:line 122

why us this the only way to mod beat saber! So frazzled now installed every version none work im going back to the oldest beat saber that supports the easy BMBF way cause this app is frustrating especially for a disable user.

qe201020335 commented 3 months ago

@Fairy1234556789 Hey, looking at your logs. Your issue is not related to the avalonia crash on start issue.

I see in the logs it has the error error: failed to get feature set: device offline. You can try using adb kill-server command to stop all adb instance and try again. It also seems the USB connection is not stable, and it is disconnecting. Maybe you can try another USB port?

Also, going back to an older version of Beat Saber won't help. As long as you are using the newer version firmware or Quest 3, BMBF will not work.

Fairy1234556789 commented 3 months ago

@Fairy1234556789 Hey, looking at your logs. Your issue is not related to the avalonia crash on start issue.

I see in the logs it has the error error: failed to get feature set: device offline. You can try using adb kill-server command to stop all adb instance and try again. It also seems the USB connection is not stable, and it is disconnecting. Maybe you can try another USB port?

Also, going back to an older version of Beat Saber won't help. As long as you are using the newer version firmware or Quest 3, BMBF will not work.

Only have one port on this steam deck which is usb c still odd this program wont work but sidequest detects & transfers with no issues. Yea found that bmbf doesnt work thats fine im done with meta beat saber moving to pc beat saber. This steam deck is on win 11 & been able to handle other vr games. Pc beat saber easy to mod unlike meta quest version. I just wanted custom songs as I hate the remix & version in the app...

qe201020335 commented 3 months ago

@Fairy1234556789 quite odd that other programs such as side quest can use adb with no issue but our adb instance is throwing errors.

Vxbess commented 2 months ago

QuestPatcher.exe_240429_173324.dmp I have no idea how to find the version but heres the dmp