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

Pushing a scene outside of tab view results in "Maximum call stack size exceeded" exception #2

Open
rgovindji opened this issue Jun 9, 2016 · 13 comments

Comments

@rgovindji
Copy link

I have a scene outside of my tabs that I push onto the nav stack. Whenever I call Actions.[Scene] I get the following error:
[tid:com.facebook.react.RCTExceptionsManagerQueue] Unhandled JS Exception: Maximum call stack size exceeded

screen shot 2016-06-09 at 4 29 24 pm

@r0b1n
Copy link
Owner

r0b1n commented Jun 11, 2016

@rgovindji thanks for your feedback!
Could you please provide code which reproduce error?

@sibelius
Copy link
Contributor

@rgovindji have u figure it out this error?

@sibelius
Copy link
Contributor

I think this happens when you pass an enviroment prop

@rgovindji
Copy link
Author

I haven't had a chance to figure it out. I wasn't passing an environment prop to the Relay wrapper. I believe I was doing something wrong but I'll attempt integrating this on the weekend.

@sibelius
Copy link
Contributor

this happens when you pass environment parameters,

this line is the problem https://github.com/r0b1n/rnrf-relay-renderer/blob/master/src/RelayComponentRenderer.js#L39

we cannot pass all the params inside queryConfig

@sibelius
Copy link
Contributor

@r0b1n can we move the params of queryConfig to this line https://github.com/r0b1n/rnrf-relay-renderer/blob/master/src/RelayComponentRenderer.js#L50

what do think? I don't submit a PR for this

@sibelius
Copy link
Contributor

sibelius commented Jun 15, 2016

in fact it is not so simple, if u wanna we can discuss this on gitter, slack, email, twitter, email, whatsapp, just let me know

@r0b1n
Copy link
Owner

r0b1n commented Jun 15, 2016

Hi @sibelius
The main reason of passing whole navigationState to queryConfig is because we can't distinguish which params we need here, btw basically it is only one or two of them.
For example if we go to scene using code like this:

Actions.userInfo({userId: 123})

We need to pass userId to params of queryConfig.

I am not sure, I thinks moving params to L50 won't work. I may be wrong.

@sibelius
Copy link
Contributor

yeah, it does not work.

I'm trying to figure it out which part of navigationState is causing this error

@sibelius
Copy link
Contributor

It is breaking here https://github.com/facebook/relay/blob/master/src/container/getRelayQueries.js#L44

it only breaks if I pass environment to params

@sibelius
Copy link
Contributor

this happens because stableStringify does not handle circular references

@sibelius
Copy link
Contributor

small fix to handle this for now: sibelius@fd3140d

@sibelius
Copy link
Contributor

sibelius commented Oct 6, 2016

fixed on master @r0b1n please close this after some tests

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

No branches or pull requests

3 participants