Why do I see a bunch of requests to https://clouddebugger.googleapis.com:443 GET /v2/controller/debuggees/gcp*/breakpoints?agentId=* in logging? - google-cloud-debugger

We don't have any humans actively debugging our application, yet I see a bunch of requests in our logs to clouddebugger.googleapis.com (or from?).
Anyone know where and why these requests are coming in?
The requests take the following form:
https://clouddebugger.googleapis.com:443 GET /v2/controller/debuggees/gcp*/breakpoints?agentId=*

It looks like these request are coming from GCP's Cloud Debugger API; More specifically, the REST API using the Method: "debugger.debuggees.breakpoints.get" which is used for getting breakpoint information.
It could be that your application that is running (or using) the API to get your codes breakpoint information and send it to Cloud Debugger. I would suggest reviewing your applications code to see if this API is being used anywhere in your application.

Related

How to log react console errors to a file?

I am new in front-end/client-side app development for website. I am setting up a new react project. I used create-react-app.
How should I handle the console errors(other than network call errors)? Is there a way to log them in any file?
What are the best logging practices?
Even though there are means and ways to store data on the browser (not to actual client files) that's not really the general strategy for logging browser errors (which I believe is what you're referring to).
In my experience we'd have a dedicated logging server with a simple API with adequate security that filters traffic and applies rate limiting. That would finally enhance and write logs into a document database that can later be analysed.
A naive JavaScript solution would be using the following to capture errors and send them out to a logging server.
window.onerror = function(message, url, lineNumber) {
// make ajax call to api to save error on server
return true;
};
I should also mention Sentry.io - they provide a service that does this and even though there are some limitations they're usually enough for a small to mid app.
https://github.com/getsentry

Possible to access Piwik getVisitorLog through HTTP API?

I'm building some reporting tool. Ideally I want to avoid going through web server logs myself and use (some of) the power of Piwik.
The stuff I get from the visitor log would be a good start, this is at http://example.com/piwik/index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday#/module=Live&action=getVisitorLog&idSite=1&period=day&date=yesterday
Unfortunately I can't find a getVisitorLog action in the HTTP API docs at
http://developer.piwik.org/api-reference/reporting-api#Actions (and it's also not an undocumented feature, method=Actions.getVisitorLog gives me
The method 'getVisitorLog' does not exist or is not available in the module '\Piwik\Plugins\Actions\API'.
Is there another way to get to this? Or should I write a plugin for Piwik?
Apparently it is possible through the Live plugin API:
http://developer.piwik.org/api-reference/reporting-api#Live
This works as desired:
http://example.com/piwik/index.php?module=API&method=Live.getLastVisitsDetails&format=JSON&idSite=1&period=day&date=2015-07-21&expanded=1&token_auth=XXXXX&filter_limit=100

Bug: 500 Internal Server Error while calling Google Static Maps API

Good afternoon.
We've recently noticed a growing number a API call failure when trying to reach your Google Static Maps API.
Issues initially seemed intermittent, but seems to happen a lot more frequently, if not: all the time.
What steps will reproduce the problem? Please provide a link to a
demonstration page if at all possible, or attach code.
Totally works locally or in a web browser
Sends out a 500 Internal Server Error when on our staging/production systems
Could that be related to authentication? To my knowledge, API keys aren't really enforced locally, but definitely checked for when application runs on a live system.
Doesn't report as an error in our Google API Console. Just as a regular successful call.
Sample URL:
https://maps.googleapis.com/maps/api/staticmap?center=38.121504,-122.590525&scale=2&visual_refresh=true&size=280x188&key=OUR_BROWSER_API_KEY&markers=icon:http://stage.hometrendsreport.com/images/mini_orange.png|shadow:false|38.121504,-122.590525&markers=icon:http://stage.hometrendsreport.com/images/mini_blue.png|shadow:false|38.121073,-122.5932|38.123742,-122.591363|38.123981,-122.590448|38.124226,-122.589497|38.118754,-122.588585|38.119648,-122.587095|38.123877,-122.587494|38.118187,-122.592065|38.118038,-122.591357&markers=icon:http://stage.hometrendsreport.com/images/mini_gray.png|shadow:false|38.118442,-122.589865|38.118442,-122.589865|38.12166,-122.602269|38.116919,-122.571937
Here's our code snippet, using ruby/paperclip:
self.picture = URI.parse(google_map_url.to_s)
return self.save
Any idea why this is happening?
Any help gladly appreciated.
Best regards,
For developers viewing this issue: please click the 'star' icon to be
notified of future changes, and to let us know how many of you are
interested in seeing it resolved.
When I access the link I get an "invalid API key", so the API Key may be the problem. I believe there are also much lower quota for requests to the static map API, while testing you may have exceeded your quota.

Invalid and/or missing SSL certificate when using Google App Engine

UPDATE: Please, if anyone can help: Google is waiting for inputs and examples of this problem on their bug tracking tool. If you have reproducible steps for this issue, please share them on: https://code.google.com/p/googleappengine/issues/detail?id=10937
I'm trying to fetch data from the StackExchange API using a Google App Engine backend. As you may know, some of StackExchange's APIs are site-specific, requiring developers to run queries against every site the user is registered in.
So, here's my backend code for fetching timeline data from these sites. The feed_info_site variable holds the StackExchange site name (such as 'security', 'serverfault', etc.).
data = json.loads(urllib.urlopen("%sme/timeline?%s" %
(self.API_BASE_URL, urllib.urlencode({"pagesize": 100,
"fromdate": se_since_timestamp, "filter": "!9WWBR
(nmw", "site": feed_info_site, "access_token":
decrypt(self.API_ACCESS_TOKEN_SECRET, self.access_token), "key":
self.API_APP_KEY}))).read())
for item in data['items']:
... # code for parsing timeline items
When running this query on all sites except Stack Overflow, everything works OK. What's weird is, when the feed_info_site variable is set to 'stackoverflow', I get the following error from Google App Engine:
HTTPException: Invalid and/or missing SSL certificate for URL:
https://api.stackexchange.com/2.2/me/timeline?
filter=%219WWBR%28nmw&access_token=
<ACCESS_TOKEN_REMOVED>&fromdate=1&pagesize=100&key=
<API_KEY_REMOVED>&site=stackoverflow
Of course, if I run the same query in Safari, I get the JSON results I'm expecting from the API. So the problem really lies in Google's URLfetch service. I found several topics here on Stack Overflow related to similar HTTPS/SSL exceptions, but no accepted answer solved my problems. I tried removing cacerts.txt files. I also tried making the call with validate_certificate=False, with no success.
I think the problem is not strictly related to HTTPS/SSL. If so, how would you explain that changing a single API parameter would make the request to fail?
Wait for the next update to the app engine (scheduled one soon) then update.
Replace browserid.org/verify with another service (verifier.loogin.persona.org/verify is a good service hosted by Mozilla what could be used)
Make sure cacerts.txt doesnt exist (looks like you have sorted but just in-case :-) )
Attempt again
Good luck!
-Brendan
I was facing the same error, google has updated the app engine now, error resolved, please check the updated docs.

Creating a channel for webRTC video chat

I've been following the HTML5rocks webRTC guide and I have the Javascript set up as described, however the guide is not clear on how to receive a channelToken, roomKey, and User ID. The guide says,
"Note that values used in the JavaScript, such as the room variable and
the token used by openChannel(), are provided by the Google App Engine
app itself: take a look at the index.html template in the repository
to see what values are added."
Unfortunately the link provided is no good and I'm left with very little information regarding the most essential step in this process. The guide isn't clear about whether or not the Google App Engine is a necessary component and I don't see why it should be. I have searched the web in an attempt to find a more useful source, but I was unsuccessful. I also took a look at the webRTC Demo(https://apprtc.appspot[dot]com), that too was no help seeing that the channel information is generated server side. I feel like I should just be able to make a simple http request to some Google server and then run from there. Any information regarding my problem would be much appreciated.
Apologies: the code for this example has been moved to here.
(Been meaning to update the article, but haven't had a chance...)
The apprtc.appspot example uses the Channel API on App Engine for signaling, but there are lots of other ways to do this. Signaling mechanisms are not defined by the WebRTC spec. (Note that signaling, which is accomplished via a signaling service, is the exchange of network and media metadata in order to set up a WebRTC 'call': the actual data is communicated directly between peers.)
We ran a codelab at Google I/O, which describes from start to finish how to build a video chat application that uses Socket.io on Node.js for signaling (it's very simple!) You might want to try that instead.

Resources