#Nikolas MacOS Gremlins
1 messages ยท Page 1 of 1 (latest)
Okay @solid river - I'm moving us in here because this is gonna clutter the main room pretty bad.
Ok
please perform the following (we can re-enable it afterward, i just want to confirm this isn't the case.)
From the apple menu, click system preferences
security and privacy
firewall tab
"stop"/"turn firewall off"
back in the terminal where we used "Open FoundryVTT", press cmd+.
this should force quit the electron app
The firewall is already off (which is good to know... btw)
If this gets any weirder i'm gonna need whiskey.
Alright, go ahead and quit the electron app as directed.
cmd+. doesn't force quit the program (the terminal is not busy with it) but I can force quit it another way if you want
yeah, force quit it the way i directed you previous then
Done
Are you on a m1 mac?
Yes.
Sorry, I should have mentioned that earlier. I know this sometimes causes headache.
We've got people running mac M1 without issue
Foundry was running fine
did you change anything between it last working fine and now ?
When you say was----what happened between then and now? can you think of anything that might have changed significantly? OS updates? attempted to update to v9?
Yeah, I keep thinking but nothing particular comes to mind. I never installed Foundry V9. I am not entirely sure if there was a (small) OS update in the meantime.
How do you feel about installing the "Homebrew" package manager?
If it helps. I was rather thinking to back up my stuff and try to delete every trace of Foundry. Then reinstall
I've got miniconda, if that's of any help
Pretty sure unsoluble took you through a delete and reinstall
I did it before I posted here.
On the off chance it's already installed, from a terminal do
node --version
Nope
Cool. Ground up then.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Before we do this. What's the plan? And will it leave clutter?
It shouldn't leave any clutter, the intent is to use homebrew to install NodeJS 14 and try to directly launch foundry VTT using node instead of electron
Alright.
once that's done
it should be as simple as doing
brew install node@14
if it says zsh: command not found: brew let me know
It's still installing. But I do have zsh
that first install will take a few minutes
Gotta be done by now
I've got a slow wifi, but I don't want to swich to cable mid-download...
Ah, now it's done.
Gotcha gotcha. Now try brew install node@14
zsh: command not found: brew
there we are, sec
first:
export PATH="/opt/homebrew/bin:$PATH"
second:
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> $HOME/.zshrc
Done
Then do brew install node@14 again and it should go
exit your terminal and open a new one
then in order do:
cd ~/Library/Application Support/FoundryVTT
node resources/app/main.js
zsh: command not found: node
let me get a gun and go shout at my macbook air for some stress relief.
Mmmm, I just realise that I still have my conda base environment on. Does that hurt?
no idea, but probably not!
means we have to export the path for node
wait one
๐ Might this just be another zsh thing?
Yeah
try "which node" for me in the hopes it gives you a path
else we get to go track down where it installed
node not found
zsh: no such file or directory: /usr/local/opt/node@14/bin/node
I could install it via conda, if that's the right version: https://anaconda.org/conda-forge/nodejs
That is a beta version as it's a odd numbered release
I am not familiar with conda either
if you can conda node 14 it might do the job.
but it might be easier to export path on node
We just have to find it
brew may have moved it's default install location for newer versions of osx. let me see if we can find it
MacOS, just close enough to linux bash to confuse the hell out of me XD
It got worse when they swiched to zsh...
All i'm finding is the export for NVM
before doing so, do
brew uninstall node
try brew uninstall node@14
Yeah that worked. Will install it via conda now (in a new environment)
๐
Welcome to Node.js v14.17.4.
Okay.
So with that craziness dealt with
then in order do:
cd ~/Library/Application Support/FoundryVTT
node resources/app/main.js
(nodejs) nikolasbasler@solid rivers-MacBook-Pro FoundryVTT % node resources/app/main.js
internal/modules/cjs/loader.js:892
throw err;
^
Error: Cannot find module '/Users/nikolasbasler/Library/Application Support/FoundryVTT/resources/app/main.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
there is no folder resources here
o_O
I am here:
/Users/nikolasbasler/Library/Application Support/FoundryVTT
do an ls in that folder please
Config Data Logs
Do you want me to go here?
/Users/nikolasbasler/Library/Application Support/Foundry Virtual Tabletop
But there is also no resources folder
It's going to be in the applications folder
I don't have my mac at the moment to get the exact path so you're going to have to bare with me
I think I got it
Mac applications file structure get weird and I am trying to remember it
/Applications/FoundryVTT.app/Contents/Resources
looks right
does Resources have main.js or does it have resources folder with lowercase r?
should be Resources/app
there is no lowercase resources but in "Resources/app/" there is a main.js
excellent
that's the one perfect
cd .. back to contents and then do node Resources/app/main.js
The output is too big to post here. This is the last bit:
(node:7659) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7659) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The terminal is still busy
I.e. no prompt
Chrome says:
ERR_EMPTY_RESPONSE
okay
i'm gonna need to see what's in that terminal
dump it to a text file and throw that in here
addr in use is interesting.
okay
we're getting somewhere
in the terminal do cmd+.
Done. Back to my prompt.
and then
node Resources/app/main.js --port 40000
It needs to be node Resources/app/main.js --port=40000 sorry
you can end that process and restart it with the = in there
Ok
Aha!
FoundryVTT | 2021-12-14 21:41:21 | [info] No core software update is currently available.
then you should be able to access http://localhost:40000
alright. So the good news is after all that madness
Yay!!
we can now resolve it to work for electron
activate it, and in the setup menu 'configuration' tab, set 30000 to 40000 for port and hit save configuration.
then you can kill the process in terminal and launch the application from your dock and it should just work
It does!! Thank you so much!
I will have to re-install my modules and stuff but I can handle that.
So the reason this happened
is some other program was using the foundry vtt port (30,000)
and for some reason the application did not provide an informative error message about that fact in the log files
Interesting..
i'm not sure what you have that might be running on 30k; but if you have another server application running on this computer that'd likely be it
we could probably do some digging and identify what's using 30k, but for now the fix is: make foundry use a different port
So there is a bigger piece of software that I recently installed (but that's not running now). It's called Geneious a scentific bioinformatic suit.
Ok, that's fine by me.
...Actually Nath, I've seen the logging issue a few times, where something I'd expected to get logged did not. Might be stuff being sent to stderr or something.
Maybe, unsure. I'm just glad the user's difficulties appear to be resolved.
Yes. Thank you very much for all your effort!
Is there anything else you want to know from me?
As a note, not running != not doing anything. Stuff can spawn background stuff with out being in the dock.
Yea, maybe Geneious is doing that. I can see if I find something out.
By the way: I really love Foundry!
I'm glad! and glad we could take care of this. It's rare that a puzzle like this grabs my attention. Somehow anticlimactic to find out it was a port conflict, but i'll take it!
Before you go would you run one more command for me? cat /Users/nikolasbasler/Documents/DSA/Online/Foundry_data/Logs/error.log | grep "address already in use"
hmm interesting. Thanks
Did you change your user data folder at some point during the trying to fix things?
Ah, of course, I backed it up. One sec
So on the backed-up file grep still doesn't return anything. But the file is not empty and has 14K
I forgot about that when unsoluble asked about the content... sorry.
Thanks
Do you want the debug.log as well?
Sure
Thanks