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

[2.2.0-beta] Error - Missing 'data/InstallationOverride.json' on Fresh Install #1

Closed
snepderg opened this issue Nov 24, 2024 · 19 comments
Labels
bug Something isn't working

Comments

@snepderg
Copy link

snepderg commented Nov 24, 2024

Trying to clean install Rod n' Mod after having an update loop occur with the previous version. Attempting to launch the application results in this error: No such file or directory: data/installationOverride.json

Screenshot 2024-11-24 120303

Using:

  • Rod n Mod Version: 2.2.0-beta (Installer/Standalone)
  • OS: Windows 10 Home 22H2

This is just a guess, but maybe this file was already present for an update, causing an error for a fresh install?

Here is the log up until the error:

2024-11-24 12:07:42,721 - rodnmod:fishfinder INFO:  Starting the Webfishing installation search...
2024-11-24 12:07:42,722 - rodnmod:fishfinder WARNING:  Webfishing installation not found.
2024-11-24 12:07:45,302 - rodnmod:fishfinder INFO:  HTTP Request: GET https://api.github.com/repos/nyxical420/rodnmod/releases?per_page=1 "HTTP/1.1 200 OK"
2024-11-24 12:07:46,023 - rodnmod:fishfinder INFO:  Starting the Webfishing installation search...
2024-11-24 12:07:46,024 - rodnmod:fishfinder WARNING:  Webfishing installation not found.
2024-11-24 12:07:46,024 - rodnmod:fishfinder INFO:  Detected Webfishing installation path: None
2024-11-24 12:07:46,024 - rodnmod:fishfinder INFO:  Installation path is None. Using fallback installation path instead!
@snepderg
Copy link
Author

snepderg commented Nov 24, 2024

snip

sigh I should have read this better, looks like there's a hardcoded path in here to D:\Projects (Code Stuff) ...

@snepderg snepderg changed the title [2.2.0-beta] Installer Error - Missing 'data/InstallationOverride.json' on Fresh Install [2.2.0-beta] Error - Missing 'data/InstallationOverride.json' on Fresh Install Nov 24, 2024
@snepderg
Copy link
Author

snepderg commented Nov 24, 2024

I would like to note that I attempted to build from source on this version, but it couldn't find winupdate.bat or 7zr.exe

I will grab those from the standalone and update you on how that goes.

Edit: Okay, so that continues, but it looks like cx_freeze is trying to access System32... Misconfigured path?

Edit 2: Well I know that on Windows at least, the application relies on Microsoft Edge Webview2, is that what's happening here? I'd appreciate some context as having to run the build as administrator is sketching me out.

@nyxical420
Copy link
Owner

I would like to note that I attempted to build from source on this version, but it couldn't find winupdate.bat or 7zr.exe

Sorry, i apparently put them inside the gitignore for some reason, they are available now!

Okay, so that continues, but it looks like cx_freeze is trying to access System32... Misconfigured path?

Not really sure why it's doing that.

Well I know that on Windows at least, the application relies on Microsoft Edge Webview2, is that what's happening here? I'd appreciate some context as having to run the build as administrator is sketching me out.

I don't think you should be even running the build as admin? you can just run them normally without having to.

@nyxical420
Copy link
Owner

nyxical420 commented Nov 25, 2024

for the main issue, the file should honestly be available at launch as i am checking if the installationOverride.json is missing or not.
you can locate this at the bottom of main.py

    # path override
    if not path.exists("data/installationOverride.json"):
        with open("data/installationOverride.json", "w") as file:
            default_config = {
                "installationPath": ""
            }
        with open("data/installationOverride.json", 'w') as file:
            dump(default_config, file, indent=4)

EDIT: could be that its being called early than its supposed to be? i could probably run the installation check inside if __name__ == "__main__":

@snepderg
Copy link
Author

snepderg commented Nov 25, 2024

I don't think you should be even running the build as admin? you can just run them normally without having to.

I see.. Well, I suppose I can specify what steps I took to see if something went awry with my process.

  1. Download latest source
  2. Unzip in %LOCALAPPDATA%\Programs\rodnmod-main
  3. Open Powershell, CD into the directory
  4. Execute python -m venv .venv
  5. Execute cd .venv\Scripts; .\activate
  6. Execute python setup.py build

After testing with the .gitignore update, it still raises an "access is denied" error (Which I suppose is to be expected because that happened when I borrowed 7zr and the bat file from the releases standalone archive).

(.venv) PS C:\Users##USER##\AppData\Local\Programs\rodnmod-main> python setup.py build
C:\Users\drago\AppData\Local\Programs\rodnmod-main.venv\lib\site-packages\setuptools\dist.py:337: InformationOnly: Normalizing '2.2.0-beta' to '2.2.0b0'
self.metadata.version = self._normalize_version(self.metadata.version)
running build
running build_exe
C:\Users##USER##\AppData\Local\Programs\rodnmod-main.venv\lib\site-packages\psutil\tests\test_system.py:518: SyntaxWarning: "is not" with a literal. Did you mean "!="?
assert percent is not -0.0
error: [WinError 5] Access is denied: 'C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft'

@nyxical420 nyxical420 added the bug Something isn't working label Nov 25, 2024
@nyxical420
Copy link
Owner

nyxical420 commented Nov 25, 2024

I don't think you should be even running the build as admin? you can just run them normally without having to.

I see.. Well, I suppose I can specify what steps I took to see if something went awry with my process.

  1. Download latest source
  2. Unzip in %LOCALAPPDATA%\Programs\rodnmod-main
  3. Open Powershell, CD into the directory
  4. Execute python -m venv .venv
  5. Execute cd .venv\Scripts; .\activate
  6. Execute python setup.py build

After testing with the .gitignore update, it still raises an "access is denied" error (Which I suppose is to be expected because that happened when I borrowed 7zr and the bat file from the releases standalone archive).

(.venv) PS C:\Users##USER##\AppData\Local\Programs\rodnmod-main> python setup.py build C:\Users\drago\AppData\Local\Programs\rodnmod-main.venv\lib\site-packages\setuptools\dist.py:337: InformationOnly: Normalizing '2.2.0-beta' to '2.2.0b0' self.metadata.version = self._normalize_version(self.metadata.version) running build running build_exe C:\Users##USER##\AppData\Local\Programs\rodnmod-main.venv\lib\site-packages\psutil\tests\test_system.py:518: SyntaxWarning: "is not" with a literal. Did you mean "!="? assert percent is not -0.0 error: [WinError 5] Access is denied: 'C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft'

I don't think you're supposed to be building Rod n' Mod inside %LOCALAPPDATA%. Please move that somewhere else like your desktop.

@snepderg
Copy link
Author

snepderg commented Nov 25, 2024

I don't think you're supposed to be building Rod n' Mod inside %LOCALAPPDATA%. Please move that somewhere else like your desktop.

Hmm. Well I am truly confused, I moved it outside of a system folder (To my D:\ drive) and it still tries to access C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Local\\Microsoft

I'll go ahead and troubleshoot best I can on my end, and try to figure out why cx_freeze is trying to access a restricted path.

Thank you for your time.

@SpaceBoyHmm
Copy link

would just like to chime in and add that i'm also experiencing an update loop - unsure why this is

@nyxical420
Copy link
Owner

nyxical420 commented Nov 25, 2024

@snepderg after getting my breakfast and all, i realized what you're doing wrong. (i think)

you are activating the venv with cd .venv\Scripts; .\activate instead of .\.venv\scripts\activate in the current working directory where the setup.py script is.

otherwise im not quite sure whats happening at all

@snepderg
Copy link
Author

snepderg commented Nov 25, 2024

@snepderg after getting my breakfast and all, i realized what you're doing wrong. (i think)

you are activating the venv with cd .venv\Scripts; .\activate instead of .\.venv\scripts\activate in the current working directory where the setup.py script is.

otherwise im not quite sure whats happening at all

So to be clear, I'm supposed to invoke venv from the project root dir right?
cd D:\Applications\RodNMod\rodnmod-main
.\.venv\scripts\activate
python setup.py build

I tried it with the commands from the README in the unzip directory:

  1. python -m venv .venv; .\.venv\Scripts\Activate; pip install -r requirements.txt
    1a. (wait for (.venv) to appear)
  2. python setup.py build

Unfortunately, nothing has changed.

@nyxical420
Copy link
Owner

hello, @snepderg & @SpaceBoyHmm are you able help me test out this version if this version fixes the issues you guys are experiencing?

https://github.com/nyxical420/rodnmod/releases/download/2.2.0-beta/rodnmod-standalone-pyinstTest.zip

@snepderg
Copy link
Author

hello, @snepderg & @SpaceBoyHmm are you able help me test out this version if this version fixes the issues you guys are experiencing?

https://github.com/nyxical420/rodnmod/releases/download/2.2.0-beta/rodnmod-standalone-pyinstTest.zip

@nyxical420 This works out of the box for me, although I will note that GDWeave and Pyinstaller get Windows Defender a bit riled up.
NotNite/GDWeave#25

ApplicationFrameHost_4hW8beeQfh

@nyxical420
Copy link
Owner

ah, that's nice to know! with the antivirus in mind, i may have to re-introduce obfusicating the script to pyarmor then compile it to hopefully prevent antivirus detection.

@snepderg
Copy link
Author

Yup, the only thing I've noticed so far is that it doesn't like restarting itself when I add the override path, gives me a popup about failing to delete a temp directory, and the updater just shows a white box.
rodnmod_7ml90oUTUS

@nyxical420
Copy link
Owner

Yup, the only thing I've noticed so far is that it doesn't like restarting itself when I add the override path, gives me a popup about failing to delete a temp directory, and the updater just shows a white box. rodnmod_7ml90oUTUS

replicated, will try to find a fix!

image

@nyxical420
Copy link
Owner

i don't think that i'm able to restart rodnmod like the way i used to do it via cx_Freeze. i will be removing the functionality until i figure out a solution for this.

@nyxical420
Copy link
Owner

it will still be restartable when its not compiled, though

@nyxical420
Copy link
Owner

nyxical420 commented Nov 25, 2024

nevermind, i may have found a solution!
did not work as i expected it to unfortunately :(

@snepderg
Copy link
Author

No worries, thank you for taking the time to look into this for me, I appreciate the swift responses ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants