Codesandbox-client: Unable to access sandbox because of an infinite loop.

Created on 25 Apr 2019  路  5Comments  路  Source: codesandbox/codesandbox-client

馃悰 bug report

Description of the problem

Earlier today, I was editing my sandbox code and I accidentally created a while(true){} loop. It goes on forever, and breaks the tab every time I open the sandbox. I currently have no way/idea of how to access my code.

How has this issue affected you? What are you trying to accomplish?

I've gone through previous issues, but I haven't found any solutions that work for me. As of now, I just need a way to access the raw code by any means possible, but as I've already stated, it's impossible for me to access the code because every time I open the editor, it runs the code and stops the tab.

Link to sandbox: https://codesandbox.io/s/lr21yjkvv7 (Warning: Going to this page will probably mess up your tab, so I'd advise not doing it.)

Your Environment

| Software | Name/Version|
| ---------------- | ---------- |
| 小odesandbox |
| Browser | Chrome
| Operating System | ChromeOS (when I'm mobile) and Windows (when I'm at home)

EDIT:


I've found a way to get the code from the sandbox. Simply using inspect element, finding the script sources, and copying them into a new sandbox (and deleting the infinite loop) fixes everything for me.

馃 Improvement

Most helpful comment

I think being able to disable the preview in the editor in a similar manner would be more helpful.

Turns out there is, you can add runonclick=1 argument to the sandbox's URL, e.g. with the OP sandbox: https://codesandbox.io/s/lr21yjkvv7?runonclick=1 .

Closing this for now, given there is an "official" solution to the initial issue.

All 5 comments

Hey @theangrybagel ,

As a workaround, you can also open the sandbox embed with the preview disabled: https://codesandbox.io/embed/lr21yjkvv7?view=editor . Unfortunately you can't save files from the embed.

I think being able to disable the preview in the editor in a similar manner would be more helpful.

I think being able to disable the preview in the editor in a similar manner would be more helpful.

This would be 馃敟!

I think being able to disable the preview in the editor in a similar manner would be more helpful.

Turns out there is, you can add runonclick=1 argument to the sandbox's URL, e.g. with the OP sandbox: https://codesandbox.io/s/lr21yjkvv7?runonclick=1 .

Closing this for now, given there is an "official" solution to the initial issue.

@lbogdan - I get 404 page when adding this :(

@yairEO check the format matches the above linked example: https://codesandbox.io/s/lr21yjkvv7?runonclick=1. What url are you adding it to?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andreplaranja picture andreplaranja  路  3Comments

miukimiu picture miukimiu  路  3Comments

kentcdodds picture kentcdodds  路  3Comments

Haroenv picture Haroenv  路  3Comments

CompuIves picture CompuIves  路  3Comments