Skip to content

exceeded the maximum required depth #40

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

Closed
faceyspacey opened this issue Jul 9, 2017 · 44 comments · May be fixed by sitedata/codesandbox-client#3
Closed

exceeded the maximum required depth #40

faceyspacey opened this issue Jul 9, 2017 · 44 comments · May be fixed by sitedata/codesandbox-client#3

Comments

@faceyspacey
Copy link
Contributor

I guess this isn't supported. Is it something that can be supported. You'd figure if it works in CRA it works here. Thoughts?

@CompuIves
Copy link
Member

You're right should work in CodeSandbox too then. This is an issue that I don't know how to handle yet, I should investigate.

What currently happens is this:

You have module A and B, module A requires B and B requires A.

When A is executed, it will first execute all imports of A (unless they are cached), so B gets executed, but first all imports of B get executed, which is A again. You'll get an endless loop, which is why the depth check is created.

I don't know how webpack handles this, lemme check.

@CompuIves
Copy link
Member

Ah, okay, found it. Node does it like this:

if a requires b, and b requires a, then a will be an empty object for the first execution of b.

This is really strange behaviour, can cause some strange bugs. But I'll work according to spec, I'll build it in 😄 .

@faceyspacey
Copy link
Contributor Author

solid brother. i worked around it temporarily.

@faceyspacey
Copy link
Contributor Author

hey brother, one quick thing, i put a <link /> tag in index.html and it's getting embedded in the body, but it's styles are not being displayed:

https://codesandbox.io/s/6R5OR5q0n

click one of the tabs in the left side sidebar that isn't home, then click a row and u will see a large circle overlayed over a video image with no play button displayed in it. It's supposed to have a PLAY button.

@CompuIves
Copy link
Member

Ah I see, doesn't look right. The dependency is blocked because of a mixed-content issue. You need to use the https version instead, it's blocked now because an http url is requested over https.

Fix: https://codesandbox.io/s/wpYJy8nMg

@faceyspacey
Copy link
Contributor Author

excellent. shoulda checked the console, but i've been styles ur styles :)

@faceyspacey
Copy link
Contributor Author

...im wrappin up. check this URL:

https://codesandbox.io/s/6R5OR5q0n

...any recommendations on finalizing the styles? If it was urs how would u like it?

@faceyspacey
Copy link
Contributor Author

...by the way, sometimes things dont save. i just reloaded and lost a bunch of stuff.

@faceyspacey
Copy link
Contributor Author

put it all back, so it's nice when u look at it. ...the BACK/NEXT buttons in ur fake address bar work perfectly with Redux-First Router by the way. ...I had previously made this long ago in Webpack bin and had to make my own fake address bar.

@CompuIves
Copy link
Member

Wow this looks great! Love the styles (naturally ;D).

The issue with not saving is really strange, I'll take a look in the logs.

@faceyspacey
Copy link
Contributor Author

im movin pretty fast and saving a lot. probably has something to do with it.

also fyi, the error about https is still in the console even though it's correct and everything is working. maybe it's remembering the file from the github repo which had http instead of https.

@CompuIves
Copy link
Member

Yes, it's a bit duplicate right now. It's both in external resources and in the index.html. It will be fixed if you use the github version again with https.

@CompuIves
Copy link
Member

Cyclic dependency support has landed!

@faceyspacey
Copy link
Contributor Author

Excellent, i'm about to do a medium post and promote this. You down to put this on the homepage?

@CompuIves
Copy link
Member

Okay, sounds good!

@faceyspacey
Copy link
Contributor Author

there's no way to sync back to github right? (im grabbin my code, putting it back on the correct repo, than pushing to a new codesandbox URL).

@CompuIves
Copy link
Member

Not yet, in the future there'll be an export to GitHub branch feature, but sadly it's not here yet.

@faceyspacey
Copy link
Contributor Author

@faceyspacey
Copy link
Contributor Author

the URL changed after i reloaded it. Here's that one:

https://codesandbox.io/s/R66kAGKDE

@faceyspacey
Copy link
Contributor Author

also you need to add the sandbox="allow-presentation" attribute to your iframe:

https://www.chromestatus.com/feature/5462833647058944

to avoid this:
screen shot 2017-07-09 at 4 00 40 pm

That exception occurs when the video plays.

The video plays nevertheless, but sometimes things slow down after the video starts playing--perhaps if this exception is caught the app wouldn't slow down.

@CompuIves
Copy link
Member

Okay, deploying the fix. I'd use the long URL regardless, that one stays in sync with the git repo.

@faceyspacey
Copy link
Contributor Author

the "Forked From" link by the way should link to the actual REPO if a github a repo. Also, you should be able to edit the original repo synced from github. Instead, as soon as you save, it forks the sandbox, and in fact you have to re-apply what you just did. It would be nice to keep the URLs from github.

@faceyspacey
Copy link
Contributor Author

It does? That's excellent. I guess I need to apply my changes to github and then it will be reflected there.

@CompuIves
Copy link
Member

I just deployed a fix for the 'forked from'. The choice to make the github version non-editable is because this could generate conflicts as soon as the GitHub repo changes.

@faceyspacey
Copy link
Contributor Author

totally understand the choice

@faceyspacey
Copy link
Contributor Author

confirmed that it picks up changes from github. VERY NICE! this is a good stop-gap solution until you get around to full-featured github syncing.

...ok so u got my original URL. do whatever u need to do with that. i may make some more tweaks here and there. Now that I feel secure about what repo is powering this, i'm in good shape.

..small thing: the link for "forked from" goes to "../tree/master": https://github.com/faceyspacey/redux-first-router-codesandbox/tree/master/

...if it makes sense, u probably want to remove that so it's the cleanest URL with less path segments, so the name sticks in users' heads.

@faceyspacey
Copy link
Contributor Author

there's unfortunately another problem: when you edit the Title or Description, it forks it.

@CompuIves
Copy link
Member

Cool! I'll embed it on the homepage.

..small thing: the link for "forked from" goes to "../tree/master": faceyspacey/redux-first-router-codesandbox@master

I think I can't change this, since some repos have another branch (like dev) as default view. Which means that I need to explicitly specify what branch it is since I can't get the default view.

@CompuIves
Copy link
Member

there's unfortunately another problem: when you edit the Title or Description, it forks it.

Hmm, you're right. I need to find something to determine who the owner is. For now you can specify the description and title in package.json and it'll use those values.

@faceyspacey
Copy link
Contributor Author

you're the man!

@faceyspacey
Copy link
Contributor Author

it looks fantastic on the homepage. Anyway possibly it could get one of the links in the Example projects? I know it's newer, but maybe just while it gets a bunch of traffic over the next few days.

@CompuIves
Copy link
Member

Sure! deploying it, I'm going to bed now, it's getting late. Have fun with the Medium post!

@faceyspacey
Copy link
Contributor Author

thank you!

@faceyspacey
Copy link
Contributor Author

damn, the title + description doesn't update appear

@faceyspacey
Copy link
Contributor Author

also, the link on the homepage has a typo. there's a "K" added as the last character

@CompuIves
Copy link
Member

CompuIves commented Jul 9, 2017

Deploying fix for both, you probably need to add a commit to your git repo to make the changes of title/description appear after deployment.

@faceyspacey
Copy link
Contributor Author

excellent. i added some css media queries to fix the squished design in the iframe on the homepage. and now it looks far better. sleep well brother. thanks again!

@faceyspacey
Copy link
Contributor Author

im sorry to bug u if ur still around, but now my sandbox is completely gone:

https://codesandbox.io/s/github/faceyspacey/redux-first-router-codesandbox
403

@CompuIves
Copy link
Member

Oh no! I think we just hit the rate limit on GitHub, I'll check.

@CompuIves
Copy link
Member

Okay, some API keys were not set what caused GitHub to rate limit. Fixed it but found another issue because of a wrong commit I did now. I'm making a lot of mistakes right now because of my tiredness. I'll quickly fix this and then rush to bed 😅 .

@CompuIves
Copy link
Member

Fixed! 😴

@faceyspacey
Copy link
Contributor Author

excellent work. sleep well!

@faceyspacey
Copy link
Contributor Author

@faceyspacey
Copy link
Contributor Author

im gonna promote it in a few minutes. give it a read. let me know if u want me to make any edits. it's a very casual article compared to my others. hopefully a fun article. may not even make sense to people not yet familiar with RFR. but a picture says a thousand words, and there are a great number of those from ur sexy UI. If anything it will inspire people to play with Code Sandbox.

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

Successfully merging a pull request may close this issue.

2 participants