codesandbox-client icon indicating copy to clipboard operation
codesandbox-client copied to clipboard

Cannot get terminal to work in CodeSandbox embed

Open jameshibbard opened this issue 6 years ago • 13 comments

Hi,

I have a CodeSandbox which is a basic Express app. You can find it here: https://codesandbox.io/s/cold-butterfly-nl30s As you can see, when you visit the above URL, "Hello World!" is displayed in the preview pane and "It Works!" is logged to the terminal.

My problem is that when I embed the sandbox on our site and set the terminal to be open in the embed, nothing is logged to the terminal.

You can see the problem demonstrated here: https://www.sitepoint.com/?p=174674&preview=1&_ppp=efe3e7b8a1

"Hello World!" is displayed in the preview pane, as expected. However the terminal remains blank (I would like to see "It Works!" logged).

Here is my embed code:

<iframe src="https://codesandbox.io/embed/cold-butterfly-nl30s?codemirror=1&expanddevtools=1&fontsize=14&hidenavigation=1&moduleview=1&theme=dark"
     style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
     title="cold-butterfly-nl30s"
     allow="geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb"
     sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
   ></iframe>

What am I doing wrong?

jameshibbard avatar Jan 17 '20 13:01 jameshibbard

Hi,

I'd be more than happy if this issue gets resolved. May I know what's the time frame for merging the fix?

Thanks, Monik

gandhimonik avatar Mar 30 '20 14:03 gandhimonik

Should be fixed now!

CompuIves avatar Apr 16 '20 16:04 CompuIves

Thanks man, but I would have expected "Hello, world!" to be logged to the terminal in the embed I link to above. Unfortunately, nothing is logged. Am I missing something? Or do I need to wait for the changes to show up?

jameshibbard avatar Apr 16 '20 17:04 jameshibbard

Yep, it takes 20 min to deploy. It should be live now!

CompuIves avatar Apr 16 '20 21:04 CompuIves

Ah yeah, it's there now. Thank you!

jameshibbard avatar Apr 17 '20 05:04 jameshibbard

I unfortunately have to reopen this issue, our websocket connections got overloaded when we enabled embeds. I've reverted the change now and we're looking into fixing the scaling issues!

CompuIves avatar Apr 17 '20 10:04 CompuIves

This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

github-actions[bot] avatar Sep 04 '20 12:09 github-actions[bot]

We'd still be interested in seeing this functionality in CodeSandbox embeds, so I'm leaving a comment here so that the issue doesn't go stale.

jameshibbard avatar Sep 06 '20 11:09 jameshibbard

This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed.

github-actions[bot] avatar Dec 20 '20 01:12 github-actions[bot]

We'd still be interested in seeing this functionality in CodeSandbox embeds :smile:

jameshibbard avatar Dec 20 '20 07:12 jameshibbard

This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed.

github-actions[bot] avatar Mar 22 '21 01:03 github-actions[bot]

Still interested :smile:

I just checked and issue still persists, although I deleted the demo from the first post. Please let me know if you would like me to recreate it.

jameshibbard avatar Mar 22 '21 05:03 jameshibbard

I would love to see this feature too

CodeWithSubramani avatar Jul 23 '25 08:07 CodeWithSubramani