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

Error on loading #1

Open
p0358 opened this issue Aug 11, 2017 · 1 comment
Open

Error on loading #1

p0358 opened this issue Aug 11, 2017 · 1 comment

Comments

@p0358
Copy link
Member

p0358 commented Aug 11, 2017

The module gets a list of free games on load. This works fine if we load the module when Concierge is fully loaded, but results in error if it's loaded during startup with other modules.

Very likely to be core's issue, about some API not being ready to use yet.

2017-08-11T12:53:22.510Z - verbose: Requested URL: http://www.reddit.com/r/gamedeals/.json?limit=200
2017-08-11T12:53:22.593Z - debug: TypeError: Instance is not a constructor
    at Robot.load (/var/www/Concierge/core/modules/hubot/robot.js:389:75)
    at /var/www/Concierge/core/modules/modules.js:161:40
    at undefined.next (native)
    at step (/var/www/Concierge/core/modules/modules.js:1:260)
    at /var/www/Concierge/core/modules/modules.js:1:420

It was also giving this error earlier:

Cannot read property 'Symbol(Symbol.iterator)' of null

at line 40 of freedar.js.

It seems to work fine after it loads (I'll be sure once some free games appear 😄), and it periodically checks for games normally.

@drkno
Copy link
Member

drkno commented Aug 11, 2017

Are you sure the error shown origionates from freedar and not just some other module which happens to be being loaded at the same time. Although the core is now async the loading does queue which can make it look sync so the error would probably occur at the same time on each load.

Instance is not a constructor is a core issue which has appeared recently - not sure what the problem is there but it shouldn't be freedar related (because the error origionates in hubot module code not kassy module code). I've seen it with a few other modules too, unfortunately Real Life™ means I haven't had an oppertunity to find the cause.

The other issue, Cannot read property 'Symbol(Symbol.iterator)' of null will come from here. An exception was thrown and so no data was returned from reddit. Most likely causes are internet connection problems (connectivity, dns) or reddit server maintainence which happens from time to time.


As for if it works, we have tested it and it does return useful data :). It has very strict filtering rules because of the number of false positives (such as "Free Shipping" or "Free with purchase of") which we didn't want. A better way of doing this would be to monitor isthereanydeal.com using the api but this seemed easier at the time.

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

2 participants