Message Boards Message Boards

How do you get WLJS to work under macOS?

WLJS does not work for me under macOS 14.0 (on an M1 Mac) -- neither the Electron cross-platform app nor the console/web-browser combination. I do have WolframEngine installed and activated with Wolfram; I also have wolframscript and Mathematica. With the app, after all the downloading after i open the app, I get a totally blank window in which I see nothing and can type nothing; with the console/browser combination, after executing "wolframscript -f Scripts/run.wls" I eventually see a binary write error and then the indicated browser URL cannot be opened.

How get it to work?

Reference: https://jerryi.github.io/wljs-docs/ and https://jerryi.github.io/wljs-docs/docs/frontend/instruction.

POSTED BY: Murray Eisenberg
6 Replies

Perhaps the developers @Kirill Belov and @Kirill Vasin have some thoughts on this.

POSTED BY: Sam Carrettie
Posted 11 months ago

Perhaps that was running as intended? It stays stuck in the terminal.

Running wolframscript -f Scripts/run.wls gives a lot of terminal output and eventually somewhere near the end gives some url to go to, which you may access through your browser. WLJS seems to work, and WolframKernel seems to start. It should all be working. There should be a URL. If there isn't, then that's interesting.

POSTED BY: James Wey

Finally, I got it working via the WLJS Notebook.app, and with little thanks to the inadequate documentation and with some flaky behavior of the app.

First little snag: when I tried to open it, I got the not-unexpected error that app is damaged and could not be opened. executing "xattr -c /Applications/WLJS\ Notebook.app " fixed that.

Next, I opened WLJS Notebook app. Eventually it asked question, "Do you hae Wolfram Engine installed", and I accpted default asnwer "yes". Next I got a reply that was nearly unreadable, owing to black text on a DARK blue background - a really dumb design choice! I think it says, "Please locate an executable called wolframscript or WolframKernel."

Well that's a big enigmatic, as there are two places where I find a "wolframscript", including:

/Applications/WolframScript.app
/Applications/WolframScript.app/Contents/MacOS/wolframscript

I tried selecting the first of these -- the app, not the executable. Nothing happened after I clicked Open in the Finder window the app had opened, so I next navigated in the same Finder window to teh wolframscript executable and pressed Enter. That seemed to satisfy the app.

After lots of output in the app window, similar to what I had seen when trying to install from the Terminal, eventually I did get a window with a left-side panel seeming to be a table of contents, "../, 01-Introduction, 02 - Dhnamics", etc.

Next, clicking, say "01- Introduction" momentarily opens a list of items below that, but the almost immediately disappears, making it impossible to select any item from it.

After a while, clicking one of those main-level items did keep the sublist displayed, and I was able to finally to open, e.g., Plot3D.win and to evaluate the input cells there.

When I close the app and open it again, there's a delay as a whole bunch of output is written to one pop-up window, ending with this;

In[2]:=
Hee uvTask: 2
Connected
asyncsocket id: c71441fc-e366-4af5-a1ee-77bbedc8e890
Started
---print---
>> "Created server with sid: 0"
BinaryWrite::stream: 
   Missing[KeyAbsent, Null][channel]
     is not a string, SocketObject, InputStream[ ], or OutputStream[ ].
Warning
BinaryWrite::stream: 
   Missing[KeyAbsent, Null][channel]
     is not a string, SocketObject, InputStream[ ], or OutputStream[ ].
Warning
BinaryWrite::stream: 
   Missing[KeyAbsent, Null][channel]
     is not a string, SocketObject, InputStream[ ], or OutputStream[ ].
General::stop: Further output of BinaryWrite::stream
     will be suppressed during this calculation.
Warning
---print---
>> "LPM >> project directory >> /Users/murray/Library/Application \
Support/wljs-frontend/Packages/wljs-wlx-support"
---print---
>> "LPM >> fetching paclet infos..."
---print---
>> "LPM >> PASSIVE MODE"
Global`NotebookEventFire::shdw: 
   Symbol NotebookEventFire appears in multiple contexts 
    {Global`, JerryI`WolframJSFrontend`Notebook`}; definitions in context 
    Global` may shadow or be shadowed by other definitions.

Only after that does the main window of the app open and I can proceed.

I presume I'm dealing here with a server-client interchange, but the appearance is somewhat clumsy.

POSTED BY: Murray Eisenberg

No, still not working!

Environment: macOS Sonomal 14.2.1 on Mac Studio M1 Max. Wolfram Language 14.0.9 Engine for Mac OS X ARM (64-bit) 14.0.0.

First, I downloaded the archive. I already had wolframscript installed.

After unzipping the archive and moving it to /Applications/wolfram-js-frontend, I invoked Terminal command "wolframscript -f /Applications/wolfram-js-frontend/Scripts/run.wls". After a lot of output beginning with ...

{Assets, .defaultpackages, .editorconfig, Electron, Examples, .gitattributes, .github, .gitignore, imgs, Kernel, LICENSE, package.json, package-lock.json, PacletInfo.wl, public, README.md, Scripts, .scss, Services, .shead, .vscode}
14.0.0 for Mac OS X ARM (64-bit) (November 7, 2023)
MacOSX-ARM64
/Applications/wolfram-js-frontend
>> LPM version: 11
>> LPM >> project directory >> /Applications/wolfram-js-frontend
>> LPM >> fetching paclet infos...
>> LPM >> fetching info by JerryI/CSocketListener on a Github...
>> LPM >> fetching info by KirillBelovTest/Objects on a Github...
>> LPM >> fetching info by KirillBelovTest/Internal on a Github...
>> LPM >> fetching info by KirillBelovTest/TCPServer on a Github...
>> LPM >> fetching info by KirillBelovTest/HTTPHandler on a Github...
>> LPM >> fetching info by KirillBelovTest/WebSocketHandler on a Github...
>> LPM >> fetching info by JerryI/wl-wsp on a Github...
>> LPM >> fetching info by JerryI/wl-misc on a Github...
>> LPM >> checking cached
>> LPM >> fetching a zip archive from the master branch...

the output ended with:

vent-Loop started! 
Connected
asyncsocket id: d5627296-eac3-4c9e-9afd-b6c0a7002289
Started
---print---
>> "Created server with sid: 0"

BinaryWrite::stream: Missing[KeyAbsent, Null][channel] is not a string, SocketObject, InputStream[ ], or OutputStream[ ].
Warning

BinaryWrite::stream: Missing[KeyAbsent, Null][channel] is not a string, SocketObject, InputStream[ ], or OutputStream[ ].
Warning

BinaryWrite::stream: Missing[KeyAbsent, Null][channel] is not a string, SocketObject, InputStream[ ], or OutputStream[ ].

General::stop: Further output of BinaryWrite::stream will be suppressed during this calculation.
Warning
---print---
>> "LPM >> project directory >> \
/Applications/wolfram-js-frontend/Packages/wljs-wlx-support"
---print---
>> "LPM >> fetching paclet infos..."
---print---
>> "LPM >> PASSIVE MODE"

Global`NotebookEventFire::shdw: Symbol NotebookEventFire appears in multiple contexts {Global`, JerryI`WolframJSFrontend`Notebook`}; definitions in context Global` may shadow or be shadowed by other definitions.

And then things froze in Terminal.

POSTED BY: Murray Eisenberg
Posted 11 months ago

Is it still not working on your end?

POSTED BY: James Wey

Same error

POSTED BY: Navvye Anand
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract