Closed pmetzger closed 6 years ago
The reason is that JavaScript automation is used and as noted here this is only supported from macOS 10.10 on. Since current opam
doesn't allow to constrain this and that support for 10.3 ended from apple in 2005 I'm simply going to close this. Sorry.
As a side note: using osascript to launch a browser is probably a much more complicated way to open a URL from the command line than using the OS X open utility at the command line.
This doesn't allow to implement the browser tab reload strategy which is needed for when you are working on the API docs of your projects.
Ah but now I see that in the odig
report you were talking about 10.13 which is another thing...
I'm sorry but unless you want to give a hand to debug the script you will have to wait that I upgrade to 10.13 for me to sort this out (it works before).
I'm happy to help debug it. Just tell me what to do.
(And apologies for the typo.)
I'm happy to help debug it. Just tell me what to do.
You could try to run:
'osascript' '-l' 'JavaScript' '-' 'false' 'false' 'com.google.chrome' 'http://www.panix.com/' < script
with script
being this and try to understand what fails.
I get:
$ 'osascript' '-l' 'JavaScript' '-' 'false' 'false' 'com.google.chrome' 'http://www.panix.com/' < foo.js
1929:1966: execution error: Error on line 50: Error: Invalid index. (-1719)
The problem seems to be:
tab = win.tabs[t];
As I don't know what this code is supposed to do, it is hard for me to debug it, but if you can explain what the script is intended to do for a living, I can try my hand at it.
It's mysterious to me, too. Is there any sort of debugging code you would like me to try running inside the script? I'm happy to run whatever you like.
BTW, as an aside, I have a lot of open browser windows. I don't know if this is an issue.
I have now upgraded to 10.13.4 and I can't reproduce this.
Are you using the latest version of chrome ?
Yes, I'm running the latest version of Chrome. I'll try it again right now.
Okay, now if I type browse http://www.panix.com
, my chrome windows all pop forward, concealing my shell window (not just the frontmost one) and none of them seem to be displaying the page. Oh, and the command hangs.
It's a bit difficult to be of any help. What shell are you using ? Do you have firefox
installed, if that is the case what is the result of:
browse --browser firefox http://www.panix.com/
If I do it with firefox
it works 100% perfectly.
Actually, not quite: running it multiple times opens multiple instances, and I was under the impression the point was to open only one and pop it up. But it does seem to work in general. No hangs, and the page loads.
Actually, not quite: running it multiple times opens multiple instances, and I was under the impression the point was to open only one and pop it up.
Yes that's a known issue see https://github.com/dbuenzli/webbrowser/issues/1, the only browser that provides the full support is chrome and safari on macos. It's pretty funny how a simple task like referesh a tab that has a given address can be tricky in practice.
So I don't know what's the problem with your chrome. Are you using Terminal.app ?
I am indeed using Terminal.app, and I'm happy to run any and all tests you suggest and give you the results.
Well I'm sorry but I ran out of ideas and you seem to be the only one hitting this problem. It would be nice if you can investigate yourself why the command actually hangs with your browser. Did you try to restart your browser ?
Restarted chrome just to be sure. browse
hangs, and the browser starts behaving horribly (including hanging) until I kill the process.
Is there any way to maybe get browse
to just run open
if I configure it that way?
So I can't reproduce and you are not able to provide more details about what's happening. So I'm closing this. Feel free to reopen if you can investigate and get more details.
Can we re-open this? I don't have time right now to try to do an in-depth investigation, but I will in a few weeks, and I won't forget about it.
More than two month later, still no new material for investigation, so I'm closing this until more details are provided --- add them as a comment to this issue once you have them and I'll reopen it if needed.
Having recently dealt with browsers it seems their behaviour can become quite glitchy whenever extensions are installed. So one direction for investigation could be a bad interaction if you have any extension installed. If that is the case try to open chrome without any extension and see if the problem persist.
You could have just pinged me about the fact that it was still open. In spite of my efforts I did forget about it.
Ping you have. Please provide investigation information rather than complaining. I already have lost quite some time trying to guide you here, I'm not a support hotline.
Given that this isn't stable and that there's documentation browsing code that depends on it, might it be possible to just use "open" instead of doing something clever on Mac OS X? It seems pretty clear that this isn't stable.
might it be possible to just use "open" instead of doing something clever on Mac OS X?
No. So far you are the only one who complained.
Perhaps the other people who have had trouble gave up rather than figuring out how to complain. Could we get the use of "open" as a configuration option? I can't currently use odig because the browser stuff doesn't work and it's irritating.
Perhaps the other people who have had trouble gave up rather than figuring out how to complain.
And perhaps not.
Look either you want to help me diagnose your problem or not. I suggested further directions to try to find out the problem and you didn't report about them. I lost enough time with you now so I'm not willing to help you further. The current mode of operation is highly needed if you spend a mininum amount of time working on library docsets and more generally for usability reasons if you repeatedly ask for the same documentation page.
If you want this issue to be solved either try to diagnose it on your side or find other people with the same problem and let them post about it on this issue so that maybe in contrast to you they might actually help me to figure out what's going on in an efficient manner.
More generally I would like to suggest you to stop posting your contentless and "me too" messages that bring nothing to discussions except noise which you became highly correlated with all over the places where I'm interacting with other people to try to get work done.
I lost enough time with you now so I'm not willing to help you further.
Thank you so much for your assistance. I'll try forking your library instead so I can get work done.
More generally I would like to suggest you to stop posting your contentless and "me too" messages that bring nothing to discussions except noise which you became highly correlated with all over the places where I'm interacting with other people to try to get work done.
Your suggestion is noted.
The following command fails at the shell on MacOS X 10.3.2
As a side note: using osascript to launch a browser is probably a much more complicated way to open a URL from the command line than using the OS X
open
utility at the command line.