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

Twitter Autohook silently fails to receive furthur reqests after a few hours #36

Closed
sachushaji opened this issue Jul 27, 2020 · 7 comments
Assignees

Comments

@sachushaji
Copy link
Contributor

sachushaji commented Jul 27, 2020

I have successfully integrated twitter autohook and every functionality seems working fine. But after a few hours, it silently stops taking requests without throwing much error.

Expected behavior

It should work perfectly after the server is up even after several hours and should error out if something failed

Actual behavior

Autohook get subscribed and after a few hours it doesn't receive any response

Steps to reproduce the behavior

Configure autohook and deploy to a server. After few hours it doesn't accept webhook requests.

Error Logs

My server is configured to automatically restart if the application errors out. Sometimes, I see this error coming up

image

The codebase is opensource. So you can also view my implementation here

@yash-atreya
Copy link

@sachushaji Were you able to solve this?

@sachushaji
Copy link
Contributor Author

sachushaji commented Jul 31, 2020

@yash-atreya, I refactored the code by using this example code in the repo yesterday. It's now listening for a few more hours, But again facing the same issue today. It's not clearly consistent to say when exactly this is happening. The above errors in the error logs are still happening. I was wondering is it because I'm using free sandbox API ?, are you also facing similar issue?

@yash-atreya
Copy link

@sachushaji Yes I am also using the code from the example. Facing the same issue as I am also on the Free API.

@james-muriithi
Copy link

Check this, might help you

#21 (comment)

@sachushaji
Copy link
Contributor Author

sachushaji commented Aug 4, 2020

I added auth token to ngrok, and it seemed stable now. The reason I think it was failing was that ngrok connections without auth tokens will be terminated after a certain limited time. With auth token,I suppose it will be a more stable connection. I will try to do a PR for this updating the example

@yash-atreya
Copy link

@sachushaji Can you elaborate which auth tokens did you add to ngrok ?

@sachushaji
Copy link
Contributor Author

sachushaji commented Aug 4, 2020

@yash-atreya I have made a fix at PR #37. You just need to go to ngrok.com, configure account and use the authtoken before connecting to ngrok . See example code

iamdaniele added a commit that referenced this issue Aug 5, 2020
fix: Autohook silently failing issue #36
@iamdaniele iamdaniele self-assigned this Aug 6, 2020
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