LandonPatmore / yahoo-fantasy-bot

Bot that alerts GroupMe, Discord, and Slack users about various things happening in their Yahoo Fantasy Sports league.
MIT License
86 stars 61 forks source link

Uh oh "Looks like something went wrong" -Yahoo #11

Closed malf922 closed 5 years ago

malf922 commented 5 years ago

Getting the above message when trying to open app from Hiroku to complete the setup process. I think it may be due to Yahoo not allowing 'HEROKU-APP-NAME'.herokuapp.com as the redirect URI due to it being an invalid URL. I had to add https:// to the front in order for Yahoo Developer to accept it.

LandonPatmore commented 5 years ago

I will look into this, but the bot worked properly afterwards?

DMcP89 commented 5 years ago

Running into the same issue.

Definitely tied to the redirect URI seeing this at the bottom of the screen:

Developers: Please check the redirect URI in your request and submit again.

Here's what I am seeing in my logs:

2019-07-18T02:45:21.863666+00:00 app[web.1]: [DEBUG] [qtp1524803148-16] 2019-07-18 02:45:21,863 [web.Server] - User is not authenticated. Sending to Yahoo.

2019-07-18T02:45:21.863696+00:00 app[web.1]: [TRACE] [qtp1524803148-16] 2019-07-18 02:45:21,863 [web.Server] - Initial authorization...

2019-07-18T02:45:21.864331+00:00 app[web.1]: [DEBUG] [qtp1524803148-16] 2019-07-18 02:45:21,864 [spark.Response] - Redirecting (Found 302 to https://api.login.yahoo.com/oauth2/request_auth?response_type=code&client_id=dj0yJmk9TURPNnhXd3VoMzBXJmQ9WVdrOVl6bFNSbXA2TTJVbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmc3Y9MCZ4PWJi&redirect_uri=https%3A%2F%2Fhml-fantasy-bot.herokuapp.com%2Fauth

DMcP89 commented 5 years ago

@malf922 figured this out. On your Yahoo app configuration, add /auth to the end of the uri. For example:

https://HEROKU-APP-NAME'.herokuapp.com/auth

The issue is caused by the authenticationUrl method of the Server class. It adds on /auth to the end of the URL.

@landonp1203 the readme should be updated accordingly.

malf922 commented 5 years ago

@DMcP89 Yes! That appears to have done the trick. Thank you!

LandonPatmore commented 5 years ago

I am going to be updating this application with a ReactiveX implementation sometime in the next month, so be on the look out for that, I will then update accordingly on what do. As of now, I don't have the time to work on this because of my new job, but I will start looking this weekend at new implementations as I know there are better, more concise ways to do this.

DMcP89 commented 5 years ago

@landonp1203 congrats on the new job. Opened a PR with the change to the read me.

gregthedreg commented 5 years ago

thanks this helped!, were you able to open the app afterwards? thats where i got stuck next. "Uh oh Looks like something went wrong.

Please try again later." is what i get when i open the app

gregthedreg commented 5 years ago

i made sure the url matched the one in this thread with the /auth at the end. im not too sure what i need to do to make this work.

gregthedreg commented 5 years ago

2019-08-02T15:15:00.295016+00:00 app[web.1]: [DEBUG] [DefaultQuartzScheduler_Worker-8] 2019-08-02 15:15:00,294 [utils.JobRunner] - Server kept alive... 2019-08-02T15:20:00.001338+00:00 app[web.1]: [DEBUG] [DefaultQuartzScheduler_Worker-9] 2019-08-02 15:20:00,001 [utils.JobRunner] - Keeping server alive... 2019-08-02T15:20:00.993357+00:00 heroku[router]: at=info method=GET path="/keepalive" host=vipfantasy.herokuapp.com request_id=fae026c8-0081-4cbe-9d22-248830f0c834 fwd="18.234.239.46" dyno=web.1 connect=0ms service=3ms status=200 bytes=149 protocol=https 2019-08-02T15:20:00.996095+00:00 app[web.1]: [DEBUG] [DefaultQuartzScheduler_Worker-9] 2019-08-02 15:20:00,995 [utils.JobRunner] - Server kept alive... 2019-08-02T15:25:00.041064+00:00 heroku[router]: at=info method=GET path="/keepalive" host=vipfantasy.herokuapp.com request_id=4a55c3a5-1c40-4bfa-a31a-b77c7fb478b8 fwd="18.234.239.46" dyno=web.1 connect=1ms service=3ms status=200 bytes=149 protocol=https 2019-08-02T15:25:00.002088+00:00 app[web.1]: [DEBUG] [DefaultQuartzScheduler_Worker-10] 2019-08-02 15:25:00,001 [utils.JobRunner] - Keeping server alive... 2019-08-02T15:25:00.046012+00:00 app[web.1]: [DEBUG] [DefaultQuartzScheduler_Worker-10] 2019-08-02 15:25:00,045 [utils.JobRunner] - Server kept alive... 2019-08-02T15:30:00.002064+00:00 app[web.1]: [DEBUG] [DefaultQuartzScheduler_Worker-1] 2019-08-02 15:30:00,001 [utils.JobRunner] - Keeping server alive... 2019-08-02T15:30:00.339803+00:00 heroku[router]: at=info method=GET path="/keepalive" host=vipfantasy.herokuapp.com request_id=a3896c87-c6a7-4b8f-8f04-48390728c622 fwd="18.234.239.46" dyno=web.1 connect=0ms service=3ms status=200 bytes=149 protocol=https 2019-08-02T15:30:00.342447+00:00 app[web.1]: [DEBUG] [DefaultQuartzScheduler_Worker-1] 2019-08-02 15:30:00,342 [utils.JobRunner] - Server kept alive... 2019-08-02T15:32:40.940685+00:00 heroku[router]: at=info method=GET path="/" host=vipfantasy.herokuapp.com request_id=31f87ec5-fffd-4dfb-b5b7-5e8b9559dfa1 fwd="63.234.182.212" dyno=web.1 connect=0ms service=11ms status=302 bytes=353 protocol=https

does this look like i fixed it? i still cant test it because i am at work and for some reason they blocked me from going further.

gregthedreg commented 5 years ago

i finally got it after some magic. now is there a way to test this or command cheat sheet that i am missing? or will this be set till our league sees action? i kinda want to test this before i start inviting my friends to the discord.

LandonPatmore commented 5 years ago

I am going to be rewriting the entire bot this weekend @gregthedreg, so hold off until I push the new version :)

gregthedreg commented 5 years ago

Well I finally got it through last night. Im looking forward to the rewrite. My league is super excited for your bot lol.

Sent from my iPhone

On Aug 3, 2019, at 10:22 AM, Landon Patmore notifications@github.com wrote:

 I am going to be rewriting the entire bot this weekend @gregthedreg, so hold off until I push the new version :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

LandonPatmore commented 5 years ago

The changes are taking longer than I expected, since I am learning Rx at the same time. It will be done in the next 2 weeks, and the latest by the first week of the season. @gregthedreg

gregthedreg commented 5 years ago

Would the current bot work till then?

Sent from my iPhone

On Aug 6, 2019, at 20:10, Landon Patmore notifications@github.com wrote:

 The changes are taking longer than I expected, since I am learning Rx at the same time. It will be done in the next 2 weeks, and the latest by the first week of the season. @gregthedreg

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

LandonPatmore commented 5 years ago

Yes it should

ackleymi commented 5 years ago

Any updates? :)

malf922 commented 5 years ago

The guide says not to use http:// or https:// at the end of the heroku app URL but I still have to do that while also using /auth at the end of the URL. It seems to work, but that is the only way I can make it proceed. Still have yet to see anything come through on my Discord channel, but I did complete the process and there have been no transactions in my league as of yet. Will know for sure in a couple days when waivers end.

LandonPatmore commented 5 years ago

Still working on it, I have been really swamped at work, but I am going to get it done by the first week :) @ackleymi @malf922

red-scott commented 5 years ago

As @malf922 mentioned, needed to prepend https:// to the heroku app URL, and can confirm it works. Picked up a kicker for the season to confirm.

image

kabirsikand commented 5 years ago

@landonp1203 updates? Can help if needed....week 1 around the corner!

LandonPatmore commented 5 years ago

@kabirsikand it will be done by either Wednesday night or early Thursday morning...if you look at the rx-nocommands branch, you’ll see what I’ve been working on. Thanks for the help! Contribute however you’d like :)

LandonPatmore commented 5 years ago

Just finishing up, making sure bot works with Yahoo now, and will make post within the next hour-2!

Jonath22b commented 5 years ago

Hey @landonp1203 the bot is working but on Heroku the dyno's now show "Web" & "Bot" the authorization is working but the bot won't work on discord without having the "Bot" dyno turned on. Problem is it keeps sending out notifications about league updates that happened weeks ago in a constant cycle. There seems to be no setting for the bot to only push new Alerts rather than all Alerts. Any ideas on how to fix this? Screen Shot 2019-09-05 at 12 09 49 PM

LandonPatmore commented 5 years ago

All done https://www.reddit.com/r/fantasyfootball/comments/d032cw/discord_groupme_and_slack_yahoo_fantasy_football/

LandonPatmore commented 5 years ago

@Jonath22b I fixed that issue, delete the app and redeploy it. That should fix it. If not, please post in this issue so I can look at it.

Thanks!

malf922 commented 5 years ago

@landonp1203 on the https://developer.yahoo.com/apps/ portion of the guide, step 3c still seems inaccurate. I had to add https:// in order to get it to authorize. I could see that generating a lot of questions on the Reddit post.

LandonPatmore commented 5 years ago

I actually did at that to the README when I realized it, you probably saw it right before I changed it.

LandonPatmore commented 5 years ago

Timing and alert changes. Please update so no null pointer exceptions and missing alerts. @malf922 @DMcP89 @gregthedreg @ackleymi

Jonath22b commented 5 years ago

@landonp1203 just did the update - still working well! Thank you

LandonPatmore commented 5 years ago

Sorry last update just pushed, fixed the build and removed an erroneous field in the matchups message. If it’s working for you now, you should be fine and you’ll just have the extra field. @Jonath22b

LandonPatmore commented 5 years ago

Closing as this pertains to an old version of the bot that is non-existent anymore.