Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to spawn bolt shell #1157

Open
taikai-zz opened this issue Jan 23, 2025 · 5 comments
Open

Failed to spawn bolt shell #1157

taikai-zz opened this issue Jan 23, 2025 · 5 comments
Labels
question Further information is requested

Comments

@taikai-zz
Copy link

taikai-zz commented Jan 23, 2025

Describe the bug

Failed to spawn bolt shell

Worker.postMessage: The WebAssembly.Memory object cannot be serialized. The Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy HTTP headers can be used to enable this.

Link to the Bolt URL that caused the error

.

Steps to reproduce

1、bolt.diy 0.0.6
2、Dockfile OLLAMA_API_BASE_URL=http://open-webui-ollama.open-webui.svc.cluster.local:11434
3、docker build . --target bolt-ai-development
4、k8s
apiVersion: apps/v1
kind: Deployment
metadata:
name: bolt-ai-development
spec:
replicas: 1
selector:
matchLabels:
app: bolt-ai-development
template:
metadata:
labels:
app: bolt-ai-development

spec:
  nodeSelector:
    gpu-node: "true"
  containers:
  - name: bolt-ai-development
    image:  bolt-ai-development:0.0.6
    resources:
      limits:
        nvidia.com/gpu: 2 # requesting 1 vGPUs
        
    imagePullPolicy: IfNotPresent
    volumeMounts:
    - name: data
      mountPath: /app/.env.local  # 
  volumes:
  - name: data
    hostPath:
      path: /data/bolt.diy/.env.local  
      type: File

apiVersion: v1
kind: Service
metadata:
name: bolt-ai-development-service
spec:
type: ClusterIP
ports:
- port: 5173
targetPort: 5173
protocol: TCP
selector:
app: bolt-ai-development

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: bolt-ai-development
spec:
rules:

  • host: bolt-ai-development.ai.test
    http:
    paths:
    • path: /
      pathType: Prefix
      backend:
      service:
      name: bolt-ai-development-service
      port:
      number: 5173
      ingressClassName: nginx

Expected behavior

.

Screen Recording / Screenshot

logs

Image

Image

Platform

  • OS: Linux
  • Browser: Chrome

Provider Used

No response

Model Used

Ollama

Additional context

No response

@taikai-zz
Copy link
Author

taikai-zz commented Jan 23, 2025

I have nginx settings
add_header Cross-Origin-Opener-Policy "same-origin" always;
add_header Cross-Origin-Embedder-Policy "require-corp" always;
Start reporting another error:
Failed to execute 'postMessage' on 'Worker': SharedArrayBuffer transfer requires self.crossOriginIsolated.

Image

@leex279 leex279 added the question Further information is requested label Jan 23, 2025
@taikai-zz
Copy link
Author

At least my problem is not a server configuration issue at all. I found it to be a matter of browser configuration, which is very frustrating
https://developer.stackblitz.com/platform/webcontainers/browser-config
After testing, Firefox browser is OK, Chrome is not. I hope it can help those who encounter cross domain problems~

@alexja14
Copy link

@taikai-zz how did u add the headers ? volume part ?

@ForeGuards
Copy link

Got the same issue as you @taikai-zz can you please share your solution please?

@taikai-zz
Copy link
Author

@ForeGuards @alexja14

  1. Browser using Chrome Canary
    If you encounter any problems, please press F12 to view the Console option in your browser

  2. Add add_ceader (optional) in the latest version of k8s ingress nginx
    Helm installation requires changing allowSnippetAnnotations to true in the value.yaml file
    Add annotations risk level to the data in controller configmap. yaml: annotations-risk-level: "Critical"

  3. According to the document https://developer.stackblitz.com/platform/webcontainers/browser-config Set up the browser

  4. Set the corresponding domain name to htttps in ingress nginx

I hope it can help everyone~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants