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

Regression from #70 #72

Closed
minhducsun2002 opened this issue Apr 1, 2019 · 5 comments · Fixed by #74
Closed

Regression from #70 #72

minhducsun2002 opened this issue Apr 1, 2019 · 5 comments · Fixed by #74

Comments

@minhducsun2002
Copy link
Contributor

(node:4597) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'username' of null
    at docs.map (/home/cipher/Projects/wafter/src/data/database.js:319:62)
    at Array.map (<anonymous>)
    at Promise.all.then (/home/cipher/Projects/wafter/src/data/database.js:318:47)
(node:4597) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4597) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@dungwinux
Copy link
Member

Can you specify use case ?

@minhducsun2002
Copy link
Contributor Author

Normal usage. This can be reproduced with the bundled Hestia revision in 1.7.

@dungwinux
Copy link
Member

dungwinux commented Apr 1, 2019

See #73

@minhducsun2002
Copy link
Contributor Author

I suggest this to be re-opened.

::ffff:127.0.0.1 - GET /api/users HTTP/1.1 401 12 - 12.258 ms
::ffff:127.0.0.1 - GET /api/subs?count=0&page=0&size=10 HTTP/1.1 401 12 - 1.229 ms
(node:27003) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'username' of null
    at docs.map (/home/cipher/Projects/wafter/src/data/database.js:319:62)
    at Array.map (<anonymous>)
    at Promise.all.then (/home/cipher/Projects/wafter/src/data/database.js:318:47)
(node:27003) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:27003) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
$ sh -c 'git show HEAD'
commit 0ddd5bcb6fd07d14db1b1c62251bfe2c9817c1d0 (HEAD -> master, origin/master, origin/HEAD)
Merge: 68aabe8 c80c42b
Author: Nguyễn Tuấn Dũng <ntddebugger@gmail.com>
Date:   Mon Apr 1 21:41:05 2019 +0700

    Merge pull request #73 from vnma0/72-fix
    
    Completely handle all unhandled promise in db

@minhducsun2002
Copy link
Contributor Author

Note that this prevents the functionality of providing submissions data - nothing could be fetched from the server.

dungwinux added a commit that referenced this issue Apr 4, 2019
dungwinux added a commit that referenced this issue Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants