#Nikolas MacOS Gremlins

1 messages ยท Page 1 of 1 (latest)

spare pumice
#

Okay @solid river - I'm moving us in here because this is gonna clutter the main room pretty bad.

solid river
#

Ok

spare pumice
#

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

solid river
spare pumice
#

If this gets any weirder i'm gonna need whiskey.

#

Alright, go ahead and quit the electron app as directed.

solid river
spare pumice
#

yeah, force quit it the way i directed you previous then

solid river
#

Done

lone citrus
#

Are you on a m1 mac?

solid river
#

Yes.

#

Sorry, I should have mentioned that earlier. I know this sometimes causes headache.

spare pumice
#

We've got people running mac M1 without issue

solid river
#

Foundry was running fine

visual linden
#

did you change anything between it last working fine and now ?

spare pumice
#

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?

solid river
#

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.

spare pumice
#

How do you feel about installing the "Homebrew" package manager?

solid river
#

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

spare pumice
#

Pretty sure unsoluble took you through a delete and reinstall

solid river
spare pumice
#

On the off chance it's already installed, from a terminal do

node --version
solid river
#

Nope

spare pumice
#

Cool. Ground up then.

#
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
solid river
#

Before we do this. What's the plan? And will it leave clutter?

spare pumice
#

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

solid river
#

Alright.

spare pumice
#

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

solid river
#

It's still installing. But I do have zsh

lone citrus
#

that first install will take a few minutes

spare pumice
#

Gotta be done by now

solid river
#

I've got a slow wifi, but I don't want to swich to cable mid-download...

#

Ah, now it's done.

spare pumice
#

Gotcha gotcha. Now try brew install node@14

solid river
#

zsh: command not found: brew

spare pumice
#

there we are, sec

#

first:

export PATH="/opt/homebrew/bin:$PATH"

second:

echo 'export PATH="/opt/homebrew/bin:$PATH"' >> $HOME/.zshrc
solid river
#

Done

lone citrus
#

Then do brew install node@14 again and it should go

solid river
#

brew works now

#

Done.

#

node --version
still gives me
zsh: command not found: node

spare pumice
#

exit your terminal and open a new one

#

then in order do:

cd ~/Library/Application Support/FoundryVTT
node resources/app/main.js
solid river
#

zsh: command not found: node

spare pumice
#

let me get a gun and go shout at my macbook air for some stress relief.

solid river
#

Mmmm, I just realise that I still have my conda base environment on. Does that hurt?

spare pumice
#

means we have to export the path for node

#

wait one

solid river
#

Yeah

spare pumice
#

try "which node" for me in the hopes it gives you a path

#

else we get to go track down where it installed

solid river
#

node not found

lone citrus
#

Run /usr/local/opt/node@14/bin/node -v

#

that should be the path

solid river
#

zsh: no such file or directory: /usr/local/opt/node@14/bin/node

lone citrus
#

That is a beta version as it's a odd numbered release

#

I am not familiar with conda either

spare pumice
#

if you can conda node 14 it might do the job.

#

but it might be easier to export path on node

lone citrus
#

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

spare pumice
#

MacOS, just close enough to linux bash to confuse the hell out of me XD

solid river
#

It got worse when they swiched to zsh...

spare pumice
#

All i'm finding is the export for NVM

solid river
#

So I can install a nodejs 14 via conda

#

The latest 14 is 14.17.4

spare pumice
solid river
#

Ok

#

Error: No such keg: /opt/homebrew/Cellar/node

spare pumice
#

try brew uninstall node@14

solid river
#

Yeah that worked. Will install it via conda now (in a new environment)

spare pumice
#

๐Ÿ‘Œ

solid river
#

Welcome to Node.js v14.17.4.

spare pumice
#

Okay.

#

So with that craziness dealt with

#

then in order do:

cd ~/Library/Application Support/FoundryVTT
node resources/app/main.js
solid river
#

(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: []
}

spare pumice
#

hm

#
cd resources/app
#
ls
#

do you see a 'main.js'?

solid river
#

there is no folder resources here

spare pumice
#

o_O

solid river
#

I am here:
/Users/nikolasbasler/Library/Application Support/FoundryVTT

spare pumice
#

do an ls in that folder please

solid river
#

Config Data Logs

spare pumice
#

shit that's the userdata folder

#

Time to open a bug report for my own documentation

solid river
#

Do you want me to go here?
/Users/nikolasbasler/Library/Application Support/Foundry Virtual Tabletop

#

But there is also no resources folder

lone citrus
#

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

solid river
#

I think I got it

lone citrus
#

Mac applications file structure get weird and I am trying to remember it

solid river
#

/Applications/FoundryVTT.app/Contents/Resources

lone citrus
#

looks right

#

does Resources have main.js or does it have resources folder with lowercase r?

spare pumice
#

should be Resources/app

solid river
#

there is no lowercase resources but in "Resources/app/" there is a main.js

spare pumice
#

excellent

lone citrus
#

that's the one perfect

spare pumice
#

cd .. back to contents and then do node Resources/app/main.js

solid river
#

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

spare pumice
#

open a browser (chrome)

#

http, not https

solid river
#

Chrome says:
ERR_EMPTY_RESPONSE

spare pumice
#

okay

#

i'm gonna need to see what's in that terminal

#

dump it to a text file and throw that in here

solid river
#

The first line is the command

spare pumice
#

addr in use is interesting.

#

okay

#

we're getting somewhere

#

in the terminal do cmd+.

solid river
#

Done. Back to my prompt.

spare pumice
#

and then

node Resources/app/main.js --port 40000
solid river
lone citrus
#

It needs to be node Resources/app/main.js --port=40000 sorry

#

you can end that process and restart it with the = in there

solid river
#

Ok

#

Aha!

#

FoundryVTT | 2021-12-14 21:41:21 | [info] No core software update is currently available.

lone citrus
solid river
spare pumice
#

alright. So the good news is after all that madness

solid river
#

Yay!!

spare pumice
#

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

solid river
#

It does!! Thank you so much!

#

I will have to re-install my modules and stuff but I can handle that.

spare pumice
#

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

solid river
#

Interesting..

spare pumice
#

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

solid river
#

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.

next otter
#

...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.

spare pumice
solid river
#

Yes. Thank you very much for all your effort!

#

Is there anything else you want to know from me?

next otter
#

As a note, not running != not doing anything. Stuff can spawn background stuff with out being in the dock.

solid river
#

Yea, maybe Geneious is doing that. I can see if I find something out.

#

By the way: I really love Foundry!

spare pumice
#

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!

lone citrus
#

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"

solid river
#

that file is empty

#

so no output

lone citrus
#

hmm interesting. Thanks

#

Did you change your user data folder at some point during the trying to fix things?

solid river
#

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

lone citrus
#

Mind dropping the file here?

#

I just want to see if we're all silly and missed it

solid river
lone citrus
#

Thanks

solid river
#

Do you want the debug.log as well?

lone citrus
#

Sure

solid river
lone citrus
#

Thanks