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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE11 not working after v9.2.1-canary.2 update #10278

Closed
devbrains-com opened this issue Jan 27, 2020 · 16 comments
Closed

IE11 not working after v9.2.1-canary.2 update #10278

devbrains-com opened this issue Jan 27, 2020 · 16 comments

Comments

@devbrains-com
Copy link

devbrains-com commented Jan 27, 2020

Bug report

Describe the bug

First of all: sorry for posting a boring IE11 issue 馃槶

After Updating to v9.2.1 our project stoped working on IE11. The pages didnt load as expected and the css wasn't applied correctly. So we went through the canary releases and got to the point, that the changes in v9.2.1-canary.2 cause the behaviour. More specificly the pullrequest "Fix hydration with custom _app and granular chunks #10144" file "packages/next/build/entries.ts" line 129.

To Reproduce

  1. Go to with-polyfills example
  2. Open examples\with-polyfills\client\polyfills.js and add the following imports before the other imports:
import 'core-js/es7/object'
import 'core-js/es7/map'
import 'core-js/es7/array'
import 'core-js/es6'
import 'core-js/es7/symbol'
  1. In the package.json use Version "9.2.1-canary.1" first (it works) and then "9.2.1-canary.2" (its broken)
  2. yarn
  3. yarn build
  4. yarn start
  5. open Page in IE 11

We have a rather complicated project with next-css etc. But to reproduce we used a local production build and opened the page in IE11. Before the described Change, everything worked as expected but didn't after the change. The first thing to notice was the css, that wasn't applied correctly and the parsing error on the console.

We changed the following code:

client[bundlePath] =
        page === '/_app'
          ? [pageLoader, require.resolve('../client/router')]
          : pageLoader

to:

client[bundlePath] = pageLoader

and the page worked again but I assume something else doesn't :). It looks like the require.resolve() could be the problem on IE11?

Expected behavior

The page is displayed correctly as with the previous versions.

Screenshots

Before (good):
image

After (broken):
image

System information

  • OS: Windows 10
  • Browser (if applies) IE 11 (11.592.18362.0)
  • Version of Next.js: v9.2.1-canary.2 and newer
@timneutkens timneutkens added the please add a complete reproduction The issue lacks information for further investigation label Jan 27, 2020
@timneutkens
Copy link
Member

timneutkens commented Jan 27, 2020

Please provide a full reproducible demo of the issue so that we can take a look. We run all Next.js production tests against multiple browsers including IE11.

@devbrains-com
Copy link
Author

just added the steps to reproduce 馃憤

@devbrains-com
Copy link
Author

It seems to be the following import: import 'core-js/es6'

@RossMcMillan92
Copy link

I've experienced this too with the v9.2.1 update. Sometimes in IE11 we'll see objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner, _store})., whereas other times it works fine.

Pinning the Next version to 9.2.0 fixes the issue.

@timneutkens timneutkens added Type: Needs Investigation and removed please add a complete reproduction The issue lacks information for further investigation labels Jan 28, 2020
@chr1gu

This comment has been minimized.

@WillSelway
Copy link

WillSelway commented Jan 28, 2020

We are also having the same issue after upgrading to 9.2.1.

Below is full reproducible demo, including an image of the issue (can only been seen in console in the demo)
https://github.com/WillSelway/nextjs-ie11-issue
https://github.com/WillSelway/nextjs-ie11-issue/blob/master/nextjsIssue.PNG

Thank you for taking a look

@timneutkens
Copy link
Member

timneutkens commented Jan 28, 2020

@chrigu-ebert please don't spam the thread with +1. If you want to +1 an issue you can use GitHub emoji reactions and 馃憤 on the initial issue.

@niamleeson
Copy link

niamleeson commented Feb 24, 2020

Any update on this issue? Polyfills not working with 9.2 is the only thing keeping us from upgrading. We would love to use the catch-all routes without a custom express server.

@Timer
Copy link
Member

Timer commented Feb 24, 2020

IE11 is supported out of the box, no polyfills required in next@canary. Any polyfills that are required for app-features should be imported first thing in pages/_app.js.

@nsmith7989
Copy link

FWIW our issue was styled components, next@9.2 and IE11.

styled-components/styled-components#2190 (comment)

We need the Symbol polyfill to load before React itself.

In 9.1 we can add polyfills before main.js with-polyfills and that would load it before react. 9.2 onwards there is no guarantee that code runs before React.

@Timer Is there a path forward in 9.2 to load polyfills required for app-features before React loads?

@vjekofalco
Copy link

FWIW our issue was styled components, next@9.2 and IE11.

styled-components/styled-components#2190 (comment)

We need the Symbol polyfill to load before React itself.

In 9.1 we can add polyfills before main.js with-polyfills and that would load it before react. 9.2 onwards there is no guarantee that code runs before React.

@Timer Is there a path forward in 9.2 to load polyfills required for app-features before React loads?

Correct, in our case issue is in custom Webpack entries configured in next.config.js . Investigating solution.

@Timer
Copy link
Member

Timer commented Mar 6, 2020

Next.js 9.3 (next@canary) will load all polyfills for IE11 before any other code executes.

@vitorhsb
Copy link
Contributor

vitorhsb commented Mar 6, 2020

Next.js 9.3 (next@canary) will load all polyfills for IE11 before any other code executes.

Will this still require custom next.config.js code to load polyfills or it will load out of the box?

@Timer
Copy link
Member

Timer commented Mar 7, 2020

This happens out of the box.

@Timer
Copy link
Member

Timer commented Sep 10, 2020

Closing as stale. Please let us know if anyone is still having issues.

@Timer Timer closed this as completed Sep 10, 2020
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests