elite-vr-cockpit icon indicating copy to clipboard operation
elite-vr-cockpit copied to clipboard

Cryptic FileNotFoundException error when user has not run Elite Dangerous before running the overlay

Open Dexhort opened this issue 3 years ago • 6 comments

Hello, When I launch CockpiVR, I have the folowing message : FileNotFoundException, I know it's because my elite dangerous isn't install on my C:\ storage, but I don't know how to change the file searching.

if some one can help me. Thanks.

Dexhort avatar Dec 03 '20 22:12 Dexhort

you should provide info which file its not finding.

mikluhomaklay avatar Dec 04 '20 22:12 mikluhomaklay

This file isn't found. Frontier Developments\Elite Dangerous\Options\Graphics\GraphicsConfigurationOverride.xml

Dexhort avatar Dec 06 '20 16:12 Dexhort

That is the full path? Interesting, it looks like the overlay failed to detect your AppData\Local folder.

This is a worse issue than you think. I am explicitly using Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) instead of hardcoding C: or using the UserProfile env, specifically to support users who have a custom user folder location not on their C: drive.

Can you show me more about your system's env variables and how your user folder, documents, etc... are customized?

I'm already using what I understand to be the proper way of discovering that path. So we need to figure out what kind of special case your machine is and what kind of fallback I need to use on machines where this path detection fails.

dantman avatar Dec 06 '20 21:12 dantman

I had this error too when first time started EDVC before actually playing the game without. Ive fixed it by creating that file myself with notepad and googled for its default content.

<?xml version="1.0" encoding="UTF-8" ?>
<GraphicsConfig />

i guess you need to run the game at least once so it creates that file once it has auto configured the graphics.

@dantman, probably its not the full path, he ommited the C: \User\username\AppData i guess for privacy reasons. I used to have same error, the file was missing for me and therefore it wasn't finding it. It doesn't exist right after installation, you need to run the game at least one time and to let it auto configure graphic options.

I suggest to catch that exception and print an error message in the log suggesting to start the game at least once to let it create it.

mikluhomaklay avatar Dec 10 '20 12:12 mikluhomaklay

I'll try this Miklu.

Oh, and sorry, I just read your message Dantman and I have ommited the first part of the path, it correctly display C:\user\username\AppData. After searching more deeper in my computer files, I have found that the path is correct but like Miklu said, the file doesn't exist (I have freshly reinstall my game and never run it normaly).

Sorry for taking your time and thank you for the help (I will set it close when I have the time to try your advice).

Dexhort avatar Dec 10 '20 15:12 Dexhort

I think I should add an extra warning about this when I can't find ED's settings folder.

dantman avatar Dec 11 '20 21:12 dantman