You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As soon as the server is up, on the first SSR run the "ERROR [nuxt] [request error] [unhandled] [500] obj.hasOwnProperty is not a function" will appear in the terminal and the page will display "500 internal server error"
The browser displays an "Error 500 internal server error" message:
The terminal shows a message "ERROR [nuxt] [request error] [unhandled] [500] obj.hasOwnProperty is not a function"
Additional information
The error occurs when @nuxt/pinia version 0.6.0 upwards is used in conjunction with Nuxt Apollo, when one of its composables is used in <script setup> the error occurs right after receiving the queried data from the server.
I could trace the error back to the definePayloadPlugin [packages/nuxt/src/runtime/payload-plugin.ts]. This plugin calls the shouldHydrate function [packages/pinia/src/store.ts]. When used in conjunction with Nuxt Apollo’s composables, such as useAsyncQuery, the result of the query is received by the payload reducer and passed to the shouldHydrate function. ShouldHydrate then calls hasOwnProperty on the object received and the error is triggered and handled by Nuxt downstream.
The text was updated successfully, but these errors were encountered:
Reproduction
https://stackblitz.com/edit/nuxt-starter-5sgmex
Steps to reproduce the bug
As soon as the server is up, on the first SSR run the "ERROR [nuxt] [request error] [unhandled] [500] obj.hasOwnProperty is not a function" will appear in the terminal and the page will display "500 internal server error"
Expected behavior
App.vue page should load with sample data retrieved from https://spacex-production.up.railway.app
Actual behavior
The browser displays an "Error 500 internal server error" message:
The terminal shows a message "ERROR [nuxt] [request error] [unhandled] [500] obj.hasOwnProperty is not a function"
Additional information
The error occurs when @nuxt/pinia version 0.6.0 upwards is used in conjunction with Nuxt Apollo, when one of its composables is used in <script setup> the error occurs right after receiving the queried data from the server.
I could trace the error back to the definePayloadPlugin [packages/nuxt/src/runtime/payload-plugin.ts]. This plugin calls the shouldHydrate function [packages/pinia/src/store.ts]. When used in conjunction with Nuxt Apollo’s composables, such as useAsyncQuery, the result of the query is received by the payload reducer and passed to the shouldHydrate function. ShouldHydrate then calls hasOwnProperty on the object received and the error is triggered and handled by Nuxt downstream.
The text was updated successfully, but these errors were encountered: