Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Check for Other Instances" Handle was NOT closed #59

Open
Zoxjib opened this issue Mar 15, 2025 · 18 comments
Open

"Check for Other Instances" Handle was NOT closed #59

Zoxjib opened this issue Mar 15, 2025 · 18 comments

Comments

@Zoxjib
Copy link

Zoxjib commented Mar 15, 2025

Not sure what it means or why it happens to some of my loaders. I just click any key to continue, load the client normally and everything works fine.
It just requires a few extra clicks in the terminal

@Zoxjib
Copy link
Author

Zoxjib commented Mar 15, 2025

For reference I am using TinyMod on all my loaders, but the error only appears on a couple of them.

@shupershuff
Copy link
Owner

What OS are you running? Guessing Windows 11 x64?

Does it come up with this error consistently or just sometimes?

@Zoxjib
Copy link
Author

Zoxjib commented Mar 16, 2025

Win 11 x64 yeah. I get it consistently 2 or 3 times when launching a total of 8 accounts. Sometimes it happens twice in a row, other times there's a gap in between.

@shupershuff
Copy link
Owner

Are your games installed on an SSD or a harddrive?

@shupershuff
Copy link
Owner

shupershuff commented Mar 16, 2025

On line 3645 of d2loader.ps1 (open the file in a text editor), change:

Start-Sleep -milliseconds 1500 #give D2r a bit of a chance to start up before trying to kill handle
to
Start-Sleep -milliseconds 3000 #give D2r a bit of a chance to start up before trying to kill handle

and see if that makes much of a difference.

@Zoxjib
Copy link
Author

Zoxjib commented Mar 16, 2025

My game's on NVME SSD and I have all data extracted with CascViewer, using -direct -txt with the main client and -mod tiny -txt with the 7 loaders.

I raised it from 1500 to 2500 and the issue resolved, but a different (minor) issue appeared instead.

Now the subsequent game clients load up in the background, so I have to manually switch to them in order to click-through to connect and allow the script to load the next client.

@shupershuff
Copy link
Owner

Yea that's the drawback to using tokens unfortunately. You have to get to character select screen before you can start the next instance due to how the game read/writes the token from the registry.

As I don't want the script to be sending any clicks/keypresses to the game, I won't automate clicks to skip videos and get to char screen.

I would recommend having a look at the RememberWindowsLocations feature.

@Zoxjib
Copy link
Author

Zoxjib commented Mar 17, 2025

Yeah I discovered that my accounts were made in EU don't like letting me login with Parameter when I'm not in EU. Luckily the token method seems to work great so far.

@shupershuff
Copy link
Owner

I have one account like that. You can have it so the script connects with parameters by default except when connecting to NA or Asia:
Change your auth method to parameter in accounts.csv and change this option in config.xml
Image

@Zoxjib
Copy link
Author

Zoxjib commented Mar 17, 2025

All my accounts were created in EU and still listed as in EU, I'm too scared contacting Blizzard to ask support to manually update the region... I use all of them with token now.

@shupershuff
Copy link
Owner

How do you mean "still listed as in EU"?

@Zoxjib
Copy link
Author

Zoxjib commented Mar 18, 2025

If you login to the account on the battle.net website and check it's settings, it'll have whatever country you used to register as. Blizzard doesn't let you change your country without manually contacting them (it affects which currency is used in the store and probably they need it for metrics/taxes).

I'd have to contact them 8 different times.... :)

@shupershuff
Copy link
Owner

Oh so this screen

Image.

I don't think it has anything to do with settings on this page to be honest. I think it's some kind of infrastructure (database and/or trust) issue. The issue has only been happening to people since around December 2023.

@Zoxjib
Copy link
Author

Zoxjib commented Mar 18, 2025

Oh, I'm completely assuming what the issue might be....

It's just a coincidence that my 8 EU accounts worked fine while I was logging into them from EU and now that I'm in a different location (after December 2023...), the same accounts are requiring the token login method.

I'm glad the token method exists although it does seem like a sort of place-holder that they might get rid of at any moment.

@shupershuff
Copy link
Owner

The token method is actually what the Blizzard launcher uses, albeit we're using a token that doesn't appear to expire (tokens issued via the bnet client don't last very long).

For the issue that was raised, I've made a couple tweaks to the bit that calls the killhandle function so that instead of throwing an error it will wait for half a second and try up to 3 times before erroring out. It will be in the next release.

The total delay will be 2500ms (1000ms initial delay + 3x 500ms delays for each attempt), suggest you change the edit you made from 3000 to 2500 and ensure it works fine. If not let me know :)

@Zoxjib
Copy link
Author

Zoxjib commented Mar 18, 2025

Yeah I've set it to 2500 like you suggested before the edit. It worked out perfect.

@shupershuff
Copy link
Owner

If you don't mind, would I be able to use you for testing the next release to make sure this part works for you?

@Zoxjib
Copy link
Author

Zoxjib commented Mar 18, 2025

Sure. I can test logging in with my 8 accounts, but as I mentioned in one of the Discussion threads, I can't really play much because it causes my PC to freeze.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants