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

NPE in finishGame #4

Closed
eltoder opened this issue Nov 17, 2024 · 1 comment · Fixed by #22 or #23
Closed

NPE in finishGame #4

eltoder opened this issue Nov 17, 2024 · 1 comment · Fixed by #22 or #23
Labels
bug Something isn't working

Comments

@eltoder
Copy link
Owner

eltoder commented Nov 17, 2024

Seems to happen in every game. Saw it in the emulator as well.

Unhandled error TypeError: Cannot read properties of null (reading 'status')

at .Object.update ( /workspace/lib/index.js:51 )
at .repoStartTransaction ( /workspace/node_modules/@firebase/database-compat/dist/index.standalone.js:15094 )
at .runTransaction ( /workspace/node_modules/@firebase/database-compat/dist/index.standalone.js:17692 )
at .Reference.transaction ( /workspace/node_modules/@firebase/database-compat/dist/index.standalone.js:18486 )
at undefined. ( /workspace/lib/index.js:50 )
at process.processTicksAndRejections ( node:internal/process/task_queues:95 )
@eltoder eltoder added the bug Something isn't working label Nov 17, 2024
@eltoder eltoder changed the title Fix 500 in finishGame 500 in finishGame Nov 17, 2024
@eltoder eltoder changed the title 500 in finishGame NPE in finishGame Nov 17, 2024
eltoder added a commit that referenced this issue Nov 18, 2024
Apparently, transaction handlers are very often called with null even if
the object exists as an optimization. See:

https://groups.google.com/g/firebase-talk/c/Lyb0KlPdQEo
https://stackoverflow.com/a/65415636/5190601

Fixes: #4
eltoder added a commit that referenced this issue Nov 18, 2024
Apparently, transaction handlers are very often called with null even if
the object exists as an optimization. See:

https://groups.google.com/g/firebase-talk/c/Lyb0KlPdQEo
https://stackoverflow.com/a/65415636/5190601

Also, use server-side increment in createGame.

Fixes: #4
eltoder added a commit that referenced this issue Nov 18, 2024
Apparently, transaction handlers are very often called with null even if
the object exists as an optimization. See:

https://groups.google.com/g/firebase-talk/c/Lyb0KlPdQEo
https://stackoverflow.com/a/65415636/5190601

Also, use server-side increment in createGame.

Fixes: #4
eltoder added a commit that referenced this issue Nov 18, 2024
Apparently, transaction handlers are very often called with null even if
the object exists as an optimization. See:

https://groups.google.com/g/firebase-talk/c/Lyb0KlPdQEo
https://stackoverflow.com/a/65415636/5190601

Also, use server-side increment in createGame.

Fixes: #4
@eltoder
Copy link
Owner Author

eltoder commented Nov 18, 2024

Changed from 500 to 400.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant