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

Stumbled upon a Vike bug. #1852

Closed
mean-ui-thread opened this issue Sep 5, 2024 · 7 comments
Closed

Stumbled upon a Vike bug. #1852

mean-ui-thread opened this issue Sep 5, 2024 · 7 comments
Labels

Comments

@mean-ui-thread
Copy link

Description

3:35:15 p.m. [vike@0.4.193][request(1)][Bug] You stumbled upon a Vike bug. Go to https://github.com/vikejs/vike/issues/new and copy-paste this error. A maintainer will fix the bug (usually under 24 hours).
    at createHttpResponseObject (file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/runtime/renderPage/createHttpResponseObject.js:18:13)
    at renderPageAlreadyRouted (file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/runtime/renderPage/renderPageAlreadyRouted.js:65:36)
    at renderPageNominal (file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/runtime/renderPage.js:284:36)
    at renderPageAlreadyPrepared (file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/runtime/renderPage.js:119:45)
    at renderPageAndPrepare (file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/runtime/renderPage.js:99:12)
    at file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/plugin/shared/getHttpRequestAsyncStore.js:54:35
    at renderPage (file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/runtime/renderPage.js:45:35)
    at file:///home/mean-ui-thread/vike-app/server/express.ts:1:1597
@brillout
Copy link
Member

brillout commented Sep 5, 2024

Try again with 0.4.194 and if you get the error again then share the new stack trace. I'll re-open then.

@brillout brillout closed this as not planned Won't fix, can't repro, duplicate, stale Sep 5, 2024
@mean-ui-thread
Copy link
Author

Yup, still happening. same exact stack.

@mean-ui-thread
Copy link
Author

mean-ui-thread commented Sep 5, 2024

3:48:58 p.m. [vike@0.4.194][request(2)][Bug] You stumbled upon a Vike bug. Go to https://github.com/vikejs/vike/issues/new and copy-paste this error. A maintainer will fix the bug (usually under 24 hours).
    at createHttpResponse (file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/runtime/renderPage/createHttpResponse.js:17:13)
    at renderPageAlreadyRouted (file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/runtime/renderPage/renderPageAlreadyRouted.js:60:32)
    at renderPageNominal (file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/runtime/renderPage.js:282:36)
    at renderPageAlreadyPrepared (file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/runtime/renderPage.js:116:45)
    at renderPageAndPrepare (file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/runtime/renderPage.js:96:12)
    at file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/plugin/shared/getHttpRequestAsyncStore.js:54:35
    at renderPage (file:///home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/runtime/renderPage.js:43:35)
    at file:///home/mean-ui-thread/vike-app/server/express.ts:1:1597

@brillout brillout reopened this Sep 5, 2024
@brillout
Copy link
Member

brillout commented Sep 5, 2024

Inject the following before line 17 of /home/mean-ui-thread/vike-app/node_modules/vike/dist/esm/node/runtime/renderPage/createHttpResponse.js and report back the result.

         if (pageContext.errorWhileRendering) {
+            console.log('pageContext.errorWhileRendering', pageContext.errorWhileRendering);
+            console.log('pageContext._pageId', pageContext._pageId);
             assert(isError);
``

@mean-ui-thread
Copy link
Author

no need. that's precisely how I caused this issue. I tried to inject my own error messages during a server-side custom react hook using errorWhileRendering

and that was (obviously) the wrong thing to do 😓

@mean-ui-thread
Copy link
Author

I originally tried throw Render but it doesn't seem that I can abort a render once it started.

@brillout
Copy link
Member

brillout commented Sep 5, 2024

Yea, that's actually what I thought.

As for what you're trying to achieve, feel free to elaborate in a new discussion.

@brillout brillout closed this as not planned Won't fix, can't repro, duplicate, stale Sep 5, 2024
brillout added a commit that referenced this issue Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants