Demo redux toolkit not working
royscheeren opened this issue · 1 comments
royscheeren commented
UPDATE: Seems to work when switching to master branch instead of default 8.x. Error is still thrown server side, but client does not crash
Describe the bug
The redux toolkit demo throws an error on the pokemon page.
To Reproduce
Clone the repo
Run yarn
Run yarn start
Open localhost on port 6060
Click the pokemon linke
Expected behavior
The pokemon data shows instead of the following error:
demo-redux-toolkit: DISPATCH
demo-redux-toolkit: An unhandled error occurred processing a request for the endpoint "getPokemonByName".
demo-redux-toolkit: In the case of an unhandled error, no tags will be "provided" or "invalidated". TypeError: Expected signal to be an instanceof AbortSignal
demo-redux-toolkit: at new Request (/Users/.../Projects/next-redux-wrapper/node_modules/next/node_modules/node-fetch/lib/index.js:1222:10)
demo-redux-toolkit: at /Users/.../Projects/next-redux-wrapper/node_modules/@reduxjs/toolkit/dist/query/rtk-query.cjs.development.js:294:31
demo-redux-toolkit: at step (/Users/.../Projects/next-redux-wrapper/node_modules/@reduxjs/toolkit/dist/query/rtk-query.cjs.development.js:23:23)
demo-redux-toolkit: at Object.next (/Users/.../Projects/next-redux-wrapper/node_modules/@reduxjs/toolkit/dist/query/rtk-query.cjs.development.js:4:53)
demo-redux-toolkit: at fulfilled (/Users/.../Projects/next-redux-wrapper/node_modules/@reduxjs/toolkit/dist/query/rtk-query.cjs.development.js:95:32)
demo-redux-toolkit: SERVER STATE {
demo-redux-toolkit: queries: {
demo-redux-toolkit: 'getPokemonByName("pikachu")': {
demo-redux-toolkit: status: 'rejected',
demo-redux-toolkit: endpointName: 'getPokemonByName',
demo-redux-toolkit: requestId: '7RZyK_vKeT9cndGs__WYH',
demo-redux-toolkit: originalArgs: 'pikachu',
demo-redux-toolkit: startedTimeStamp: 1677433230469,
demo-redux-toolkit: error: [Object]
demo-redux-toolkit: }
demo-redux-toolkit: },
demo-redux-toolkit: mutations: {},
demo-redux-toolkit: provided: {},
demo-redux-toolkit: subscriptions: { 'getPokemonByName("pikachu")': { '7RZyK_vKeT9cndGs__WYH': {} } },
demo-redux-toolkit: config: {
demo-redux-toolkit: online: true,
demo-redux-toolkit: focused: true,
demo-redux-toolkit: middlewareRegistered: true,
demo-redux-toolkit: refetchOnFocus: false,
demo-redux-toolkit: refetchOnReconnect: false,
demo-redux-toolkit: refetchOnMountOrArgChange: false,
demo-redux-toolkit: keepUnusedDataFor: 60,
demo-redux-toolkit: reducerPath: 'pokemonApi'
demo-redux-toolkit: }
demo-redux-toolkit: }
Screenshots
Desktop (please complete the following information):
- OS: MacOS 13.1
- Browser Chrome
- Version: git clone seems to result in v7 in package.json
Additional context
kirill-konshin commented
Please create a new ticket and include codesandbox.