tari-project / tari-universe

Other
0 stars 3 forks source link

Fix app crash without write access while reading config.toml on OSX #71

Closed MCozhusheck closed 3 months ago

MCozhusheck commented 3 months ago

App crashes while trying to run it sand-boxed VM with no write access throwing error:

thread 'tokio-runtime-worker' panicked at src/wallet_daemon.rs:24:59:
called `Result::unwrap()` on an `Err` value: IoError(Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

caused by let cfg = load_configuration("config.toml", true, &cli).unwrap();

It most likely caused by incorrect path and load_configuration creates new one as explained in the description: Loads the configuration file from the specified path, or creates a new one with the embedded default presets if it does not. This also prompts the user.

leet4tari commented 3 months ago

Just to be clear, the tari-universe binary was run from inside of the OSX DMG - /Volumes/tari-universe/tari-universe.app/Contents/MacOS/tari-universe, without been installed. Might be the reason for the Read-only file system, thou I don't know why the application would want to write anything in this path.

leet4tari commented 3 months ago

Installed the DMG and then ran the /Applications/tari-universe/tari-universe.app/Contents/MacOS/tari-universe and this creates config.toml and log4rs.yml in thsi folder.

Screenshot 2024-06-12 at 12 38 04