argon-rbx / argon

Argon - Full featured tool for Roblox development
https://argon.wiki
Apache License 2.0
66 stars 4 forks source link

[MacOS] Argon can only be executed as root #81

Closed edrf12 closed 4 days ago

edrf12 commented 1 month ago

I have installed the cli using the file downloaded from GitHub, it was placed in /usr/local/bin/argon and has the following permissions

-rwxr-xr-x@ 1 root  wheel  18683352 Aug  9 15:52 /usr/local/bin/argon*

Running argon serve -vvvv (File paths truncated)

WARN: Failed to load config file: No such file or directory (os error 2) [argon:51]
WARN: Failed to verify Argon installation: unsupported shell [argon:56]
TRACE: Initializing VFS [argon::core:40]
DEBUG: Update check already performed within the last hour [argon::updater:154]
INFO: Update check completed successfully! [argon:62]
TRACE: Snapshotting root project [argon::core:44]
TRACE: Creating snapshot of [...]/default.project.json [argon::middleware:146]
DEBUG: Stats already synced within the last hour or too few stats to sync [argon::stats:144]
INFO: Stat tracker initialized successfully! [argon:69]
TRACE: Creating snapshot of [...]/src/ReplicatedFirst [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/ReplicatedStorage [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/ServerScriptService [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/ServerScriptService/MatchmakingTask [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/ServerScriptService/MatchmakingTask/MatchmakingServer [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/ServerScriptService/MatchmakingTask/MatchmakingServer/Match.luau [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/ServerScriptService/MatchmakingTask/MatchmakingServer/KillerProbability.luau [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/ServerScriptService/MatchmakingTask/.data.json [argon::middleware:146]
TRACE: Snapshot of [...]/src/ServerScriptService/MatchmakingTask/.data.json not created: no middleware matched [argon::middleware:154]
TRACE: Creating snapshot of [...]/src/ServerScriptService/BankingServer [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/ServerStorage [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/StarterGui [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/StarterPack [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/StarterPlayer/StarterCharacterScripts [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/StarterPlayer/StarterPlayerScripts [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/Workspace [argon::middleware:146]
TRACE: Creating snapshot of [...]/src/Workspace/.data.json [argon::middleware:146]
TRACE: Snapshot of [...]/src/Workspace/.data.json not created: no middleware matched [argon::middleware:154]
TRACE: Building Tree and Queue [argon::core:53]
TRACE: Starting Processor [argon::core:59]
TRACE: Core initialized successfully! [argon::core:69]
WARN: Port 8000 is already in use, using 8001 instead!
ERROR: Command execution failed: Permission denied (os error 13)

Running as root does work but it complicates my workflow since files that are synced back will be owned by root preventing write by my user.

DervexDev commented 1 month ago

Looks like this issue is caused by the actix-web crate, but I don't think this is the actual problem.

Argon automatically moves/copies its binary to the ~/.argon/bin/argon when it gets first launched. Could you verify that the proper executable is used? Just run whereis argon or to be sure remove ~/.argon/bin directory, run Argon, and check whether you get Installation completed! Do you want to remove this executable? prompt.

edrf12 commented 1 month ago

My argon never does that, I've just deleted the ~/.argon folder, and ran ./argon (in downloads folder), all it does is say what commands are available. The folder is created again but it never moves itself there, even when run as root.

edrf12 commented 1 month ago

I just moved argon to the ~/.argon/bin folder and I think it now works fine, but installation is completely broken, if needed I can open another issue for that

DervexDev commented 1 month ago

I daily drive macOS and have never had a similar issue so I don't think the installation process is broken. However, on your side, it clearly fails (see the second line of the logs - unsupported shell error) so it appears to be caused by the shell you use. Could you give me its name?

edrf12 commented 1 month ago

My main shell is fish, but I tried running argon on bash as well and it didn't install either. Maybe it would have worked fine if I had used zsh?

DervexDev commented 1 month ago

Yeah fish is not supported, I'm going to add list of the supported shells to the wiki.

You can give zsh a try though bash should have worked just fine. Could you check if Argon throws the same unsupported shell error when using bash and zsh?

edrf12 commented 1 month ago

I will try it but I’d have to serve a project to serve a project to see the error since verbose is not available without a command.

Message ID: @.***>

DervexDev commented 1 month ago

I'm not sure what you mean. Just run argon serve -vvvv on any project.

DervexDev commented 4 days ago

I'm closing this issue as it's no longer relevant but feel free to re-open it.