zyachel / quetre

A libre front-end for Quora
https://quetre.iket.me
GNU Affero General Public License v3.0
439 stars 31 forks source link

Unexpected token u in JSON at position 0 #101

Closed dfuentes87 closed 1 year ago

dfuentes87 commented 1 year ago

Server: Debian 11, 64 bit; 1 CPU 2.65 Ghz; 2 GB RAM Quetre: Docker build (latest) using Nginx frontend proxy

Troubleshooting: Confirmed not OOM-killer, have enough disk space, fully removed container and rebuilt the container

Issue: 95% of my requests regardless of question looked up end up in a 500 Internal Server Error with the following error in the logs:

2023-04-09T19:12:52.938566622Z  🔴 Unexpected token u in JSON at position 0
2023-04-09T19:12:52.938621384Z SyntaxError: Unexpected token u in JSON at position 0
2023-04-09T19:12:52.938626294Z     at JSON.parse (<anonymous>)
2023-04-09T19:12:52.938642161Z     at file:///app/fetchers/getAnswers.js:16:16
2023-04-09T19:12:52.938646118Z     at Array.map (<anonymous>)
2023-04-09T19:12:52.938649765Z     at getAnswers (file:///app/fetchers/getAnswers.js:15:34)
2023-04-09T19:12:52.938653819Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-04-09T19:12:52.938657546Z     at async getOrSetCache (file:///app/utils/getOrSetCache.js:9:23)
2023-04-09T19:12:52.938661156Z     at async file:///app/controllers/viewController.js:50:23

That is the full error at each load of a page. If I keep refreshing, eventually the page does correctly show the answer, but then continuing to refresh goes back to a 500 ISE with the same error in the logs.

Screenshot:

Screenshot 2023-04-09 at 3 30 07 PM
zyachel commented 1 year ago

I'll take a look into this.