codesandbox / sandpack

A component toolkit for creating live-running code editing experiences, using the power of CodeSandbox.
https://sandpack.codesandbox.io
Apache License 2.0
4.7k stars 330 forks source link

Couldn't connect to server #1195

Open frivolta opened 1 week ago

frivolta commented 1 week ago

Bug report

"@codesandbox/sandpack-client": "2.10.0" When running a basic version of Sandpack the preview is visible, after a few seconds i get this error:

Couldn't connect to server

This means sandpack cannot connect to the runtime or your network is having some issues. Please check the network tab in your browser and try again. If the problem persists, report it via [email](mailto:hello@codesandbox.io?subject=Sandpack%20Timeout%20Error) or submit an issue on [GitHub.](https://github.com/codesandbox/sandpack/issues)

ENV: create-react-app
ERROR: TIME_OUT

this is my configuration:

<SandpackProvider
      template={template}
      options={{
        bundlerURL: "https://sandpack-bundler.codesandbox.io",
        autorun: true,
        recompileMode: "immediate",
        activeFile,
      }}
      files={codeEditorFiles}
    >
      <SandpackCodeEditor showInlineErrors showRunButton initMode="immediate" />
      <SandpackPreview
        showRefreshButton
        showSandpackErrorOverlay
        showOpenInCodeSandbox={false}
      />
    </SandpackProvider>

where template is react and active file is "App.js".

Packages affected

earthspiligrim commented 4 days ago

+1 even i am facing the same error Any solution to this?