HabitRPG / habitica

A habit tracker app which treats your goals like a Role Playing Game.
https://habitica.com
Other
11.96k stars 4.08k forks source link

TypeError in login-incentives: Cannot read property 'nextRewardAt' of undefined #10308

Closed khipkin closed 6 years ago

khipkin commented 6 years ago

General Info

Description

Loaded the site, Bailey modal popped up, noticed buttons did not contain any text.

image

After guessing and clicking one of the empty buttons, it looks like a bunch of other text also failed to load.

image

Console Errors

Failed to load resource: the server responded with a status of 502 (Bad Gateway) moment.js:293 Deprecation warning: moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/ Arguments: Error at g.zone (https://habitica.com/static/js/vendor.b91cfcde844f24cdc5d8.js:1:12941) at Object. (https://habitica.com/static/js/app.556d286a21777a872250.js:1:243271) at n (https://habitica.com/static/js/manifest.6efba0f57111f78a12fc.js:1:101) at Object. (https://habitica.com/static/js/app.556d286a21777a872250.js:1:18284) at n (https://habitica.com/static/js/manifest.6efba0f57111f78a12fc.js:1:101) at Object. (https://habitica.com/static/js/app.556d286a21777a872250.js:1:348871) at n (https://habitica.com/static/js/manifest.6efba0f57111f78a12fc.js:1:101) at Object. (https://habitica.com/static/js/app.556d286a21777a872250.js:1:584639) at n (https://habitica.com/static/js/manifest.6efba0f57111f78a12fc.js:1:101) at Object. (https://habitica.com/static/js/app.556d286a21777a872250.js:1:342511) x @ moment.js:293 vue.runtime.esm.js:1737 TypeError: Cannot read property 'nextRewardAt' of undefined at a.nextReward (login-incentives.vue?fca4:74) at Ti.get (vue.runtime.esm.js:3138) at Ti.evaluate (vue.runtime.esm.js:3245) at a.nextReward (vue.runtime.esm.js:3503) at a.s (login-incentives.vue?e357:1) at a.t._render (vue.runtime.esm.js:4540) at a.r (vue.runtime.esm.js:2784) at Ti.get (vue.runtime.esm.js:3138) at new Ti (vue.runtime.esm.js:3127) at $t (vue.runtime.esm.js:2791) ot @ vue.runtime.esm.js:1737 /#/tasks:1 Mixed Content: The page at 'https://habitica.com/#/tasks' was loaded over HTTPS, but requested an insecure image 'http://i.imgur.com/Qc7Qe11.gif'. This content should also be served over HTTPS.

image

khipkin commented 6 years ago

The little pop-up notifications on the top right of the screen also contain no text.

image

No new errors in the console after that.

khipkin commented 6 years ago

This happened again when I was viewing my party page, although all text rendered this time (as far as I can tell). I got one of those "out of sync" error popups though.

moment.js:293 Deprecation warning: moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/ Arguments: Error at g.zone (https://habitica.com/static/js/vendor.b91cfcde844f24cdc5d8.js:1:12941) at Object. (https://habitica.com/static/js/app.556d286a21777a872250.js:1:243271) at n (https://habitica.com/static/js/manifest.6efba0f57111f78a12fc.js:1:101) at Object. (https://habitica.com/static/js/app.556d286a21777a872250.js:1:18284) at n (https://habitica.com/static/js/manifest.6efba0f57111f78a12fc.js:1:101) at Object. (https://habitica.com/static/js/app.556d286a21777a872250.js:1:348871) at n (https://habitica.com/static/js/manifest.6efba0f57111f78a12fc.js:1:101) at Object. (https://habitica.com/static/js/app.556d286a21777a872250.js:1:584639) at n (https://habitica.com/static/js/manifest.6efba0f57111f78a12fc.js:1:101) at Object. (https://habitica.com/static/js/app.556d286a21777a872250.js:1:342511) x @ moment.js:293 vue.runtime.esm.js:1737 TypeError: Cannot read property 'nextRewardAt' of undefined at a.nextReward (login-incentives.vue?fca4:74) at Ti.get (vue.runtime.esm.js:3138) at Ti.evaluate (vue.runtime.esm.js:3245) at a.nextReward (vue.runtime.esm.js:3503) at a.s (login-incentives.vue?e357:1) at a.t._render (vue.runtime.esm.js:4540) at a.r (vue.runtime.esm.js:2784) at Ti.get (vue.runtime.esm.js:3138) at new Ti (vue.runtime.esm.js:3127) at $t (vue.runtime.esm.js:2791) ot @ vue.runtime.esm.js:1737

/tasks:1 Mixed Content: The page at 'https://habitica.com/#/tasks' was loaded over HTTPS, but requested an insecure image 'http://i.imgur.com/Qc7Qe11.gif'. This content should also be served over HTTPS.

fox_face.png:1 Failed to load resource: the server responded with a status of 403 (Forbidden) api/v3/groups/ca4cc164-0a61-4eb6-afd8-5301e3dfae8b/chat/seen:1 Failed to load resource: the server responded with a status of 502 (Bad Gateway) createError.js:16 Uncaught (in promise) Error: Request failed with status code 502 at t.exports (createError.js:16) at t.exports (settle.js:18) at XMLHttpRequest.h.(anonymous function) (https://habitica.com/static/js/vendor.b91cfcde844f24cdc5d8.js:6:127456)

image

Clicking on the URL after "(anonymous function)" brought me to this:

image

khipkin commented 6 years ago

I've been getting the error popups A LOT recently, but didn't look at the console before. It seems like it might be because I've checked in more than 500 (?) times and have no more rewards to unlock?

khipkin commented 6 years ago

https://github.com/HabitRPG/habitica/issues/10178#issuecomment-380428262 looks like the same error?

TheHollidayInn commented 6 years ago

Can you post your UserID?

khipkin commented 6 years ago

f9c89bba-abf8-4f20-a974-cf1550ff603f

TheHollidayInn commented 6 years ago

Do you have this gif used somewhere: http://i.imgur.com/Qc7Qe11.gif ?

TheHollidayInn commented 6 years ago

If so, can you change that to https to see if that helps.

khipkin commented 6 years ago

Umm sure, but I really really don't think that's the problem. That's just a warning, not an error.

TheHollidayInn commented 6 years ago

You have multiple issues above. I believe your 502s are an issue with breaking https (just a guess). That's the most important issue above.

paglias commented 6 years ago

I don't think HTTPS is related, some browsers are starting to enforce mixed content warning but that just means they won't load the image, it shouldn't break anything

TheHollidayInn commented 6 years ago

Just doing some basic debugging here to rule stuff out. The issue is here:

api/v3/groups/ca4cc164-0a61-4eb6-afd8-5301e3dfae8b/chat/seen:1 Failed to load resource: the server responded with a status of 502 (Bad Gateway)
createError.js:16 Uncaught (in promise) Error: Request failed with status code 502
at t.exports (createError.js:16)
at t.exports (settle.js:18)
at XMLHttpRequest.h.(anonymous function) (https://habitica.com/static/js/vendor.b91cfcde844f24cdc5d8.js:6:127456)

Login incentives is like that for everyone based the mark. I'm just trying to see what would cause the 502s.

khipkin commented 6 years ago

Just had this recur. Got another big error popup on the upper right.

I don't know when I last reloaded the page, but there are tons of messages in the console.

Console:

vendor.d74eb5c80000a7c3241e.js:1 Deprecation warning: moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/ Arguments: Error at g.zone (https://habitica.com/static/js/vendor.d74eb5c80000a7c3241e.js:1:12941) at Object. (https://habitica.com/static/js/app.4511849745acac465a43.js:1:244531) at n (https://habitica.com/static/js/manifest.1955d8479fd3e448b3b6.js:1:101) at Object. (https://habitica.com/static/js/app.4511849745acac465a43.js:1:18284) at n (https://habitica.com/static/js/manifest.1955d8479fd3e448b3b6.js:1:101) at Object. (https://habitica.com/static/js/app.4511849745acac465a43.js:1:349519) at n (https://habitica.com/static/js/manifest.1955d8479fd3e448b3b6.js:1:101) at Object. (https://habitica.com/static/js/app.4511849745acac465a43.js:1:586425) at n (https://habitica.com/static/js/manifest.1955d8479fd3e448b3b6.js:1:101) at Object. (https://habitica.com/static/js/app.4511849745acac465a43.js:1:343159) x @ vendor.d74eb5c80000a7c3241e.js:1 6Slow network is detected. See for more details. Fallback font will be used while loading: vendor.d74eb5c80000a7c3241e.js:1 TypeError: Cannot read property 'nextRewardAt' of undefined at a.nextReward (app.4511849745acac465a43.js:1) at Ti.get (vendor.d74eb5c80000a7c3241e.js:6) at Ti.evaluate (vendor.d74eb5c80000a7c3241e.js:6) at a.nextReward (vendor.d74eb5c80000a7c3241e.js:1) at a.s (app.4511849745acac465a43.js:1) at a.t._render (vendor.d74eb5c80000a7c3241e.js:6) at a.r (vendor.d74eb5c80000a7c3241e.js:1) at Ti.get (vendor.d74eb5c80000a7c3241e.js:6) at new Ti (vendor.d74eb5c80000a7c3241e.js:6) at $t (vendor.d74eb5c80000a7c3241e.js:1) ot @ vendor.d74eb5c80000a7c3241e.js:1 www.google.com/ads/ga-audiences?v=1&aip=1&t=sr&_r=4&tid=UA-33510635-1&cid=684700530.1471973948&jid=1816895253&_v=j67&z=237528259 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT /party:1 The SSL certificate used to load resources from https://images-na.ssl-images-amazon.com will be distrusted in M70. Once distrusted, users will be prevented from loading these resources. See https://g.co/chrome/symantecpkicerts for more information. fox_face.png Failed to load resource: the server responded with a status of 403 (Forbidden) /api/v3/notifications/see Failed to load resource: the server responded with a status of 404 (Not Found) vendor.d74eb5c80000a7c3241e.js:6 Uncaught (in promise) Error: Request failed with status code 404 at t.exports (vendor.d74eb5c80000a7c3241e.js:6) at t.exports (vendor.d74eb5c80000a7c3241e.js:12) at XMLHttpRequest.h.(/anonymous function) (https://habitica.com/static/js/vendor.d74eb5c80000a7c3241e.js:6:127491) /api/v3/user/class/cast/valorousPresence Failed to load resource: the server responded with a status of 401 (Unauthorized) vendor.d74eb5c80000a7c3241e.js:6 Uncaught (in promise) Error: Request failed with status code 401 at t.exports (vendor.d74eb5c80000a7c3241e.js:6) at t.exports (vendor.d74eb5c80000a7c3241e.js:12) at XMLHttpRequest.h.(/anonymous function) (https://habitica.com/static/js/vendor.d74eb5c80000a7c3241e.js:6:127491) 11vendor.d74eb5c80000a7c3241e.js:1 TypeError: Cannot read property 'nextRewardAt' of undefined at a.nextReward (app.4511849745acac465a43.js:1) at Ti.get (vendor.d74eb5c80000a7c3241e.js:6) at Ti.evaluate (vendor.d74eb5c80000a7c3241e.js:6) at a.nextReward (vendor.d74eb5c80000a7c3241e.js:1) at a.s (app.4511849745acac465a43.js:1) at a.t._render (vendor.d74eb5c80000a7c3241e.js:6) at a.r (vendor.d74eb5c80000a7c3241e.js:1) at Ti.get (vendor.d74eb5c80000a7c3241e.js:6) at Ti.run (vendor.d74eb5c80000a7c3241e.js:6) at Rt (vendor.d74eb5c80000a7c3241e.js:1) ot @ vendor.d74eb5c80000a7c3241e.js:1 /api/v3/tasks/721f8306-74af-4875-8951-86dca7932d32/score/up Failed to load resource: the server responded with a status of 502 (Bad Gateway) vendor.d74eb5c80000a7c3241e.js:6 Uncaught (in promise) Error: Request failed with status code 502 at t.exports (vendor.d74eb5c80000a7c3241e.js:6) at t.exports (vendor.d74eb5c80000a7c3241e.js:12) at XMLHttpRequest.h.(/anonymous function) (https://habitica.com/static/js/vendor.d74eb5c80000a7c3241e.js:6:127491) DevTools failed to parse SourceMap: https://habitica.com/static/js/app.4511849745acac465a43.js.map DevTools failed to parse SourceMap: https://habitica.com/static/js/manifest.1955d8479fd3e448b3b6.js.map DevTools failed to parse SourceMap: https://habitica.com/static/js/8.d8c82d2b3faec5773de8.js.map

image image

khipkin commented 6 years ago

Happened again. Had just cronned and was using skills and checking off dailies.

vendor.69b17596f5c5cefe04a5.js:1 TypeError: Cannot read property 'nextRewardAt' of undefined at a.nextReward (app.85ce03683b5003540623.js:1) at Ti.get (vendor.69b17596f5c5cefe04a5.js:6) at Ti.evaluate (vendor.69b17596f5c5cefe04a5.js:6) at a.nextReward (vendor.69b17596f5c5cefe04a5.js:1) at a.s (app.85ce03683b5003540623.js:1) at a.t._render (vendor.69b17596f5c5cefe04a5.js:6) at a.r (vendor.69b17596f5c5cefe04a5.js:1) at Ti.get (vendor.69b17596f5c5cefe04a5.js:6) at new Ti (vendor.69b17596f5c5cefe04a5.js:6) at $t (vendor.69b17596f5c5cefe04a5.js:1) ot @ vendor.69b17596f5c5cefe04a5.js:1 habitica.com/:1 The SSL certificate used to load resources from https://images-na.ssl-images-amazon.com will be distrusted in M70. Once distrusted, users will be prevented from loading these resources. See https://g.co/chrome/symantecpkicerts for more information. /api/v3/user/class/cast/intimidate:1 Failed to load resource: the server responded with a status of 401 (Unauthorized) vendor.69b17596f5c5cefe04a5.js:6 Uncaught (in promise) Error: Request failed with status code 401 at t.exports (vendor.69b17596f5c5cefe04a5.js:6) at t.exports (vendor.69b17596f5c5cefe04a5.js:12) at XMLHttpRequest.h.(/anonymous function) (https://habitica.com/static/js/vendor.69b17596f5c5cefe04a5.js:6:127654) /api/v3/tasks/dc30ba50-1fa4-4041-9969-6715749d7f74/score/up:1 Failed to load resource: the server responded with a status of 502 (Bad Gateway) vendor.69b17596f5c5cefe04a5.js:6 Uncaught (in promise) Error: Request failed with status code 502 at t.exports (vendor.69b17596f5c5cefe04a5.js:6) at t.exports (vendor.69b17596f5c5cefe04a5.js:12) at XMLHttpRequest.h.(/anonymous function) (https://habitica.com/static/js/vendor.69b17596f5c5cefe04a5.js:6:127654)

image

zmbc commented 6 years ago

I don't have any 502s, but I see the error "Cannot read property 'nextRewardAt' of undefined" nearly every time I re-order the todo list. The re-ordering operation also acts strangely when the error occurs; the todo I was dragging seems to be randomly offset from where I actually dragged it (anywhere from a few todos above to a few todos below).

Edit: Seems I'm experiencing #7645. However, it's still odd that the two are correlated for me (the reordering issue always coincides with this console error). Perhaps #7645 is causing this one?