TheDiscordian / disco-chat

A peer-to-peer messaging app.
MIT License
22 stars 2 forks source link

App doesn't start on Mac OS Ventura 13.3.1 (a) #36

Open coreagile opened 1 year ago

coreagile commented 1 year ago

I just downloaded the disco-chat app and it won't start. Here's what happens when I try to run it from the command line:

% ./disco_chat thread 'main' panicked at 'Error reading file: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/main.rs:93:56 note: run with 'RUST_BACKTRACE=1' environment variable to display a backtrace

Running Ventura 13.3.1 (a)

TheDiscordian commented 1 year ago

Thanks for the report, sorry it didn't work out of the box for you... Interesting, so it looks like it's passed the point of apparently initializing the repo ... yet it can't find the repo directory. I figured it would have crashed sooner than that in that scenario.

Does ~/Library/Application\ Support/disco-chat/ exist? I'm assuming it doesn't. If it does exist, does ~/Library/Application\ Support/disco-chat/config also exist? This is what it's complaining it can't find (sorry for the bad error).

The flow it does on startup is the following:

  1. Check if the data directory (~/Library/Application\ Support/disco-chat/) exists, if not, create one and initialize it using internal Kubo node.
  2. Configure the node using Kubo
  3. Grab your keys from DATA_DIR/config

It's failing on that third step right now. I'm wondering if maybe the directory exists, but the config file doesn't. If that's the case I wonder if deleting the directory would resolve it.

TheDiscordian commented 1 year ago

I wonder if the kubo binary is unable to make the directory, and I probably don't have any code to detect that issue. If that's the case it sounds like a permissions error, and I should be able to detect that and return a proper error.

coreagile commented 1 year ago

The directory ~/Library/Application\ Support/disco-chat/ does not exist -- not sure why it would have a permission error?