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

Add run as admin suggestion for Windows #78

Merged
merged 2 commits into from
May 31, 2023

Conversation

HotaruBlaze
Copy link
Contributor

If you are running Discord as administrator, NSO-RPC will fail to connect to the discord IPC pipe due to windows permissions.

I attempted to catch the '[WinError 5] Access is denied' exception at client/cli.py#L50-L56, as it returns an IOError exception, however I had multiple timing and scope(?) issues around that, even trying to add handler and extra stuff around a simple boolean had consistency issues, reporting not connected to discord, then afterwards saying we are fine etc.

This solution's main issue is that its assuming on windows, the only reason for NSO-RPC to have issues connecting to discord is because Discord is running with Admin privileges.

Note: This will give a false positive telling the user to try running NSO-RPC with Admin if Discord is not running.

@HotaruBlaze
Copy link
Contributor Author

Forgot to add the preview of the change, when its unable to connect to discord.
6Djz8hGiQJEnL0Fe

@MCMi460 MCMi460 merged commit bf4ede1 into MCMi460:development May 31, 2023
@MCMi460
Copy link
Owner

MCMi460 commented May 31, 2023

I made some changes upstream that should solve those false positives (instead editing the message to display the actual error under those circumstances). Thank you for noticing this and working to fix it so quickly!

@HotaruBlaze HotaruBlaze deleted the adminNotice branch April 29, 2024 21:17
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

Successfully merging this pull request may close these issues.

2 participants