[google-appengine] urlfetch.fetch reporting inconsistent results?
urlfetch.fetch is reporting inconsistent results when querying the facebook graph api. If I curl the same URL from my terminal, it works fine. It works ok also using the local instance of the GAE with dev_appserver.py. I am using a mac and the dev_appserver version on my local is 1.9.20. I am using Python. I cannot share the access token, but the url I am trying to reach is "https://graph.facebook.com/v2.3/184277601936688"; - from the remote instance I saw the logs reporting this: { "error": { "message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api";, "type": "GraphMethodException", "code": 100, "fbtrace_id": "He4bs+MI7Qs" } } but with curl and also on my local instance, I get a proper response and a JSON document. anybody has any advice on this? I received an email yesterday from google, stating that url_fetch has some inconsistend behaviour and I believe I stumbled in it. They say to contact their support in this case but where can I reach them? Thanks -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/d4e99dfc-4980-4c51-b4d9-d024d712bce0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[google-appengine] Re: urlfetch.fetch reporting inconsistent results?
Hello Luciano, thanks for your answer. As you suggested I've upgraded my local dev_appserver version to 1.9.34. *GraphMethodException* is related to a search that cannot be served by the Graph API since there is no handler for it. I don't think this is the case since, as mentioned, I can access the same url I query from the GAE instance, using CURL and in that case I obtain a valid result and not an exception. It works also on my local instance, when I use the interactive console and use urlfetch.fetch. It also works when I fetch the sm API url from inside my program on my local machine. Summarizing: - from terminal: curl "https://graph.facebook.com/v2.3/184277601936688?access_token=xxx"; *WORKS* - from local instance: from google.appengine.api import urlfetch u = urlfetch.fetch( "https://graph.facebook.com/v2.3/184277601936688?access_token=xxx";) print u.content *WORKS* *- *from local instance program runs and visits API endpoint: *WORKS* - from GAE remote instance from google.appengine.api import urlfetch u = urlfetch.fetch( "https://graph.facebook.com/v2.3/184277601936688?access_token=x";) print u.content *DOES NOT WORK* *- *from remote instance program runs and visits API endpoint: *DOES NOT WORK* At the present time, I cannot find the problem. I thought it could be that facebook just cut off requests coming from GAE or certain ips... but it does NOT happen for all the facebook ids I try to query, only for some of them. On Thursday, March 17, 2016 at 10:09:26 PM UTC-7, Luciano Pacheco wrote: > > Hello Diego, > > I'm Luciano from Google Cloud Support. > > The issue mentioned on the email you that received yesterday has been > fixed. So the error you're experiencing is unrelated. > > I searched online for "facebook graphapi GraphMethodException" and it > seems related to some permissions on the Facebook app or entity being > updated, see this stackoverflow question > <http://stackoverflow.com/questions/17209975/facebook-open-graph-graphmethodexception-error-code-100> > for > example. > > I also suggest you to upgrade your local environment from 1.9.20 to our > latest version 1.9.34 <https://cloud.google.com/appengine/downloads>. > > Cheers, > > Luciano Pacheco > > On Friday, March 18, 2016 at 5:26:13 AM UTC+11, Diego Marchi wrote: >> >> >> urlfetch.fetch is reporting inconsistent results when querying the >> facebook graph api. If I curl the same URL from my terminal, it works fine. >> It works ok also using the local instance of the GAE with dev_appserver.py. >> >> I am using a mac and the dev_appserver version on my local is 1.9.20. I >> am using Python. >> >> I cannot share the access token, but the url I am trying to reach is " >> https://graph.facebook.com/v2.3/184277601936688"; - from the remote >> instance I saw the logs reporting this: >> { >>"error": { >> "message": "Unsupported get request. Please read the Graph API >> documentation at https://developers.facebook.com/docs/graph-api";, >> "type": "GraphMethodException", >> "code": 100, >> "fbtrace_id": "He4bs+MI7Qs" >>} >> } >> >> but with curl and also on my local instance, I get a proper response and >> a JSON document. >> >> anybody has any advice on this? I received an email yesterday from >> google, stating that url_fetch has some inconsistend behaviour and I >> believe I stumbled in it. They say to contact their support in this case >> but where can I reach them? >> >> Thanks >> > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/b5887a02-b09b-4f44-81e1-48b45e768800%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[google-appengine] Re: urlfetch.fetch reporting inconsistent results?
I don't think it's something that has to do with that kind of restrictions. I can get the response just fine using my local machine or any other machine. If the graph api is the culprit then it's because it's limiting the access to GAE perhaps, but that would not explain why it works for most pages and not for others. On Wednesday, March 23, 2016 at 12:21:23 PM UTC-7, Joshua Johnston wrote: > > See > http://stackoverflow.com/questions/6843796/graph-api-returns-false-or-unsupported-get-request-accessing-public-facebook > > and > http://stackoverflow.com/questions/13739609/unsupported-get-request-in-facebook-graph-api > > on stack overflow. > > It may be restrictions set on the page around Country / Age / Page > Visibility. It may also be because the page does not have enough likes yet > (< 25) > > On Wednesday, March 23, 2016 at 1:06:33 PM UTC-4, Diego Marchi wrote: >> >> Hello Luciano, >> >> thanks for your answer. As you suggested I've upgraded my local >> dev_appserver version to 1.9.34. >> >> *GraphMethodException* is related to a search that cannot be served by >> the Graph API since there is no handler for it. I don't think this is the >> case since, as mentioned, I can access the same url I query from the GAE >> instance, using CURL and in that case I obtain a valid result and not an >> exception. >> It works also on my local instance, when I use the interactive console >> and use urlfetch.fetch. It also works when I fetch the sm API url from >> inside my program on my local machine. >> >> Summarizing: >> - from terminal: >> curl " >> https://graph.facebook.com/v2.3/184277601936688?access_token=xxx"; >> *WORKS* >> >> - from local instance: >> from google.appengine.api import urlfetch >> >> >> u = urlfetch.fetch(" >> https://graph.facebook.com/v2.3/184277601936688?access_token=xxx"; >> ) >> print u.content >> *WORKS* >> >> *- *from local instance program runs and visits API endpoint: *WORKS* >> >> - from GAE remote instance >> from google.appengine.api import urlfetch >> >> u = urlfetch.fetch(" >> https://graph.facebook.com/v2.3/184277601936688?access_token=x";) >> >> print u.content >> *DOES NOT WORK* >> >> *- *from remote instance program runs and visits API endpoint: *DOES NOT >> WORK* >> >> At the present time, I cannot find the problem. I thought it could be >> that facebook just cut off requests coming from GAE or certain ips... but >> it does NOT happen for all the facebook ids I try to query, only for some >> of them. >> >> >> On Thursday, March 17, 2016 at 10:09:26 PM UTC-7, Luciano Pacheco wrote: >>> >>> Hello Diego, >>> >>> I'm Luciano from Google Cloud Support. >>> >>> The issue mentioned on the email you that received yesterday has been >>> fixed. So the error you're experiencing is unrelated. >>> >>> I searched online for "facebook graphapi GraphMethodException" and it >>> seems related to some permissions on the Facebook app or entity being >>> updated, see this stackoverflow question >>> <http://stackoverflow.com/questions/17209975/facebook-open-graph-graphmethodexception-error-code-100> >>> for >>> example. >>> >>> I also suggest you to upgrade your local environment from 1.9.20 to our >>> latest version 1.9.34 <https://cloud.google.com/appengine/downloads>. >>> >>> Cheers, >>> >>> Luciano Pacheco >>> >>> On Friday, March 18, 2016 at 5:26:13 AM UTC+11, Diego Marchi wrote: >>>> >>>> >>>> urlfetch.fetch is reporting inconsistent results when querying the >>>> facebook graph api. If I curl the same URL from my terminal, it works >>>> fine. >>>> It works ok also using the local instance of the GAE with dev_appserver.py. >>>> >>>> I am using a mac and the dev_appserver version on my local is 1.9.20. I >>>> am using Python. >>>> >>>> I cannot share the access token, but the url I am trying to reach is " >>>> https://graph.facebook.com/v2.3/184277601936688"; - from the remote >>>> instance I saw the logs reporting this: >>>> { >>>>"error": { >>>> "message": "Unsupported get request. Please read the Graph API >>>> documentation at http
[google-appengine] Re: urlfetch.fetch reporting inconsistent results?
Unfortunately this is not an option :( On Wednesday, March 23, 2016 at 12:47:45 PM UTC-7, Kaan Soral wrote: > > As a very sincere suggestion, try not to build anything for fb at all, if > you can (and for instagram/twitter for that matter) > > It's basically a trap for developers, you waste your resources (i), there > is no positive outcome at all, even if you manage to get a positive > outcome, it will be terminated with various excuses and sometimes no > excuses at all > > More on topic, unexplainable fb api failures are pretty common, I just > ignore them at this point, try not to lose time on it, if it's not mission > critical, in some months, it may even fix itself, even if you report it to > fb and it gets accepted as a bug, don't expect a swift solution (because > (i)) > > The only valid fb api usage at this point is b2b apps, where the > end-business is the ones that are trapped, like page owners etc., you might > profit from selling apps to them while their waste their times with their > fb pages, even in this case, if you are not at the point of no return, > return and do something useful :) > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/82b8a37e-1347-44f2-bd99-4bcccf8c7fc8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[google-appengine] Re: Cannot view log-based metrics in stackdriver - missing resource type
ah I left the logs undisturbed overnight and tada, they appeared this morning! They were just shy and needed to load I presume.. On Tuesday, February 12, 2019 at 11:51:53 PM UTC-8, Diego Marchi wrote: > > Hi, > I am trying to create a log based metric on my instance of GAE. I create > the filter on the logs and try to visualize the metric I created but, in > the stackdriver screen, I do not see any data points. When prompted to > select a resource type, none is loaded, therefore I believe I cannot see > the data points. > > The query is the following - you can see the resource.type is in it: > resource.type="gae_app" logName="projects//logs/ > appengine.googleapis.com%2Frequest_log" ("company: abra:cadabra" AND > "/task/capture/sf~") > > > And this is what I see on Stackdriver, when I try to visualize the > log-metric: > > [image: 123.png] > > The funny thing is that I created a metric with somewhat similar > parameters before this and it worked like a charm. This is the one: > resource.type="gae_app" resource.labels.module_id="default" resource. > labels.version_id="live" logName="projects/hidden/logs/ > appengine.googleapis.com%2Frequest_log" "REQUEST_LIMIT_EXCEEDED" > > > What am I missing? > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/0839e2d4-7b70-4828-87e7-411270f58a5c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.