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

IE11 & Edge SSR - Warning: Prop d did not match. Server: “M 0 0 h 24 v 24 H 0 Z” Client: “M0 0h24v24H0z” #14997

Closed
2 tasks done
williamsdyyz opened this issue Mar 21, 2019 · 4 comments
Labels
bug 🐛 Something doesn't work external dependency Blocked by external dependency, we can’t do anything about it

Comments

@williamsdyyz
Copy link
Contributor

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔

ReactDOM.hydrate should not generate any warnings

Current Behavior 😯

On Edge and IE11 only, hydrate warns with:
Warning: Prop d did not match. Server: “M 0 0 h 24 v 24 H 0 Z” Client: “M0 0h24v24H0z”
All other browsers seem to be OK
Hitting the server with CURL shows that the server data is correct.

Steps to Reproduce 🕹

I took the SSR example from material-ui-master/examples/ssr
Added a single SVG icon from @material-ui/icons
Removed code a piece at a time to try to isolate the issue. What's left is the absolute minimum required and the problem still exists.
The project is attached as ssr.zip

ssr.zip

Context 🔦

Working on a project that requres SSR as well as IE11 & Edge support. The MS browsers were happy until I started using @material-ui/icons

Your Environment 🌎

I'm developing on Windows 10 1809
Node v8.9.1

"@babel/core": "latest",
"@babel/node": "latest",
"@babel/plugin-proposal-class-properties": "latest",
"@babel/preset-env": "^7.4.2",
"@babel/preset-react": "latest",
"@material-ui/core": "latest",
"@material-ui/icons": "^3.0.2",
"babel-loader": "next",
"express": "latest",
"fs": "0.0.1-security",
"net": "^1.0.2",
"nodemon": "latest",
"prop-types": "latest",
"react": "latest",
"react-dom": "latest",
"react-jss": "^8.1.0",
"webpack": "latest",
"webpack-cli": "latest"
@eps1lon eps1lon added the bug 🐛 Something doesn't work label Mar 21, 2019
@oliviertassinari
Copy link
Member

@williamsdyyz Do you think that you could reproduce the issue on Codesandbox? https://codesandbox.io/s/18m522pm14 I can't so far.

@williamsdyyz
Copy link
Contributor Author

@oliviertassinari you've created a server-side rendering but it's not the server that is at fault. I verified that the server is sending the correct data - curl localhost:3000 returns
...<svg class="MuiSvgIcon-root-58" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path fill="none" d="M0 0h24v24H0z"></path><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"></path></svg>...

The Hydrate on the client side is logging a warning to the console, but only on IE11 & Edge.

I tried setting up an example in codesandbox with no luck.

The zip file I uploaded demonstrates the problem well and with a minimal amount of code however.

@oliviertassinari
Copy link
Member

oliviertassinari commented Mar 21, 2019

We can open an issue on React side: facebook/react#15187.

@oliviertassinari oliviertassinari added the external dependency Blocked by external dependency, we can’t do anything about it label Mar 21, 2019
@williamsdyyz
Copy link
Contributor Author

@oliviertassinari You reproduced with Next? Thank you.

And thanks for Material-ui - I am a fan 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work external dependency Blocked by external dependency, we can’t do anything about it
Projects
None yet
Development

No branches or pull requests

3 participants