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

React DOM SSR crashes since React-Dom 16.6.2 #16848

Closed
ernestognw opened this issue Sep 21, 2019 · 3 comments
Closed

React DOM SSR crashes since React-Dom 16.6.2 #16848

ernestognw opened this issue Sep 21, 2019 · 3 comments

Comments

@ernestognw
Copy link

ernestognw commented Sep 21, 2019

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
I've setup an SSR configuration using ReactDOM.renderToString() method with react-apollo, and it throws an Invariant violation as the following, with no more information about:

Captura de pantalla 2019-09-21 a la(s) 6 29 37

Everything returns to normal when downgrading to [email protected]

My SSR App component

Captura de pantalla 2019-09-21 a la(s) 6 33 24

Things I've tried

  • I have changed the react-dom package to serve the development version (./cjs/react-dom-server.node.development.js), just for debugging, and when importing that version, everything works fine, but when I return to the production version (./cjs/react-dom-server.node.production.min.js) the same error appears.

  • I removed one by one, every component wrapping my <App/>, and the one that seems to be causing the error is the <AuthProvider>, which is a context implementation of mine. By removing some things on that component, i figured out that is a problem within a HOC provided by react-apollo, but I don't know exactly what it is because it doesn't show me any information.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:

I actually do not have any way to reproduce it quickly.

What is the expected behavior?
Render correctly the website.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

React - 16.9.0
React-DOM - 16.9.0
Browsers - Safari and Chrome (tested)

Working if downgrading to React-DOM 16.6.1

@soldovskii
Copy link

I think renderToString do not await callback from Context, have some issue

@stale
Copy link

stale bot commented Jan 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.

@stale stale bot added the Resolution: Stale Automatically closed due to inactivity label Jan 9, 2020
@stale stale bot removed the Resolution: Stale Automatically closed due to inactivity label Jan 9, 2020
@gaearon
Copy link
Collaborator

gaearon commented Mar 24, 2021

Closing since there's no repro

@gaearon gaearon closed this as completed Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants