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

[Bug]: Runtime not working with version 13.3.0 and latest versions 13.3.3 of NextJs (state and rendering issue) #2079

Closed
1 of 3 tasks
bentrynning opened this issue May 1, 2023 · 3 comments
Labels
type: bug code to address defects in shipped code

Comments

@bentrynning
Copy link

bentrynning commented May 1, 2023

Summary

With version 13.3.0"
State is not preserved between App routes with NextJs runtime.
When setting state with context and navigation to a new app route the context state is then reset when loading the new route. (see console for the state)
Deployment here: https://deploy-preview-1--luminous-stroopwafel-f13ec5.netlify.app/

Repo to reproduce is here: https://github.com/bentrynning/next-app-test

Also tried to bump to the latest version 13.3.3
But then app is not loading at all.
Deployment here: https://luminous-stroopwafel-f13ec5.netlify.app/

All works well locally and also when hosted on Vercel.com
https://next-app-test-mu.vercel.app/

Steps to reproduce

  1. Fork https://github.com/bentrynning/next-app-test
  2. Install on netlify using @netlify/plugin-nextjs@4.36.0 (this is default) when setting up a new project

A link to a reproduction repository

https://github.com/bentrynning/next-app-test

Next Runtime version

4.36.0

Is your issue related to the app directory (beta)?

  • Yes, I am using the app directory

More information about your build

  • I am building using the CLI
  • I am building using file-based configuration (netlify.toml)

What OS are you using?

Mac

Your netlify.toml file

No response

Your public/_redirects file

No response

Your next.config.js file

`next.config.js`
/** @type {import('next').NextConfig} */
const nextConfig = {
  experimental: {
    appDir: true,
  },
  pageExtensions: ['ts', 'tsx', 'js', 'jsx'],
}

module.exports = nextConfig

Function logs

Function logs

With NextJs 13.3.3 SSR function

ay 1, 12:57:15 PM: 48c6bf10 ERROR  TypeError: Cannot set properties of undefined (setting 'current')
    at ue (/var/task/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:113:42)
    at /var/task/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:151:127
    at new Promise (<anonymous>)
    at Object.exports.renderToReadableStream (/var/task/node_modules/next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.min.js:151:53)
    at /var/task/node_modules/next/dist/server/node-web-streams-helper.js:195:117
    at NextTracerImpl.trace (/var/task/node_modules/next/dist/server/lib/trace/tracer.js:86:20)
    at renderToInitialStream (/var/task/node_modules/next/dist/server/node-web-streams-helper.js:195:37)
    at /var/task/node_modules/next/dist/server/app-render/app-render.js:937:92
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
@bentrynning bentrynning added the type: bug code to address defects in shipped code label May 1, 2023
@nickytonline
Copy link

We're in the process of upgrading to 13.3.4 in #2080, so hopefully this should be sorted once that gets merged.

@bentrynning
Copy link
Author

Any forcast on when the new runtime plugin will be available @nickytonline.
Just in case a need to downgrade Nextjs until my next release. :)

Thank you for your great work with Netlify! 💯

@LekoArts
Copy link

Closing this as a duplicate of #2089

We're still actively working on #2080 to fix this

@LekoArts LekoArts closed this as not planned Won't fix, can't repro, duplicate, stale May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

3 participants