Closed AngelusMortiel closed 2 years ago
Thanks, I already submitted a new version with a fix to ESOUI that should be accepted soon. You can also download the latest release manually if you don't want to wait.
It appears that this issue persists. I need to do some more testing to figure out what causes it.
In the meantime, @whisperity any clue what's going on here? In previous releases, I learned that not providing the DiscordStatus.exe.config
file causes this error, but that's been remedied in the latest release. It seems to raise the error at InstallAddon()
now.
One fix I've observed for this issue is to move the Client
folder somewhere else, such as your Desktop. Sorry for the inconvenience.
System.UnauthorizedAccessException: Access to the path 'DiscordStatusClient.exe' is denied.
Please confirm, but is DiscordStatusClient.exe
the name of the program that runs ESO_Discord_RichPresence_Client.Main
?
move the
Client
@Medallyon If the move is indeed a fix, then it should be a simple permission error. It's been a long while since I used Windows (and C# for that matter), but there is a crucial distinction between how files are handled on Windows as opposed to how they are handled on more POSIX-friendly operating systems like Linux.
The addon binary is trying to replace itself. And it can't, because of the fact that the addon binary is running (the .exe
is currently loaded into memory), there is an implicit lock on the file -- it can't be written, or renamed, or deleted, whatsoever. Conversely, on Linux, when you open a binary (or any file, really!), the running process will only hard link the content in the memory. But you can delete even binaries currently running... the actual data from the disk won't actually be deleted until the last hard link dies... But if you replace, let's say /bin/medallyon
with a new binary, subsequent processes will run that, while old ones still running the old binary will keep it alive. Not on Windows... the file path of the command is sacrosanct, and until every process that had opened a handle (I think that's the Windows terminology) to that file entry shut down, it can't be meddled with...
(I often run into the same issue when working on papers on Windows -- if I open a rendered PDF in a PDF viewer, it will have the file open and thus write-locked. And then the document compiler (LaTeX) cannot create a new PDF, even if I change contents and click "Compile" again.)
This is why you conventionally see things like "Mozilla Firefox Update" being its own .exe
, sometimes even running as a system service... I think even Steam has its own dedicated "update" binary (even if temporarily!) when the application image is updated, and not just packaged content.
Please confirm, but is DiscordStatusClient.exe the name of the program that runs ESO_Discord_RichPresence_Client.Main?
Yes it is, actually.
It does get rid of the whole DiscordStatus
directory, including the addon files one directory up. I don't know why it would be attempting to replace itself. I'm having trouble trying to debug this because of the inherently different locations of the Debug
binary when debugging from Visual Studio, and the binary that's part of the ESO/AddOns folder.
It'd be great if there was a way for me to debug the client FROM the ESO/AddOns folder, but I have no idea how to do that.
I figured out that I can change the output directory in the Project Settings in order to debug the current configuration. This way I was able to identify the underlying issue, which was that the Client was attempting to update the Addon files to the latest version by deleting the parent directory. It now replaces the corresponding files appropriately with Release 1.0.1.
The last known good version was 0.4.4.
I try to run 0.4.7 and receive an unhandled exception error "Access to the path 'DiscordStatusClient.exe' is denied.", after which all files are purged from the DiscordStatus add-on folder except the client executable itself.
Below is the exception details, if it helps.