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

TypeError: Cannot read property 'tasks' of null #1883

Closed
lefnire opened this issue Nov 22, 2013 · 10 comments
Closed

TypeError: Cannot read property 'tasks' of null #1883

lefnire opened this issue Nov 22, 2013 · 10 comments
Assignees

Comments

@lefnire
Copy link
Contributor

lefnire commented Nov 22, 2013

Ruh-roh. (man I need to add some better reporting, like listing the UUID that flagged the error)

Sorry for the nondescript error dumps, I just need to get them out of my inbox and into GH > Crit so I can find them when I'm working on GH

TypeError: Cannot read property 'tasks' of null
    at Promise.<anonymous> (/app/src/models/user.js:284:17)
    at Promise.<anonymous> (/app/node_modules/mongoose/node_modules/mpromise/lib/promise.js:162:8)
    at Promise.EventEmitter.emit (events.js:95:17)
    at Promise.emit (/app/node_modules/mongoose/node_modules/mpromise/lib/promise.js:79:38)
    at Promise.fulfill (/app/node_modules/mongoose/node_modules/mpromise/lib/promise.js:92:20)
    at /app/node_modules/mongoose/lib/query.js:1794:30
    at /app/node_modules/mongoose/lib/utils.js:414:16
    at /app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/collection.js:953:5
    at /app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursor.js:683:35
    at Cursor.close (/app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursor.js:903:5)
    at Cursor.nextObject (/app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursor.js:683:17)
    at commandHandler (/app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursor.js:658:14)
    at /app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1670:9
    at Server.Base._callHandler (/app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/base.js:382:41)
    at /app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:472:18
    at MongoReply.parseBody (/app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
    at null.<anonymous> (/app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:430:20)
    at EventEmitter.emit (events.js:95:17)
    at null.<anonymous> (/app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:191:13)
    at EventEmitter.emit (events.js:98:17)
    at Socket.<anonymous> (/app/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:384:22)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:746:14)
    at Socket.EventEmitter.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:408:10)
    at emitReadable (_stream_readable.js:404:5)
    at readableAddChunk (_stream_readable.js:165:9)
    at Socket.Readable.push (_stream_readable.js:127:10)
    at TCP.onread (net.js:526:21)
@lefnire
Copy link
Contributor Author

lefnire commented Nov 26, 2013

See #1915 . chal is undefined here, meaning the challenge was deleted but the deletion wasn't properly synced to the user. We'll need to (1) figure out why it's not syncing properly, and (2) come up with a way to force-sync in cases like these.

@ghost ghost assigned lefnire Dec 10, 2013
@lefnire
Copy link
Contributor Author

lefnire commented Dec 10, 2013

bumping (note to self), seeing this error 4-5x /day

@lemoness
Copy link
Contributor

lemoness commented Jan 2, 2014

Question - is this the same issue that is making all my Challenges inoperable today? Every time I try to click on one, I get an Error 404: Challenge not found.

@lefnire
Copy link
Contributor Author

lefnire commented Jan 3, 2014

@lemoness naw diff issue, fixed now

@lefnire lefnire added this to the Site Stability milestone Feb 8, 2014
@lefnire
Copy link
Contributor Author

lefnire commented Feb 8, 2014

moving this to site-stability, it's the leading cause of actual code errors

This also has to do with "challenge tasks in limbo" bugs. Additionally, I have a theory this may be the #1057 issue! Any error on cron will prevent that user's cron script from continuing. If a task has a broken challenge setup, it will error on cron - meaning that user can't continue.

@paglias
Copy link
Contributor

paglias commented Feb 8, 2014

@lefnire You could add a flag for errors during cron (req.cronIsRunning or
something like that, that is reported in the error emails.
Il 08/feb/2014 18:24 "Tyler Renelle" [email protected] ha scritto:

This also has to do with "challenge tasks in limbo" bugs. Additionally, I
have a theory this may be the #1057https://github.com/HabitRPG/habitrpg/issues/1057issue! Any error on cron will prevent that user's cron script from
continuing. If a task has a broken challenge setup, it will error on cron -
meaning that user can't continue.

Reply to this email directly or view it on GitHubhttps://github.com//issues/1883#issuecomment-34549741
.

@lefnire
Copy link
Contributor Author

lefnire commented Feb 8, 2014

Ah! Good call! I'll look into that

@lefnire
Copy link
Contributor Author

lefnire commented Feb 8, 2014

Additionally, I have a theory this may be the #1057 issue!

well... in some cases. Just checked with an account experiencing cron probs, no server errors.

@lefnire
Copy link
Contributor Author

lefnire commented Feb 15, 2014

H'ok, let's hope that cuts back big-time on some major challenges bugs @colegleason 33b326b . This is to fix the server error we were seeing a bunch via email. It also means anyone with busted challenge links should get fixed when they next score that task (@SabreCat). We'll need a better / more automatic solution than that, but this is a decent workaround.

@SabreCat could you score your broken challenge tasks on beta, sync, and see if it gives you the red bullhorn?

@SabreCat
Copy link
Member

OK, yeah. That was a little weird since it was a bogus To-Do, rather than a Habit or something similarly persistent, but I think it sorted out after a bit of bipping back and forth. Thanks!

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

No branches or pull requests

4 participants