queleok / words-hunter

Basic word game implemented in TS. Rules are simple: get points for composing words from the given set of letters.
https://queleok.github.io/words-hunter/
MIT License
1 stars 0 forks source link

Queueing appears to be broken sometimes #26

Closed queleok closed 3 years ago

queleok commented 3 years ago

image Not sure why, but it looks like I messed up the queueing somehow. The whole point of building the queue was to avoid sending simultaneous requests.

queleok commented 3 years ago

This should be somehow related (all words are processed, but there is still the message suggesting otherwise & the button to resend) image

queleok commented 3 years ago
words-hunter.js:297 GET https://api.dictionaryapi.dev/api/v2/entries/en/hottest 429
(anonymous) @ words-hunter.js:297
setTimeout (async)
tryFetch @ words-hunter.js:296
(anonymous) @ words-hunter.js:306
Promise.then (async)
(anonymous) @ words-hunter.js:298
setTimeout (async)
tryFetch @ words-hunter.js:296
enqueue @ words-hunter.js:114
resend @ words-hunter.js:160
words-hunter.js:321 Failed to resolve word "hottest" due to network issues, error: TypeError: Cannot read property 'some' of undefined
words-hunter.js:118 attempt to dequeue empty queue
words-hunter.js:118 attempt to dequeue empty queue

from the console

queleok commented 3 years ago
words-hunter.js:297 GET https://api.dictionaryapi.dev/api/v2/entries/en/nof 404
(anonymous) @ words-hunter.js:297
setTimeout (async)
tryFetch @ words-hunter.js:296
dequeue @ words-hunter.js:133
(anonymous) @ words-hunter.js:311
Promise.then (async)
(anonymous) @ words-hunter.js:308
setTimeout (async)
tryFetch @ words-hunter.js:296
dequeue @ words-hunter.js:133
(anonymous) @ words-hunter.js:311
Promise.then (async)
(anonymous) @ words-hunter.js:308
setTimeout (async)
tryFetch @ words-hunter.js:296
enqueue @ words-hunter.js:114
publishWord @ words-hunter.js:355
handleWord @ words-hunter.js:405
words-hunter.js:297 GET https://api.dictionaryapi.dev/api/v2/entries/en/alot 404
(anonymous) @ words-hunter.js:297
setTimeout (async)
tryFetch @ words-hunter.js:296
enqueue @ words-hunter.js:114
publishWord @ words-hunter.js:355
handleWord @ words-hunter.js:405
words-hunter.js:297 GET https://api.dictionaryapi.dev/api/v2/entries/en/larf 429
(anonymous) @ words-hunter.js:297
setTimeout (async)
tryFetch @ words-hunter.js:296
enqueue @ words-hunter.js:114
publishWord @ words-hunter.js:355
handleWord @ words-hunter.js:405
words-hunter.js:321 Failed to resolve word "larf" due to network issues, error: TypeError: Cannot read property 'some' of undefined
words-hunter.js:297 GET https://api.dictionaryapi.dev/api/v2/entries/en/larf 429
(anonymous) @ words-hunter.js:297
setTimeout (async)
tryFetch @ words-hunter.js:296
(anonymous) @ words-hunter.js:306
Promise.then (async)
(anonymous) @ words-hunter.js:298
setTimeout (async)
tryFetch @ words-hunter.js:296
enqueue @ words-hunter.js:114
publishWord @ words-hunter.js:355
handleWord @ words-hunter.js:405
words-hunter.js:321 Failed to resolve word "larf" due to network issues, error: TypeError: Cannot read property 'some' of undefined
words-hunter.js:118 attempt to dequeue empty queue
words-hunter.js:297 GET https://api.dictionaryapi.dev/api/v2/entries/en/larf 429
(anonymous) @ words-hunter.js:297
setTimeout (async)
tryFetch @ words-hunter.js:296
(anonymous) @ words-hunter.js:306
Promise.then (async)
(anonymous) @ words-hunter.js:298
setTimeout (async)
tryFetch @ words-hunter.js:296
(anonymous) @ words-hunter.js:306
Promise.then (async)
(anonymous) @ words-hunter.js:298
setTimeout (async)
tryFetch @ words-hunter.js:296
enqueue @ words-hunter.js:114
publishWord @ words-hunter.js:355
handleWord @ words-hunter.js:405
words-hunter.js:321 Failed to resolve word "larf" due to network issues, error: 429
words-hunter.js:118 attempt to dequeue empty queue

somewhat cleaner example (this is the full log from the restart of the game) image

queleok commented 3 years ago

Looks like this is one more regression after the case about filtering out abbreviations 🙈