Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page
Ask Your Question
1

Unable to start PAT Local Server

asked 2020-04-29 18:59:06 -0500

jt1234 gravatar image

updated 2020-04-30 10:22:36 -0500

There are several of us at my firm that have been unable to initiate the Parametric Analysis Tool local server for the past 1-2 months. We have never had an issue with the tool prior to this.

I have worked through every step in this post to no avail: What do I do about a "Server Error" in PAT 2.0.0?

We are all receiving the following error from the rails.log file: "/Applications/OpenStudio-2.9.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio-server/gems/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)"

We are all using Apple MacBooks and have replicated this issue on at least OS V2.7, 2.8, 2.9, & 2.9.1. The sudden onset makes me think this is associated with an update or change to the Apple JavaScriptCore .

Any assistance would be much appreciated.

edit retag flag offensive close merge delete

Comments

Can you try OpenStudio v3.0, which was just recently released?

shorowit gravatar image shorowit  ( 2020-04-30 11:52:40 -0500 )edit

Same result with V3.0.

jt1234 gravatar image jt1234  ( 2020-04-30 15:17:58 -0500 )edit

Could you run this in a terminal (you may need to install execjs gem) ruby -r execjs -e 'puts ExecJS.runtime.name'

On my machine, I get the following output.

Tims-MBP-2:~ tijcolem$ ruby -r execjs -e 'puts ExecJS.runtime.name' Node.js (V8)

If you get the same error as PAT, you could try and install node.js. If you have homebrew you can do install it via brew install nodeor you can just download the installer https://nodejs.org/en/download/.

Not sure if that'll fix it. It may also be due to some security restrictions preventing PAT from exec on the JavaScriptVM.

tijcolem gravatar image tijcolem  ( 2020-04-30 19:28:22 -0500 )edit

After doing some investigative work, it appears the issue comes about after upgrading to macOS Catalina. The PAT still works fine in all earlier macOS versions.

I get the following message when I run that line item in Terminal: 1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:inrequire': cannot load such file -- execjs (LoadError)

I tried installing node.js with no success

jt1234 gravatar image jt1234  ( 2020-05-01 12:17:59 -0500 )edit

It appears an issue had already been opened up about this. https://github.com/rails/execjs/issue... Hopefully, it'll be addressed in the next release.

tijcolem gravatar image tijcolem  ( 2020-05-07 18:23:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-05-01 14:09:11 -0500

jt1234 gravatar image

We found a temporary solution, but it looks like this issue is driven by an incorrect JavaScripCore file reference in the runtimes.rb file. I have not cross-checked by I would imagine the location of file changed at the onset of macOS Catalina or during one the iterative updates.

The original rubtimes.rb line item reads:

JavaScriptCore = ExternalRuntime.new( name: "JavaScriptCore", command: "/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc", runner_path: ExecJS.root + "/support/jsc_runner.js"

but should be changed to:

JavaScriptCore = ExternalRuntime.new( name: "JavaScriptCore", command: "/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Helpers/jsc", runner_path: ExecJS.root + "/support/jsc_runner.js"

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 

Question Tools

1 follower

Stats

Asked: 2020-04-29 18:59:06 -0500

Seen: 193 times

Last updated: May 01 '20