JerryI / wolfram-js-frontend

Dynamic Notebook Environment for Wolfram Language written in Javascript
https://jerryi.github.io/wljs-docs/
GNU General Public License v3.0
306 stars 13 forks source link

Error whe starting #118

Closed chmod777john closed 6 months ago

chmod777john commented 6 months ago

Describe the bug When starting the project, I encoutered this error.

@chmod777john ➜ /workspaces/wolfram-js-frontend (devcontainer) $ wolframscript -f Scripts/start.wls host 0.0.0.0 http 8080 ws 8081 ws2 8082 docs 8085 
>> LPM >> project directory >> /workspaces/wolfram-js-frontend
>> LPM >> last updated >> Sun 14 Apr 2024 22:12:01
>> CSockets >> Unix >> Linux-x86-64
>> CSockets >> Unix >> Loading library... LLink JustTryToFind

LibraryFunction::libload: The function run_uvloop was not loaded from the file /workspaces/wolfram-js-frontend/wl_packages/KirillBelov_CSockets/LibraryResources/7/Linux-x86-64/csockets.so.
>> CSockets >> Unix >> It did not work! LLink 7
>> CSockets >> Unix >> Trying LLink 6

LibraryFunction::libload: The function run_uvloop was not loaded from the file /workspaces/wolfram-js-frontend/wl_packages/KirillBelov_CSockets/LibraryResources/6/Linux-x86-64/csockets.so.
>> CSockets >> Unix >> Loading process failed. LLink 6

To Reproduce Visit https://github.com/chmod777john/wolfram-js-frontend, then press ,, Github will guide you to create a codespace with a clean environment. This can eliminate problems caused by differences in system environments.

Please read this guide: https://github.com/chmod777john/wolfram-js-frontend?tab=readme-ov-file#cloud-based-quick-start

Finally when executing wolframscript -f Scripts/start.wls host 0.0.0.0 http 8080 ws 8081, the error occured.

JerryI commented 6 months ago

I will have look for sure 👌🏼

PS: how did you manage to solve the licensing issues?

JerryI commented 6 months ago

Tried clean installation on Debian x86 machine

Linux pc105ep5 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02) x86_64 GNU/Linux

It did started well. However inside the container so no reason Wolfram Engine refuses to load .so files. It highlights some deeper problem with LibraryLink

JerryI commented 6 months ago

PS: I am using WL14

>> CSockets >> Unix >> Linux-x86-64
>> CSockets >> Unix >> Loading library... LLink JustTryToFind
>> CSockets >> Unix >> Succesfully loaded! LLink 7
chmod777john commented 6 months ago

I will have look for sure 👌🏼

PS: how did you manage to solve the licensing issues?

Thanks.

There's a "On-demand License". First, register for a Wolfram Cloud account (it's free). Then, create a Wolfram Cloud Notebook. Within the notebook, execute the function CreateLicenseEntitlement, which will return a string token. Set this token as the WOLFRAMSCRIPT_ENTITLEMENTID environment variable. When wolframscript starts, it will automatically recognize and verify the license through this token.

This license is not tied to a specific machine, meaning you can use it on many machines or virtual containers. It's billed on-demand, costing a few cents per core-hour. However, I found that you can use it without linking any credit card, so I believe each account should have a certain amount of free usage credits.

This approach is completely legal and compliant; there's no cracking or registration bypass involved.

It's all written in the following link. https://hub.docker.com/r/wolframresearch/wolframengine#activate-ondemand

image

image

JerryI commented 6 months ago

Just a comment for other people. After the discussion, we have found that for network operations Wolfram Engine requires

sudo apt-get install avahi-daemon

it is also recommended by Wolfram Research

JerryI commented 6 months ago

And for some reason only normal licensing using an email address is working properly for both Wolfram Kernel

i will probably close this issue.

JerryI commented 6 months ago

Related #96

chmod777john commented 6 months ago

And for some reason only normal licensing using an email address is working properly for both Wolfram Kernel

i will probably close this issue.

Confirmed. If we activate the kernel with Node-Locked Licensing, all things works fine. If we activate the kernel with On-Demand Licensing, the kernel won't answer the frontend evaluation call. Weird.