typicode / hotel

🏩 A simple process manager for developers. Start apps from your browser and access them using local domains
MIT License
9.97k stars 426 forks source link

Big Sur - LaunchAgents - Load error 5: input/output error #369

Open esbanarango opened 3 years ago

esbanarango commented 3 years ago

I upgraded to Big sur and now I'm having this issue when doing hotel start

Load failed: 5: Input/output error
akbortoli commented 3 years ago

I've got the same issue, running hotel start gives me Load failed: 5: Input/output error on Big Sur.

Node: 15.5.1 Npm: 7.3.0 Hotel: 0.8.7

pgardella-globant commented 2 years ago

I have this error as well, but I was able to narrow it down to a single server which hotel was trying to start (which I'll call "wiki"). Looking in ~/.hotel/daemon.log, I saw the app which was erroring. Once I recognized the server, I removed it (hotel rm wiki) from the hotel config, and hotel started correctly.

When I run the "hotel start wiki" from the desktop for that server, I got an error from Node. So the error is not with hotel, but the specific server.

It may or not be related, but I also ran this during debugging, but I don't think that altered anything. launchctl unload ~/Library/LaunchAgent/hotel.plist launchctl load ~/Library/LaunchAgent/hotel.plist

pgardella-globant commented 2 years ago

Correction: I still get this error. Hotel must start and then crash, so you only get the error when you try to start it again. Then I see:

12:54:50 - Watching /Users/patrick.gardella/.hotel/servers
create /Users/patrick.gardella/.hotel/daemon.pid 9682
node:internal/fs/utils:879
  throw new ERR_INVALID_ARG_TYPE(
  ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (9682)
    at Object.writeFileSync (node:fs:2148:5)
    at Object.create (/Users/patrick.gardella/.nvm/versions/node/v16.14.0/lib/node_modules/hotel/lib/pid-file.js:18:13)
    at Object.<anonymous> (/Users/patrick.gardella/.nvm/versions/node/v16.14.0/lib/node_modules/hotel/lib/daemon/index.js:20:9)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'ERR_INVALID_ARG_TYPE'

I also removed the .hotel folder entirely to force a reinstallation.

Node: 16.14.0 Npm: 8.5.4 Hotel: 0.8.7

ArjunAce commented 1 year ago

I am on Big Sur too, got the same error when I was on Node 14 (v14.20.0). When tried with Node 12 (v12.22.0) it worked correctly.