langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
52.7k stars 7.71k forks source link

Node Js sandbox errors out #10384

Open echosonusharma opened 2 weeks ago

echosonusharma commented 2 weeks ago

Self Checks

Dify version

0.10.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Using the javascript sandbox for any given code just fails some times. Sandbox just gives this error.

image

✔️ Expected Behavior

JS Sandbox should work without failing.

❌ Actual Behavior

JS Sandbox fails sometimes.

dosubot[bot] commented 2 weeks ago

I couldn't find specific error messages or logs related to JSON.parse failures in the Node.js sandbox within the Dify platform. However, there are known limitations and constraints that might affect its operation:

  1. Strict Isolation: The sandbox is designed to be secure, which means it restricts certain operations that could affect performance or security.
  2. Restricted System Access: Direct file system access and network requests are not allowed, which might indirectly affect operations like JSON.parse if they depend on external data.
  3. System Call Restrictions: The sandbox uses Seccomp to restrict system calls, which could potentially interfere with certain operations [1][2].

For similar issues, you might want to check the following discussions and issues:

If the issue persists, reviewing the environment variables and ensuring they are correctly set might help, as they play a crucial role in the sandbox's operation [3].

To continue talking to Dosu, mention @dosu.