Re: Komodo can't access Safari or Firefox

"Eric Robertson" <[email protected]>
Newsgroups gmane.comp.ide.komodo.general
Message-ID <43BBB12D8E8642DB814729EF8DBB172A@Time>

>-----Original Message-----
>From: Trent Mick [mailto:[email protected]]
>Sent: Wednesday, February 11, 2009 3:40 AM
>To: Eric Robertson
>Cc: [email protected]
>Subject: Re: [Komodo-discuss] Komodo can't access Safari or Firefox
>
>Eric Robertson wrote:
>> I have Komodo 5.0.3 currently installed on my Mac but I can't get it to
>> access either of my two browsers. In Preferences it gives me the option
>of
>> choosing /Applications/Firefox.app or /Applications/Safari.app but
>> regardless of which one I pick when I try to use any of the entries in
>the
>> Help menu that require a browser I get the message, for example, "Could
>not
>> open the browser at /Applications/Firefox.app" which is very annoying.
>I'm
>> sending this message from my Windows PC.
>>
>> For another application I found that since /Applications/Firefox.app is
>just
>> a package in the Mac that holds the executable I had to use the actual
>> location of the Firefox application for it to be able to access the
>browser.
>> I tried the same for Komodo but this too didn't work.
>>
>> This problem has been with me for some time now - I think that all of the
>> earlier versions of Komodo have had this problem. I posted a message on
>this
>> list some time ago about this but have not had an answer. I'd be very
>> grateful if someone could explain why this is not working and how I
>correct
>> this.
>
>I can't repro this, but a couple things to try:
>
>1. Does it work with this setting in the "Web & Browser" prefs panel?
>     Which browser should Komodo use whenopening URLs?
>     [ Ask when browser is launched the next time ]
>
>Note that the label for that setting is bogus for Mac OS X. On the Mac
>what that setting means is closer to "open in the default browser". Read
>on for details.
>
>
>2. Can you add the following debugging print to koWebbrowser.py in your
>Komodo and retry:
>
>> Index: C:\trentm\as\komodo\src\components\koWebbrowser.py
>> ===================================================================
>> --- koWebbrowser.py	(revision 26548)
>> +++ koWebbrowser.py	(working copy)
>> @@ -26,20 +26,21 @@
>>
>>
>>  class KoWebbrowser(object):
>>      _com_interfaces_ = [components.interfaces.koIWebbrowser]
>>      _reg_clsid_ = "{7B361CD6-4426-4d23-86D6-B6F8E0FCDA20}"
>>      _reg_contractid_ = "@activestate.com/koWebbrowser;1"
>>      _reg_desc_ = "Komodo Default Webbrowser Service"
>>
>>      def _spawn(self, command):
>>          """Spawn the given command (or argv) and return true iff
>successful"""
>> +        print "XXX koWebbrowser._spawn(command=%r)" % (command,)
>>          try:
>>              env = koprocessutils.getUserEnv()
>>          except ServerException, ex:
>>              log.error(str(ex))
>>              return 1
>>          try:
>>              process.ProcessOpen(command, env=env, stdin=None,
>stdout=None,
>>                                  stderr=None)
>>              return 1
>>          except process.ProcessError, ex:
>
>
>Then look for that output in the log?
>
>What I expect it to show is that a command something like:
>
>    ["open", "-a", "/Applications/Firefox.app", "... escaped URL ..."]
>
>
>
>Trent
>
>--
>Trent Mick
>trentm at activestate.com

I'm now back from a short break (and going off today for 2 weeks in the
sun!) and have the answers to your suggestions.

1. When I set the browser preferences to [Ask when browser is launched the
next time] and then click on one of the links in Help I get the message
"Could not file (sic) a graphical browser on the PATH with which to open
........".

2. I made the change you suggested to koWebbrowser.py after having located
it on my Mac. I'm attaching the part of the error log that appears when I
set Firefox as my browser and then try to access the ActiveState website
from the Help menu. Hope this gives you what you want although I don't see
what you were expecting.

Eric R

_______________________________________________
Komodo-discuss mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss
pystderr.log (application/octet-stream, 2.2 KB)
ERROR:xpcom:Unhandled exception calling 'int8 open_new_browser(in wstring, in wstring, out retval boolean);'
Traceback (most recent call last):
  File "/Applications/Komodo IDE.app/Contents/MacOS/python/xpcom/server/policy.py", line 277, in _CallMethod_
    return 0, func(*params)
  File "/Applications/Komodo IDE.app/Contents/MacOS/components/koWebbrowser.py", line 167, in open_new_browser
    if sys.platform == 'darwin':
  File "/Applications/Komodo IDE.app/Contents/MacOS/components/koWebbrowser.py", line 34, in _spawn
    process.ProcessOpen(command, env=env, stdin=None, stdout=None,
  File "/Applications/Komodo IDE.app/Contents/MacOS/python/komodo/process.py", line 170, in __init__
    creationflags=flags)
  File "/Applications/Komodo IDE.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
    errread, errwrite)
  File "/Applications/Komodo IDE.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
ERROR: root: 
-- EXCEPTION START --
+ QueryInterface (function) 3 lines
+ message (string) 'OSError: [Errno 2] No such file or directory'
+ result (number) 2147500037
+ name (string) '_execute_child'
+ filename (string) '/Applications/Komodo IDE.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py'
+ lineNumber (number) 1106
+ columnNumber (number) 0
+ location (object) File "/Applications/Komodo IDE.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
| + QueryInterface (function) 3 lines
| + language (number) 0
| + languageName (string) 'Python'
| + filename (string) '/Applications/Komodo IDE.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py'
| + name (string) '_execute_child'
| + lineNumber (number) 1106
| + sourceLine (string) 'raise child_exception'
| + caller (object) File "/Applications/Komodo IDE.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
| *
+ inner (object) null
| *
+ data (object) null
| *
*
-- EXCEPTION END --
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.