PyGTK - "Could not show link" in AboutDialog - gtk

My GtkAboutDialog has its website attribute set to a valid URL.
When clicking on it, the window freezes, and then I get the following warning:
Could not show link
HEAD request failed: WinHttp error: TIMEOUT
Just to clarify, in other point of my program I explicitly access a website with webbrowser.open, and it easily opens the URL in the browser.
EDIT
After investigation, it appears that the website feature is using gtk.show_uri(). Calling it from the Python console (like this: gtk.show_uri(None, "http://www.google.com", gtk.gdk.CURRENT_TIME) ).
I have bypassed the problem by re-assigning the uri_hook to my custom function.
def uri_hook_func(self, ignore1, url, ignore2):
webbrowser.open(url, new=2)
...
gtk.about_dialog_set_url_hook(self.uri_hook_func, data=None)

Related

Facebook Custom Tabs

I understand how to create the app for the custom tab. However when I try to layout the next step it comes back with an error message. Can someone help me to properly layout the "With URL Redirects".
I know to put the Id number where is says YOUR APP ID and I have also placed the website in the "YOUR URL" position but it doesn't work. I have watched several videos and they all seem to be prior to the latest FB update.
The problem I am having seems to be coming from the setup for this code below that leads you to the Add Page Tab Dialog prompt. facebook.com/dialog/pagetab? app_id=YOUR_APP_ID &redirect_uri=YOUR_URL When I insert the "Your App ID" and Your URL" and hit enter I am receiving a Facebook Error message that says:
This dialog has been passed a bad parameter. API Error Code: 100 API
Error Description: Invalid parameter Error Message: Requires valid
redirect URI.

The Deezer's API page doesn't let me create a new app

I'm trying to create a new app on Deezer in this link but it doesn't let me, i put all the fields in the correct way and accept the policies, then i press "Create" but nothing happens, not even a error message, justo load a couple of seconds and nothing more. The Javascript console show me an error, it says "Uncaught ReferenceError: myapps is not defined" at line 199 on "create".
You have to fill full url with HTTP scheme (eg. http:// www.example.com) in these 3 fields:
Domain
Redirect URL after authentification
Link to your Terms of Use

404 when post submitted; found when directly called

I have a ColdFusion enabled form (for validation) submitting to a separate page. When this form is submitted it is showing me a 404 on the action page, yet when I directly load the action url into the address bar it shows up (errors appear, but that's ok). This is by far one of the most odd issues I have encountered.
Form page: http://www.jefferson.edu/population_health/_archive/contact_me.cfm
Action page: http://www.jefferson.edu/population_health/_archive/contact_action.cfm
Even if I try passing the form variables via URL it gives me a 404.
My gut is that there is another service on that machine that is trying to take over the request whenever you submit data and binding it to another webserver...which, of course, it can't find the right page based on it's own webroot.
If you click http://www.jefferson.edu/population_health/_archive/contact_me.cfm, it loads fine and returns 200 header with IIS as the server, but if you click http://www.jefferson.edu/population_health/_archive/contact_me2.cfm it throws a 404, as expected, but it's properly handled with a custom 404 and the header response is still IIS. But if you click http://www.jefferson.edu/population_health/_archive/contact_me.cfm?foo=bar, it returns an ApacheSling default 404 and header information saying the server is "Day-Servlet-Engine/4.1.12".
Your page is posting to the page contact_action.cfm ... in your question you indicate that the proper page should be "mailaction.cfm".
If the action page is actually mailaction.cfm then you simply need to change the action attribute of your cfform.

How to redirect to an external url with Selenium, and come back?

I am working in perl with Selenium RC, server version 2.19.0-b09 and I cannot figure out whether it is even possible to redirect to an external URL and come back to my application. I am trying to test Facebook OAuth in my application, which means I have to go to Facebook and come back to my app.
use Test::WWW::Selenium::Catalyst 'MyApp', -selenium_args => 'injectProxyMode -trustAllSSLCertificates -debug -log /home/me/browserlog.txt -firefoxProfileTemplate /home/me/.mozilla/firefox/SeleniumUser.default/';
my $selenium = Test::WWW::Selenium::Catalyst->start({
browser => '*chrome',
});
The reason I think this is possible at all is because a custom Firefox profile and the -injectProxyMode, *chrome browser and -trustAllSSLCertificates options enable me to post to and see all the redirects in my debug log, but my Remote Control window always disappears after the redirects. I can see the PROXY URL to which Facebook is trying to send me back, e.g., a URL on my own base domain. But it looks like there is no window for it to return to. In multiWindow mode I am left with my application in a Firefox window. In singleWindow mode my tests just end and all the windows close.
I have tried both -singleWindow and -multiWindow mode. I have gotten the list of windows after I make my post to https://www.facebook.com:443/login.php... and before all the redirects. I see a single window that is never available to select_window, and it always disappears on the second iteration if I run get_all_window_names in in a while loop: a window with a name like "_e_0RWG".
So, how could I conceivably do what I am trying to accomplish with Selenium? It seems so near and yet so far.

Request Dialog CRASHED?

Recently, Facebook has updated the component "request dialog" assigning responsibility to the exclusion of requests to the developers (http://developers.facebook.com/docs/reference/dialogs/requests#deleting). He also made other adjustments to the format of the request id. Thus added configuration option "request 2.0 efficient" on menu of the application developer.
The problem started after this change , the component "request dialog Multi - Friend- Selector" is in serious trouble. The component is crashed while trying to load friends. Sometimes friends loads, but the component does not resize height.
See the image of the errors:
Crashed before load friends:
http://postimage.org/image/glk2mf3bb/
Resize fail
http://postimage.org/image/iobduhn41/
In chrome browser component generates the following error:
s-static.ak.facebook.com/rsrc.php/v1/yS/r/syXGEAW5WYH.js:36 Uncaught TypeError: Cannot read property 'origin' of undefined
In firefox generates following error:
Erro: Permission denied to access property 'DocRPC'Arquivo-fonte: https://s-static.ak.facebook.com/rsrc.php/v1/yS/r/syXGEAW5WYH.js Linha: 36
Can you reproduce the error with the code itself Documentation
http://developers.facebook.com/docs/reference/dialogs/requests
Help please.
Seeing same errors here, but I can add some info:
It does seem to work if you use the basic example in https://developers.facebook.com/docs/reference/dialogs/requests, which opens up the dialog in a new browser window.
In Chrome, I found an additional error message to the one you posted:
"Unsafe JavaScript attempt to access frame with URL [...] from frame with URL [...]facebook.com/dialog/apprequests. Domains, protocols and ports must match."
From all that I guess the error may be related to the dialog display mode (read https://developers.facebook.com/docs/reference/dialogs). Within my app, I am getting this error exactly as you do, unless I set display to something like 'popup', in which case everything works (but a new borwser window is opened). The docs do state that "Because of the risk of clickjacking, [iframe] is only allowed for some certain dialogs, and requires you to pass a valid access_token." Well, passing access tokens did no good for me.
Little question: are you using some toolkit like GWT?