GitHub's Webhooks is sending nonsense events - github

I have a webhook on issues for github and I update the body of the issue from within my application using PATCH request. The rate is not very fast, like a request every few seconds. Most of the times it works, yet some of the times GitHub sends my hook a nonsense payload which has the body text before my edit in both body and changes.body.from fields as if there was a change which changed nothing. At the same time:
The responce to my PATCH displays new body correctly.
The issue itself on GitHub gets updated properly.
No follow up webhook procs with correct body happen.
Anybody has an idea what I could be hitting here?
Thanks in advance.

Related

Google Smart Home - Report State Real-Time Feed

I have an application that receives and run correctly the SYNC, QUERY, EXECUTE sent by Google Actions.
I too configured Report State in HomeGraph console. It works fine, but when I send a change report command to HomeGraph and it's accepted, nothing is updated in the Google home app, is this right? is the correct behavior?
I forget to do something else?
My sync response sends the device with willRportSate: true
tks in advance
If you are getting an HTTP 200 response from your report state command, you're doing it correctly.
I have recently implemented HomeGraph to my action. I found that if there is something wrong with the request google will return some error in the form of JSON with a different status code.
But as it is said above, if you got 200 OK, then everything is OK from your side. For my requests, I get a response with the uuid that I give with a 200 OK status code.

Two network all for one fetch command

I am using Redux-Sagas and here is what I am experiencing.
I am not sure if it is expected or not.
Every time the code trigger saga run a fetch command, it actually is showing two request.
I have custom header for the request.
I did try to remove x-custom-header and it showed one request.
What could be wrong here?
Thanks,
Please see screenshot
The first request is most probably an HTTP 'OPTIONS' (Preflight) request that is automatically done by the browser for cross origin requests.
Please see this article for an explanation: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Preflighted_requests

GitHub Webhook - payload on "edited" action doesn't contain the new body

I am trying to get the (new) body from an edited issue comment. I don't know if I am missing something here, but it seems that the webhook payload returned with an edited issue comment, contains only the old comment... There is no way to tell what was changed.
What I do at the moment, is when I get an issue comment event with an action "edited", to make a get request for this comment in order to retrieve its body.
Is this how it's supposed to be? I find it strange that I need to make a new request for something that should already be in the issue comment payload.
There are some issues with webhook content returning old data, presumably due to caching and/or replication issues in GitHub's backend. GitHub support themselves have confirmed to me that this can happen.
The only workaround right now is to fetch the comment content in a separate API request after some small delay in order to allow the updated comment body to propagate through GitHub's backend (the bug affects API requests as well as webhook events, annoyingly).

SiteCatalyst image request onreadystatechange

Is there any possibility of "listening" to the state of GET SiteCatalyst image requests ?
I'd like to run a callback function only when the requests are over, to be more clear when they receive the 200 status code and I'm sure they're done.I'm confident no "built-in" method is available and maybe I should hack the core s.track.s.t() function...?Thanks a lot.
You are right, there is no global "built-in" callback method for when the Adobe Analytics request is complete.
A couple notes I should mention to you about attempting to hack the core code:
1) If you are using the AppMeasurement library version 1.4.1+, in some circumstances, a POST request may be made instead of an image request.
2) Responses that are not 200/OK or otherwise completed/successful does not necessarily mean the data failed to be sent to Adobe. Most common scenario is a NS_BINDING_ABORTED error returned.
The main bad effect I'm getting here is what I previously thought as a double XHR request.
It wasn't. In reality the first request gets redirected as it would be the first visit of a new visitor (302 status) and a new visitorID is brought down by Adobe server.
Then the redirected "200 status" request is made with this new visitorID within.This is bad because every XHR requests would result in a new visit of a new visitor even though a previously set "s_vi" cookie is there in browser, with the lack of previous collected data for that user.I know what XHR redirects couldn't be blocked so I'm wondering if there is a way to "tell" Adobe server it's not the first request ever made, in order to stop the redirect and do not use a new visitorID.

500 read timeout Selenium : on opening website with large records

I am using Perl with Selenium. I have set $sel->set_timeout("86400000");.
When opening a website with large content, 500 read timeout message is displayed. Can someone please help me?
It seems to me that not the Selenium webdriver (the client) has issued the timeout, but the webserver has been waiting too long.
What do you want to accomplish? Maybe you can just make a HTTP HEAD request to check that your URL is valid? (A HEAD request does not give you any content back, just the HTTP header with the http status code and, optionally, the "Content-Length" header, among other fields. The HEAD request is much faster that a GET or POST request and yo won't have problems with timeouts. You might get more than one HEAD respnses e.g. if your request is redirected to another server.
Or do you want to check the large content itself. Then I cannot help you at this point. There is not enough information.
You can use a Test::WWW::Mechanize object to create the HEAD request (it is a subclass of LWP::Request). NOt sure if selenium supports head requests.