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

Unexpected Server Error TypeError: Cannot read properties of null (reading 'useEffect') #9296

Closed
ChippuArt opened this issue Apr 23, 2024 · 2 comments
Labels
bug:unverified needs-response We need a response from the original author about this issue/PR renderer:react

Comments

@ChippuArt
Copy link

Reproduction

Anforderungs-URL:
http://localhost:3000/
Anforderungsmethode:
GET
Statuscode:
500 Internal Server Error
Remoteadresse:
[::1]:3000
Referrer-Richtlinie:
strict-origin-when-cross-origin
Access-Control-Allow-Origin:
*
Connection:
keep-alive
Content-Encoding:
gzip
Content-Type:
text/plain; charset=utf-8
Date:
Tue, 23 Apr 2024 20:51:18 GMT
Keep-Alive:
timeout=5
Transfer-Encoding:
chunked
Vary:
Accept-Encoding
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encoding:
gzip, deflate, br, zstd
Accept-Language:
de,de-DE;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
Cache-Control:
max-age=0
Connection:
keep-alive
Host:
localhost:3000
Sec-Ch-Ua:
"Chromium";v="124", "Microsoft Edge";v="124", "Not-A.Brand";v="99"
Sec-Ch-Ua-Mobile:
?1
Sec-Ch-Ua-Platform:
"Android"
Sec-Fetch-Dest:
document
Sec-Fetch-Mode:
navigate
Sec-Fetch-Site:
none
Sec-Fetch-User:
?1
Upgrade-Insecure-Requests:
1
User-Agent:
Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36 Edg/124.0.0.0

Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the
following reasons:

  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app
    See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
    TypeError: Cannot read properties of null (reading 'useEffect')
    at Module.useEffect (C:\Users\Flori\Desktop\Poker-Design\node_modules\react\cjs\react.development.js:1634:21)
    at QueryClientProvider (file:///C:/Users/Flori/Desktop/Poker-Design/node_modules/@tanstack/react-query/build/lib/QueryClientP
    rovider.mjs:46:9)
    at renderWithHooks (C:\Users\Flori\Desktop\Poker-Design\Poker\poker\node_modules\react-dom\cjs\react-dom-server.node.developm
    ent.js:5724:16)
    at renderIndeterminateComponent (C:\Users\Flori\Desktop\Poker-Design\Poker\poker\node_modules\react-dom\cjs\react-dom-server.
    node.development.js:5797:15)
    at renderElement (C:\Users\Flori\Desktop\Poker-Design\Poker\poker\node_modules\react-dom\cjs\react-dom-server.node.developmen
    t.js:6012:7)
    at renderNodeDestructiveImpl (C:\Users\Flori\Desktop\Poker-Design\Poker\poker\node_modules\react-dom\cjs\react-dom-server.nod
    e.development.js:6170:11)

I get all this error message, but I found not even one useEffect hook, which I use wrong & on top i dont even use QueryClientProvider. So I have no idea why I get all the error messages.

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
    Memory: 1.04 GB / 7.75 GB
  Binaries:
    Node: 21.0.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 124.0.6367.61
    Edge: Chromium (123.0.2420.97)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    @remix-run/css-bundle: ^2.9.0 => 2.9.0 
    @remix-run/dev: ^2.9.0 => 2.9.0
    @remix-run/express: ^2.9.0 => 2.9.0
    @remix-run/node: ^2.9.0 => 2.9.0
    @remix-run/react: ^2.9.0 => 2.9.0
    @remix-run/serve: ^2.9.0 => 2.9.0
    vite: ^5.2.10 => 5.2.10

Used Package Manager

npm

Expected Behavior

I call node server.js It should just open the first page.

Actual Behavior

500 error.

@RafalFilipek
Copy link

Can you provide an example? https://stackblitz.com/fork/github/remix-run/remix/tree/main/templates/remix

Unfortunately, There is no way to help without any code.

@brophdawg11 brophdawg11 added needs-response We need a response from the original author about this issue/PR renderer:react labels Apr 24, 2024
Copy link
Contributor

github-actions bot commented May 4, 2024

This issue has been automatically closed because we haven't received a response from the original author 🙈. This automation helps keep the issue tracker clean from issues that are unactionable. Please reach out if you have more information for us! 🙂

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:unverified needs-response We need a response from the original author about this issue/PR renderer:react
Projects
None yet
Development

No branches or pull requests

3 participants