-
Notifications
You must be signed in to change notification settings - Fork 27k
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
[WIP] fixing #2898: no error output if dynamic component with ssr: false crashes #3009
Conversation
Guys, wtf? It is real bug, that is actually making life painful for some people, issue was reported month ago, fix was created 2 weeks ago and you even not commented yet, bug is reproducible and fix is really obvious. And not even a word was spoken :( |
@@ -71,6 +71,13 @@ export default function dynamicComponent (p, o) { | |||
this.state.AsyncComponent = AsyncComponent | |||
} | |||
}) | |||
.catch( | |||
this.ssr | |||
? undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this silently swallow the error when it happens server side? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it would not make anything worse than it is. Both .catch(cb?)
and .then(cb?)
are actually a wrappers around .then(successHandler?, errorHandler?)
. Let me explain it with shell example:
# jabher @ DESKTOP-DTTUH1G in /mnt/c/Users/jabher [1:05:39]
$ node
> process.on("unhandledRejection", console.warn.bind(null, 'in uncaught rejecton')); void 0
undefined
> Promise.reject('test').catch(undefined); void 0
undefined
> in uncaught rejecton test Promise {
<rejected> 'test',
domain:
Domain {
domain: null,
_events: { error: [Function: debugDomainError] },
_eventsCount: 1,
_maxListeners: undefined,
members: [] } }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, nice! 👌 So returning undefined actually will bubble it up 😄 TIL 👍
Hey 👋,
Lets start by pointing to this: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html Specifically:
Sorry to hear that!
As you can see at the moment we have 193 issues, and I'm maintaining Next outside of my day job, meaning all the time I spend outside of work goes towards pushing Next forward.
We've been busy preparing the release of Next v4. Unfortunately I haven't had time to look into all (38) open pull requests. Including yours. I did see your PR though, and assigned Arunoda to review it. I've just sent him a private message asking him to check it out 😄 Again, sorry for your trouble, just trying to explain the context as to why this happened 😄 I've review the PR myself too, just checking if the catch you've added does what we expect it will do 😄 👌 |
@Jabher if you need this now now now, why not |
On one hand - I totally agree about this. On other - everyone answered after a month only when I told that word. So, sorry about that, but I was really tired about checking if someone aswered me with at least "not going into sources, make your own fork". Obviously, I wanted to keep on with master and all the community 😅
@albinekb next is developing rapidly, I've started a project on 4.0 beta few weeks ago totally sure that it will go in release within few months. And rebasing this commit every second day sounds like not very good option. |
Yeah, totally reasonable @Jabher 👍 Well answered. Let's get this one going @timneutkens 🥇 There have just been a lot going on at zeit this month with zeit.co/day, so I can assure you that no one is selectively ignores any PRs :) |
Ah, right, zeit conf. Now everything looks extremely reasonable, I know how much power the conf takes, sorry for that 🙌 |
This is a good check and I think we should ship this ASAP. But before that, I'd like to have a test case for this. If you have don't time, just tell me. I'll work on it. |
@Jabher 👌
A simple ping would have been enough 👌😄 Basically I go through all my notifications every day and respond to everything 👍 |
@@ -0,0 +1,30 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ignore this for now 😄 Had to run, I usually commit after mostly every significant action. Will squash and cleanup everything when it will be ready!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thaaaaaaaanks! 🎉
Guys, sorry, but I feel I'm stuck - I cannot figure out how to test this, I've tried several different approaches, but none worked. |
@Jabher if you make sure the build succeeds we'll add the test later 👍 |
This commit is fixing issue #2898 by adding simple .catch wrapper with window.next.renderError call