[01:02:38] *** Joins: r0bby_ (~wakawaka@guifications/user/r0bby) [01:02:40] *** Quits: robbyoconnor (~wakawaka@guifications/user/r0bby) (Ping timeout: 244 seconds) [02:11:34] gsingh93: can you delete the term [02:13:19] and then create the next one with `php artisan term:create 2016 04 18` [02:23:57] then run `php artisan notify "https://hackers-voting.herokuapp.com" "Nominations for the next term are now open. You can nominate three people to run for admin."` or something [02:23:58] Title: Unknown [02:24:05] it's 2AM so idk how to word [02:49:54] sorry, just got home [02:51:52] iangcarroll: nextTerm() -> null [02:52:18] App\Term::find(3) instead [02:52:27] App\Term::find(3)->delete() [02:54:40] iangcarroll: before i notify [02:54:52] should we change the number of nominations you need? [02:54:58] like that meta post suggested? [02:55:07] we didn't make a PR or anything [02:55:20] i.e., you just need to mark your self as running [02:55:45] i don't oppose changing it to one [02:55:52] kk [02:55:57] i'll go ahead with it then [02:56:10] kk [02:56:25] wait [02:56:27] this isn't a variable [02:56:29] is it [02:56:31] :( [02:57:51] oh [02:57:57] i can change this to >= 1: https://github.com/wearehx/voting/blob/master/app/Http/Controllers/NominationController.php#L37 [02:57:57] Title: voting/NominationController.php at master · wearehx/voting · GitHub [02:58:15] yeah [02:58:38] and there's one more spot, right? [03:00:55] ye [03:01:20] uhh [03:01:24] just found a vuln... [03:01:43] https://github.com/wearehx/voting/blob/master/app/User.php#L71 [03:01:43] Title: voting/User.php at master · wearehx/voting · GitHub [03:01:45] the POST to mark yourself as running doesn't check this [03:02:12] but yeah, that's where it should be checking [03:02:24] lol [03:02:26] yea [03:02:30] i didn't see it being used [03:02:57] just need an `if (Auth::user()->canRun())` here, right: https://github.com/wearehx/voting/blob/master/app/User.php#L71 [03:02:57] Title: voting/User.php at master · wearehx/voting · GitHub [03:03:32] just committed [03:05:40] what's the command to set an env? [03:05:55] heroku config:set KEY=VALUE [03:09:09] iangcarroll: https://github.com/wearehx/voting/commit/de327058dbffb969aa545504fbfb2fd4795d0054 [03:09:09] Title: Added an env for MIN_NOMINATIONS · wearehx/voting@de32705 · GitHub [03:09:11] look good? [03:09:20] ye, just saw [03:09:29] i'm going to nominate you [03:09:33] just check if it works [03:09:49] kk [03:09:56] make sure it deploys [03:09:56] kk [03:10:05] let me know if you can run now [03:10:07] with one nominations [03:10:15] i can [03:10:24] cool [03:10:27] gr8 [03:10:30] everything seems to be functional [03:10:33] going to send a notification now [03:10:38] good luck [03:10:44] haven't tested it yet so [03:10:47] lol [03:12:21] looks like you can't pass arguments to artisan like that [03:12:42] might have to escape it then [03:12:59] with \'s with spaces instead of quotes [03:16:25] so [03:16:36] i'm normally fine with testing in prod [03:16:43] but i don't want to do that with notifications [03:16:45] :P [03:17:24] well [03:17:32] it either fails completely or works completely [03:17:36] probably [03:17:57] I'm just worried something will go wrong and they'll get like the first word of the message [03:18:01] if i escape it wrong [03:18:17] let me test that [03:18:54] heroku run php artisan notify "https://hackers-voting.herokuapp.com" Nominations\ for\ the\ next\ term\ are\ now\ open.\ You\ only\ need\ one\ nomiation\ to\ run.\ Nominating\ yourself\ is\ allowed. [03:18:54] Title: Unknown [03:19:01] php artisan notify https://ian.sh "A B C" [03:19:02] should i try that? [03:19:03] Title: ian.sh [03:19:04] this works for me [03:19:06] with quotes [03:19:08] well [03:19:12] i'm using heroku run [03:19:16] oh [03:20:23] how about heroku run "php artisan notify https://hackers-voting.herokuapp.com \"Nominations for the next term are now open. You only need one nomiation to run. Nominating yourself is allowed.\"" [03:20:24] Title: Unknown [03:20:49] either will probably work [03:20:51] i'll test [03:21:24] both work for me [03:21:32] and by work I mean the escaping is correct [03:22:36] neither work for me [03:22:46] is your other app not on heroku? [03:23:23] what error do you get? [03:23:38] i ran it through bash -c to simulate passing it as an argument [03:25:01] Running `php artisan notify https://hackers-voting.herokuapp.com Nominations for the next term are now open. You only need one nomination to run. Nominating yourself is allowed.` [03:25:01] Title: Unknown [03:25:04] "Too many arguments" [03:25:16] oh [03:25:18] wait [03:25:23] i didn't escape the quotes right [03:25:29] yeah [03:25:38] i.e. /bin/bash -c "php artisan notify https://hackers-voting.herokuapp.com \"Nominations for the next term are now open. You only need one nomiation to run. Nominating yourself is allowed.\"" [03:25:39] Title: Unknown [03:26:12] Fatal error: Class 'Facebook\FacebookSession' not found [03:26:37] sigh [03:28:50] pushed a fix [03:29:21] Fatal error: Call to undefined method Facebook\FacebookRequest::execute() [03:29:44] * iangcarroll sighs again [03:31:08] are the PHP code examples out of date in the docs? [03:31:29] idk... [03:31:38] shouldn't be [03:33:16] well [03:33:19] attempt v3 pushed [03:35:13] [Facebook\Exceptions\FacebookResponseException] [03:35:16] Error validating access token: Session has expired on Thursday, 03-Mar-16 15:51:27 PST. The current time is Monday, 04-Apr-16 00:34:40 PDT. [03:35:24] what session? [03:36:26] hm [03:36:47] we might have to renew it [03:39:54] you can't be serious [03:40:06] apparently socialite doesn't store the refresh token [03:40:25] so I guess we can only notify people who have a non-expired token [03:42:11] it catches that exception now [03:46:55] no error this time [03:47:03] but i didn't get a notification [03:47:54] nor did I [03:47:58] and my token should be updated [03:48:24] i am probably catching another exception in the process [03:49:16] it prints the exception now [03:50:10] to the heroku logs? [03:50:25] i hope no one got a notification last time [03:50:37] because now they'll get two notifications [03:51:38] doesn't seem possible [03:51:41] and yea [03:51:43] stdout [03:53:34] lol [03:53:39] Undefined property: Facebook\Exceptions\FacebookResponseException::$getMessage [03:55:15] wat [03:56:32] oh [03:56:33] fixeds [03:56:36] s/s/ [03:56:36] iangcarroll probably meant: fixed [03:57:38] Caught exception Error validating access token: Session has expired on Thursday, 03-Mar-16 15:51:27 PST. The current time is Monday, 04-Apr-16 00:57:02 PDT.. [03:57:40] Caught exception Error validating access token: The session has been invalidated because the user has changed the password.. [03:57:54] Caught exception Error validating access token: Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook has changed the session for security reasons.. [03:58:13] Caught exception Error validating access token: Sessions for the user are not allowed because the user is not a confirmed user.. [03:58:28] Caught exception (#200) Only web canvas apps can send app notifications. [03:58:41] those are the unique exceptions [03:59:13] the last one seems like a legit one [04:00:23] ok, we're now a web canvas app [04:00:23] lol [04:03:33] Caught exception (#15) This method must be called with an app access_token.. [04:04:09] i don't understand how we have users that haven't authorized the application [04:04:19] Caught exception Error validating access token: The user has not authorized application 892158150899334.. [04:04:52] updated [04:05:01] idk how that last one would happen [04:05:11] probably someone deauthing [04:06:15] "You must provide an access token" [04:06:20] uncaught exception this time [04:06:53] huh, it's supposed to be pulling from FACEBOOK_APP_ID [04:07:00] slash FACEBOOK_APP_SECRET [04:07:57] are those env variables set? [04:08:02] `heroku config` dumps them [04:08:53] both are set [04:10:31] you removed $user->token and this started happening [04:12:12] cuz I wanted it to use the app access token [04:13:21] if you want, you can just post in the group that nominations have started and then work on this tomorrow [04:13:39] gonna try a fix and then that [04:15:29] pushed a "fix" [04:17:24] nice [04:17:31] got a notification [04:17:46] but it takes you to a page that says "something went wrong" [04:18:05] like 7 of these: [04:18:07] Caught exception (#200) Cannot send notifications to a user who has not installed the app. [04:18:23] one of these: [04:18:25] Caught exception Unsupported post request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api. [04:18:25] Title: Unknown [04:18:27] no other exceptions [04:18:32] well [04:18:45] it appears the URL got overrided to our canvas URL [04:19:15] might as well put something on that canvas page [04:19:25] yeah [04:19:33] the problem is that fb makes a POST request to it first [04:19:42] just added a handler for it [04:30:15] can you see the exception getting thrown in the heroku logs? [04:34:10] no exceptions [05:27:03] *** Quits: wolfcore (~wolfcore@unaffiliated/wolfcore) (Ping timeout: 240 seconds) [05:36:49] *** Joins: wolfcore (~wolfcore@unaffiliated/wolfcore) [10:57:02] *** Joins: majora (~majora@205.204.23.189) [10:57:02] *** ChanServ sets mode: +v majora [10:57:07] make computers blow up again [11:37:53] *** Quits: majora (~majora@205.204.23.189) (Quit: Leaving) [15:10:40] *** Joins: lablayers (uid55894@gateway/web/irccloud.com/x-ephfdlokayafcayj) [20:48:04] *** Quits: r0bby_ (~wakawaka@guifications/user/r0bby) (Read error: Connection reset by peer) [20:48:26] *** Joins: r0bby_ (~wakawaka@guifications/user/r0bby)