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

Application Error TypeError: Cannot read properties of null (reading 'name') #301

Closed
2600box opened this issue May 9, 2024 · 7 comments · Fixed by #306 or #310
Closed

Application Error TypeError: Cannot read properties of null (reading 'name') #301

2600box opened this issue May 9, 2024 · 7 comments · Fixed by #306 or #310
Assignees
Labels
app:playnite-web Web app bug Something isn't working
Milestone

Comments

@2600box
Copy link
Contributor

2600box commented May 9, 2024

Hello,

When I go to the root, I have the below error, but if I navigate to /browse it mostly works, with some missing images, especially icons, until I scroll and then it produces more or less the same error.

Any idea what is going on?

Root:

Application Error
TypeError: Cannot read properties of null (reading 'name')
    at http://10.0.0.210:3000/build/_shared/chunk-4V4GBMEE.js:1:7525
    at Array.some (<anonymous>)
    at ie (http://10.0.0.210:3000/build/_shared/chunk-4V4GBMEE.js:1:7501)
    at http://10.0.0.210:3000/build/_shared/chunk-4V4GBMEE.js:1:8951
    at Array.flatMap (<anonymous>)
    at get platforms (http://10.0.0.210:3000/build/_shared/chunk-4V4GBMEE.js:1:8940)
    at be (http://10.0.0.210:3000/build/_shared/chunk-4V4GBMEE.js:1:13348)
    at Kc (http://10.0.0.210:3000/build/_shared/chunk-BB27ZC3A.js:7:19516)
    at Pv (http://10.0.0.210:3000/build/_shared/chunk-BB27ZC3A.js:9:43924)
    at kv (http://10.0.0.210:3000/build/_shared/chunk-BB27ZC3A.js:9:39699)

/browse scroll:

    Application Error
TypeError: Cannot read properties of null (reading 'name')
    at http://10.0.0.210:3000/build/_shared/chunk-4V4GBMEE.js:1:7525
    at Array.some (<anonymous>)
    at ie (http://10.0.0.210:3000/build/_shared/chunk-4V4GBMEE.js:1:7501)
    at http://10.0.0.210:3000/build/_shared/chunk-4V4GBMEE.js:1:8951
    at Array.flatMap (<anonymous>)
    at get platforms (http://10.0.0.210:3000/build/_shared/chunk-4V4GBMEE.js:1:8940)
    at be (http://10.0.0.210:3000/build/_shared/chunk-4V4GBMEE.js:1:13348)
    at Kc (http://10.0.0.210:3000/build/_shared/chunk-BB27ZC3A.js:7:19516)
    at ic (http://10.0.0.210:3000/build/_shared/chunk-BB27ZC3A.js:9:3139)
    at Pv (http://10.0.0.210:3000/build/_shared/chunk-BB27ZC3A.js:9:44698)

@andrew-codes
Copy link
Owner

@2600box , which version are you using? I released 3.1.0 earlier today and it was a little broken, but 3.1.1 has the latest resolutions in it. What version are you using specifically?

@andrew-codes
Copy link
Owner

andrew-codes commented May 9, 2024

Also, the broken icons are likely caused by there not being associated platform icons in Playnite. The icons used are pulled from Playnite's platform's icons. I forgot that I had to manually add those. I'm going to create a separate issue to track creating sensible fallbacks for these icons. This will show something sensible (like in my screenshots) if no icons are found.

Edit: separate issue found for missing icons being tracked here in #302 .

@andrew-codes andrew-codes added bug Something isn't working app:playnite-web Web app triage Needs to be triaged labels May 9, 2024
@andrew-codes
Copy link
Owner

I have a fix incoming.

@andrew-codes andrew-codes self-assigned this May 9, 2024
@2600box
Copy link
Contributor Author

2600box commented May 10, 2024

Hi, I get notified when you pushed a tagged release, and give it a try when I can. It is hugely appreciated!

I am no docker expert, but I made a docker compose file and have been running this command to refresh after new versions are pushed: docker compose pull && docker compose up -d --force-recreate

I just ran this command to remove all the old data:

docker compose down --volumes --remove-orphans --rmi all

and then again docker compose pull && docker compose up -d --force-recreate

I then ran the plugin sync, using the latest version I built from source because I do not see recent .pext packages published with 3.1.1 etc.

My docker-compose.yml file for reference is:

services:
  mqtt_broker:
    image: eclipse-mosquitto
    ports:
      - "1883:1883"
    volumes:
      - mosquitto_data:/mosquitto/data
      - mosquitto_log:/mosquitto/log
      - ./mosquitto_config/mosquitto.conf:/mosquitto/config/mosquitto.conf

  mongo_db:
    image: mongo:focal
    volumes:
      - mongo_data:/data/db
    ports:
      - "27017:27017"

  game_db_updater:
    image: ghcr.io/andrew-codes/playnite-web-game-db-updater:v3.1.1
    depends_on:
      - mqtt_broker
      - mongo_db
    environment:
      MQTT_HOST: mqtt_broker
      MQTT_PORT: 1883
      DB_HOST: mongo_db
      DB_PORT: 27017
      DEBUG: "game-db-updater/*"

  playnite_web_app:
    image: ghcr.io/andrew-codes/playnite-web-app:v3.1.1
    depends_on:
      - mqtt_broker
      - mongo_db
    ports:
      - "3000:3000"
    environment:
      PORT: 3000
      DB_HOST: mongo_db
      DB_PORT: 27017
      USERNAME: "2600box"
      PASSWORD: "XXX"
      SECRET: "XXX"
      MQTT_HOST: mqtt_broker
      MQTT_PORT: 1883
      DEBUG: "playnite-web/*"

volumes:
  mosquitto_data:
  mosquitto_log:
  mongo_data:

@2600box
Copy link
Contributor Author

2600box commented May 11, 2024

Hello, I think this is still an issue, judging by the logs I am seeing.

Starting with a Fresh docker instance of 3.1.2 I get these errors on the /browse page. The error page now has Application Error and a pink box but no text.

I can now access the root page, which I could not before, but clicking on "My Games" leads to this error page.

Here are the console logs from Chrome. I don't now if it is helpful?

browse:1 
        
        
       GET http://10.0.0.210:3000/browse 500 (Internal Server Error)
browse:7 💿 Hey developer 👋. You can provide a way better UX than this when your app is running `clientLoader` functions on hydration. Check out https://remix.run/route/hydrate-fallback for more information.
browse:13 💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://remix.run/guides/errors for more information.
chunk-WVIU4XYC.js:21 Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at tc (chunk-WVIU4XYC.js:7:4804)
    at Lv (chunk-WVIU4XYC.js:9:45496)
    at Nv (chunk-WVIU4XYC.js:9:39699)
    at kE (chunk-WVIU4XYC.js:9:39671)
    at xv (chunk-WVIU4XYC.js:9:34680)
    at ru (chunk-WVIU4XYC.js:2:27704)
    at MessagePort.Xs (chunk-WVIU4XYC.js:2:28095)
xf @ chunk-WVIU4XYC.js:21
Yc @ chunk-WVIU4XYC.js:7
Lv @ chunk-WVIU4XYC.js:9
Nv @ chunk-WVIU4XYC.js:9
kE @ chunk-WVIU4XYC.js:9
xv @ chunk-WVIU4XYC.js:9
ru @ chunk-WVIU4XYC.js:2
Xs @ chunk-WVIU4XYC.js:2
chunk-WVIU4XYC.js:21 Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at tc (chunk-WVIU4XYC.js:7:4804)
    at Lv (chunk-WVIU4XYC.js:9:45496)
    at Nv (chunk-WVIU4XYC.js:9:39699)
    at kE (chunk-WVIU4XYC.js:9:39671)
    at xv (chunk-WVIU4XYC.js:9:34680)
    at ru (chunk-WVIU4XYC.js:2:27704)
    at MessagePort.Xs (chunk-WVIU4XYC.js:2:28095)
xf @ chunk-WVIU4XYC.js:21
Yc @ chunk-WVIU4XYC.js:7
Lv @ chunk-WVIU4XYC.js:9
Nv @ chunk-WVIU4XYC.js:9
kE @ chunk-WVIU4XYC.js:9
xv @ chunk-WVIU4XYC.js:9
ru @ chunk-WVIU4XYC.js:2
Xs @ chunk-WVIU4XYC.js:2
chunk-WVIU4XYC.js:7 Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at tc (chunk-WVIU4XYC.js:7:4804)
    at Lv (chunk-WVIU4XYC.js:9:45496)
    at Nv (chunk-WVIU4XYC.js:9:39699)
    at kE (chunk-WVIU4XYC.js:9:39671)
    at xv (chunk-WVIU4XYC.js:9:34680)
    at ru (chunk-WVIU4XYC.js:2:27704)
    at MessagePort.Xs (chunk-WVIU4XYC.js:2:28095)
tc @ chunk-WVIU4XYC.js:7
Lv @ chunk-WVIU4XYC.js:9
Nv @ chunk-WVIU4XYC.js:9
kE @ chunk-WVIU4XYC.js:9
xv @ chunk-WVIU4XYC.js:9
ru @ chunk-WVIU4XYC.js:2
Xs @ chunk-WVIU4XYC.js:2
chunk-WVIU4XYC.js:7 Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at tc (chunk-WVIU4XYC.js:7:4804)
    at Lv (chunk-WVIU4XYC.js:9:45496)
    at Nv (chunk-WVIU4XYC.js:9:39699)
    at kE (chunk-WVIU4XYC.js:9:39671)
    at xv (chunk-WVIU4XYC.js:9:34680)
    at ru (chunk-WVIU4XYC.js:2:27704)
    at MessagePort.Xs (chunk-WVIU4XYC.js:2:28095)
tc @ chunk-WVIU4XYC.js:7
Lv @ chunk-WVIU4XYC.js:9
Nv @ chunk-WVIU4XYC.js:9
kE @ chunk-WVIU4XYC.js:9
xv @ chunk-WVIU4XYC.js:9
ru @ chunk-WVIU4XYC.js:2
Xs @ chunk-WVIU4XYC.js:2
chunk-WVIU4XYC.js:7 Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at tc (chunk-WVIU4XYC.js:7:4804)
    at Lv (chunk-WVIU4XYC.js:9:45496)
    at Nv (chunk-WVIU4XYC.js:9:39699)
    at kE (chunk-WVIU4XYC.js:9:39671)
    at xv (chunk-WVIU4XYC.js:9:34680)
    at ru (chunk-WVIU4XYC.js:2:27704)
    at MessagePort.Xs (chunk-WVIU4XYC.js:2:28095)
tc @ chunk-WVIU4XYC.js:7
Lv @ chunk-WVIU4XYC.js:9
Nv @ chunk-WVIU4XYC.js:9
kE @ chunk-WVIU4XYC.js:9
xv @ chunk-WVIU4XYC.js:9
ru @ chunk-WVIU4XYC.js:2
Xs @ chunk-WVIU4XYC.js:2
chunk-WVIU4XYC.js:9 Uncaught Error: Minified React error #423; visit https://reactjs.org/docs/error-decoder.html?invariant=423 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at Lv (chunk-WVIU4XYC.js:9:45155)
    at Nv (chunk-WVIU4XYC.js:9:39699)
    at _E (chunk-WVIU4XYC.js:9:39627)
    at _l (chunk-WVIU4XYC.js:9:39482)
    at yc (chunk-WVIU4XYC.js:9:35865)
    at xv (chunk-WVIU4XYC.js:9:34816)
    at ru (chunk-WVIU4XYC.js:2:27704)
    at MessagePort.Xs (chunk-WVIU4XYC.js:2:28095)
Lv @ chunk-WVIU4XYC.js:9
Nv @ chunk-WVIU4XYC.js:9
_E @ chunk-WVIU4XYC.js:9
_l @ chunk-WVIU4XYC.js:9
yc @ chunk-WVIU4XYC.js:9
xv @ chunk-WVIU4XYC.js:9
ru @ chunk-WVIU4XYC.js:2
Xs @ chunk-WVIU4XYC.js:2
chunk-WVIU4XYC.js:25 
        
        
       GET http://10.0.0.210:3000/browse?_data=routes%2Fbrowse 500 (Internal Server Error)
kf @ chunk-WVIU4XYC.js:25
wy @ chunk-WVIU4XYC.js:37
u @ chunk-WVIU4XYC.js:37
(anonymous) @ chunk-WVIU4XYC.js:37
f @ chunk-WVIU4XYC.js:37
h.loader @ chunk-WVIU4XYC.js:37
h @ chunk-WVIU4XYC.js:2
No @ chunk-WVIU4XYC.js:2
(anonymous) @ chunk-WVIU4XYC.js:1
Df @ chunk-WVIU4XYC.js:1
My @ chunk-WVIU4XYC.js:1
Br @ chunk-WVIU4XYC.js:1
Py @ chunk-WVIU4XYC.js:1
(anonymous) @ chunk-WVIU4XYC.js:37
Fl @ chunk-WVIU4XYC.js:9
Ph @ chunk-WVIU4XYC.js:9
Sv @ chunk-WVIU4XYC.js:9
RE @ chunk-WVIU4XYC.js:9
NE @ chunk-WVIU4XYC.js:9
tn @ chunk-WVIU4XYC.js:9
xv @ chunk-WVIU4XYC.js:9
ru @ chunk-WVIU4XYC.js:2
Xs @ chunk-WVIU4XYC.js:2
chunk-WVIU4XYC.js:21 Error: Unexpected Server Error
xf @ chunk-WVIU4XYC.js:21
Yc @ chunk-WVIU4XYC.js:7
Lv @ chunk-WVIU4XYC.js:9
Nv @ chunk-WVIU4XYC.js:9
kE @ chunk-WVIU4XYC.js:9
xv @ chunk-WVIU4XYC.js:9
ru @ chunk-WVIU4XYC.js:2
Xs @ chunk-WVIU4XYC.js:2

Here are the logs from playnite_web_app that appear when refreshing the page.

playnite_web_app-1  | TypeError: Cannot read properties of null (reading 'name')
playnite_web_app-1  |     at file:///opt/playnite-web-app/apps/playnite-web/build/index.js:1418:53
playnite_web_app-1  |     at Array.find (<anonymous>)
playnite_web_app-1  |     at PlayniteWebApi.getPlatformDto (file:///opt/playnite-web-app/apps/playnite-web/build/index.js:1417:58)
playnite_web_app-1  |     at file:///opt/playnite-web-app/apps/playnite-web/build/index.js:1404:24
playnite_web_app-1  |     at Array.map (<anonymous>)
playnite_web_app-1  |     at PlayniteWebApi.gameEntityToGameOnPlatform (file:///opt/playnite-web-app/apps/playnite-web/build/index.js:1382:25)
playnite_web_app-1  |     at file:///opt/playnite-web-app/apps/playnite-web/build/index.js:1372:47
playnite_web_app-1  |     at Array.map (<anonymous>)
playnite_web_app-1  |     at PlayniteWebApi.getGames (file:///opt/playnite-web-app/apps/playnite-web/build/index.js:1371:7)
playnite_web_app-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
playnite_web_app-1  | [Error: Unexpected Server Error]
playnite_web_app-1  | TypeError: Cannot read properties of null (reading 'name')
playnite_web_app-1  |     at file:///opt/playnite-web-app/apps/playnite-web/build/index.js:1418:53
playnite_web_app-1  |     at Array.find (<anonymous>)
playnite_web_app-1  |     at PlayniteWebApi.getPlatformDto (file:///opt/playnite-web-app/apps/playnite-web/build/index.js:1417:58)
playnite_web_app-1  |     at file:///opt/playnite-web-app/apps/playnite-web/build/index.js:1404:24
playnite_web_app-1  |     at Array.map (<anonymous>)
playnite_web_app-1  |     at PlayniteWebApi.gameEntityToGameOnPlatform (file:///opt/playnite-web-app/apps/playnite-web/build/index.js:1382:25)
playnite_web_app-1  |     at file:///opt/playnite-web-app/apps/playnite-web/build/index.js:1372:47
playnite_web_app-1  |     at Array.map (<anonymous>)
playnite_web_app-1  |     at PlayniteWebApi.getGames (file:///opt/playnite-web-app/apps/playnite-web/build/index.js:1371:7)
playnite_web_app-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@andrew-codes andrew-codes reopened this May 12, 2024
@andrew-codes
Copy link
Owner

Hi. Yes the logs are helpful so thank you. From your them, I suspect I know the root cause of the issue. Not all game platforms/sources are supported at the moment. The reason is that the app consolidates games on different platforms into a single game entity. There are some sources/platforms I don't have so they were not implemented yet. Even so, the app should not crash with an unsupported platform, so that is an issue. I'll look into this issue today/this week. I'll open a separate issue to track supporting all platforms.

@2600box
Copy link
Contributor Author

2600box commented May 13, 2024

Writing to confirm that 3.1.3 seems to fix this issue now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment