Summary: | [Browser] Cannot open help on Solaris | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Tod Creasey <Tod_Creasey> | ||||||||||
Component: | UI | Assignee: | Tim deBoer <deboer> | ||||||||||
Status: | RESOLVED FIXED | QA Contact: | |||||||||||
Severity: | major | ||||||||||||
Priority: | P1 | CC: | billy.biggs, dejan, douglas.pollock, eclipse, Kevin_Haaland, konradk, michaelvanmeekeren | ||||||||||
Version: | 3.1 | ||||||||||||
Target Milestone: | 3.1 RC3 | ||||||||||||
Hardware: | Sun | ||||||||||||
OS: | Solaris | ||||||||||||
Whiteboard: | |||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 288140, 292882 | ||||||||||||
Attachments: |
|
Description
Tod Creasey
2005-05-10 15:52:10 EDT
This is workbench browser suppport. Tod, can you go to Window > Preferences > General > Web Browser and let me know what your current settings are? My guess would be that the internal browser is selected and grayed out... if this is correct, can you try switching to the system browser setting (if available) or an external browser? Once you've done this, please try opening the help again to see if that fixed the problem. This is most likely a dup of 94470, which is fixed in M7 builds. Please let me whether this is the case so that we can close or fix this defect. 20050510 is the M7 test candidate. Was it fixed after that? Hi Tod, Sorry, it was not in I20050510. It should be in the new candidate, I20050512-1200. This is still an issue on 20050512. We are getting an out of handles exception Created attachment 21056 [details]
Log file
Hi Tod, The message in the log is the expected behaviour - if it can't use the internal browser, it logs the error containing the reason why it can't. This should probably look a little less like an actual error message, but it is expected. What was the behaviour when you tried to run? Does the Web Browser preference page look ok now? It doesn't open anything is the behaviour the user sees. We get the busy cursor for a few seconds and then nothing happens. There is no feedback as to what they should do. This really shouldn't be ignored for 3.1. Having no help at all is pretty serious. Tim, shoudn't the browser support handle this more gracefully i.e. switch to the system or external browser without any message? I have verified that this works if you specify the external browser - you might want to give the user a message when this happens. Tod, the expected behavour should be: if the default browser is 'internal' AND you establish that internal browser is not available, switch to system (if available) or external silently (or perhaps with an information dialog with a checkbox 'Don't show this dialog the next time'). Also note that Help has switched to use the browser support for external browsers, so it is vital that the first request is switched smoothly with no scary messages and such. Hi, As of 20050512 it should automatically switch to the system or external browser when the internal one is not available, and I've tested this on a couple machines. When you go to the preference page, the internal browser should be grayed out and not selected/selectable. Is this not happening on Solaris? Yes it is - but there is no way the user would ever think that a silent death would require a change to a Web Browser preference page. Also in the install case the user has no external browser defined - you should fall back out of the browser support when it is not available. Are you saying that there are NO external browsers in the out-of-the-box scenario for Solaris? The whole point of the one-stop-shop browser support was to have at least one running browser on each platform so that components don't need to mess with this problem. Rather than falling back from the browser support, we should make the browser support find 'a' browser. Note that Help is in the same boat. Pre 3.1, it had its own browser support to find a working browser on each platform to show help. In 3.1, we moved all the accumulated knowledge into the UI browser support and Help is now using it. Hence, our goal is never to get in the situation to fall out it it. To repeat: the desired solution is that the browser support detects that there is no internal browser, silently switch to the external browser and use it to display the requested URL. If none is available, it should open a message stating so and offer to open the Web browser preference page to allow the user to find a browser manually. That is exactly the case. There is no external browser until I dig around and find one to specify. Help was not very good at finding a browser on Solaris either, but was difficult to fail completely. It expected browsers on the path, tested which one were availabe, and picked one from among installed. In the wost case a message was displayed to define a browser in the preferences. Now if all fails, the browser support should display a message on what to do to get a browser working. Created attachment 21140 [details]
org.eclipse.ui.browser plugin.xml
Hi Tod,
Ok, that makes more sense now. I checked the plugin.xml, and the entries for
finding default browsers on Solaris did not match the OS tag from the platform.
Can you please try replacing the current plugin.xml in org.eclipse.ui.browser
with the attached copy, restarting with a new workspace, and check the list of
browsers? The plugin is now jarred which will make it a little harder to
replace the file, but if you replace it should be able to find some default
browsers now.
In the meantime, I'll check to see if it isn't firing the PartInitException in
this case, or whether Help is eating the exception.
The PartInitException does appear to get fired correctly in this case and with the correct message ("Could not open a Web browser because there are none configured. Check ..."). Konrad or Dejan - Can you check where Help is launching the browser and ensure that it is displaying the PartInitException if it is received? Quick look at the code reveals help ignores PartInitException. I have released a fix to help to display message when PartInitException is received. I was only trying on Linux, PartInitException is thrown when selection is on "Use external web browser" and I have no browser defined, but it is not thrown when "Use default system Web browser" is selected. And on my machine with internal web browser grayed out, the browser selected by default is the "Use default system Web browser" so there is no message to the user. The "default system browser" option is only enabled when the SWT Program class is able to detect a default application for html. Found a minor bug in how it was being launched, and we were ignoring if the system application still fails to launch the URL. Added a PartInitException in this case. Checked in and tagged all the changes. All of the known issues are now fixed. Kim is still unable to do this on RC1 What is the current behaviour on Solaris? Do you still see the busy icon and then nothing happens, with no error in the .log? Can you post the current Web browser preferences? Did it pick up any externally installed browsers, and is the 'system default browser' option selected? "Default System Webbrowser" is there and selected but when the page is opened (or I try to open help) I would get something similiar to the following: org.eclipse.swt.SWTError: No more handles [Unsupported platform] at org.eclipse.swt.SWT.error(SWT.java:2966) at org.eclipse.swt.browser.Browser.<init>(Browser.java:119) at org.eclipse.ui.internal.browser.WebBrowserUtil.canUseInternalWebBrowser(WebBrowserUtil.java:136) at org.eclipse.ui.internal.browser.WebBrowserPreferencePage.createContents(WebBrowserPreferencePage.java:189) at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:232) at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1376) at org.eclipse.jface.preference.PreferenceDialog$12.run(PreferenceDialog.java:1139) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1038) at org.eclipse.core.runtime.Platform.run(Platform.java:775) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148) at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1133) at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:351) at org.eclipse.jface.preference.PreferenceDialog$8.selectionChanged(PreferenceDialog.java:639) at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:763) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1038) at org.eclipse.core.runtime.Platform.run(Platform.java:775) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148) at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:761) at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1042) at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1062) at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:231) at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:226) at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:392) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:118) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3020) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2734) at org.eclipse.jface.window.Window.runEventLoop(Window.java:809) at org.eclipse.jface.window.Window.open(Window.java:787) at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:66) at org.eclipse.jface.action.Action.runWithEvent(Action.java:996) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:747) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3042) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2731) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1694) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1658) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:366) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:375) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:162) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948) (In reply to comment #25) > What is the current behaviour on Solaris? Do you still see the busy icon and > then nothing happens, with no error in the .log? > Can you post the current Web browser preferences? Did it pick up any externally > installed browsers, and is the 'system default browser' option selected? I am also stuck here. My Web Browser Preferences have the internal browser option disabled, have the external browser selection selected, and the Default System Browser is selected. However... when I try to instantiate a Browser object on solaris, I get a No More Handles error. I am trying to deploy an RCP on Solaris, Windows, and Linux that uses a Browser in the default perspective. This causes my Application to die a horrible death on Solaris. How do I get this Browser class to find a default browser to use on all platforms?? This is a major issue! I MUST have Solaris up and working very soon, and I have no idea what to do in my code. As a matter of fact, looking at the Browser source delivered with eclipse-SDK- 3.1RC1-solaris-motif.zip, the first check in the constructor error because it thinks it should be running on Linux!!!!!!!!!! See below: public Browser(Composite parent, int style) { super(parent,style | SWT.EMBEDDED); if (!IsLinux) { dispose(); SWT.error(SWT.ERROR_NO_HANDLES, null, " [Unsupported platform]"); //$NON-NLS-1$ } What is going on here??? Scott, we are not talking about the same problem here. Browser support in the platform UI is designed to allow you to open URLs on all the platforms using either internal or external web browser. What you are trying to do is use SWT Browser WIDGET on all the platforms. This widget is NOT supported on all the platforms - go read SWT FAQ on the list of supported combinations of operating and windowing systems. If you make a dependency of showing a browser embedded in the workbench (as a view or editor), your application can only run on the supported systems. SWT FAQ about the Browser widget: http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt- home/faq.html#browserplatforms Thanks for the quick reply Dejan. I agree, this is a different topic after reading the thread more closely. This is still a big problem. What is the appropriate forum to ask about rendering HTML on all platforms? I need Solaris support. Could I use an embedded Swing pane? Sorry for cluttering this bug report. -scott Yes, you can use the Swing pane. You need to put the Browser creation in the try/catch block and catch the SWTError with the code NO_MORE_HANDLES (see SWT home page for more details). In the 'catch 'block, you should create any other widget that should replace the browser. (In reply to comment #26) > "Default System Webbrowser" is there and selected but when the page is opened > (or I try to open help) I would get something similiar to the following: > org.eclipse.swt.SWTError: No more handles [Unsupported platform] Kim, you didn't specify where you get this? If you got this error in the log, that has been fixed. If you got it in the error dialog, that's not good and we would like to know about it more. That was in the log. Kim - Were there any runtime behaviour problems, or was it just the error in the .log? As Dejan noted, this has already been fixed by removing the stack trace and making it a warning (we still want to log something so that people can diagnose if the internal browser is not working). If it was just the .log error, then I'd like to close this bug again. Well, other than help not working, no.. no problems at all. ;) Hi Kim - Sorry, but this bug has a fair bit of extraneous information in it and I'm having a hard time following what is currently broken. Can you please post what the current behaviour is with a recent build and a new workspace? Also, what is listed in the external browser list on the Web Browser preference page? On I20050610-0010: If I try to open help I get a dialog titled "Action: Open [error]" that has the following contents: "TT_DESKTOP_ENOENT No such file or directory." There is nothing in the error log. There is one entry in the Web Browser pref page : "Default system Web browser" After open the pref page I get a message in the log: "Internal browser is not available: no more handles [Unsupported platform]" I see the same problem as in comment #36. I know Solaris users are beyond hope, but are they beyond help? Does this only happen on our box, or does this happen on all Solaris boxes? I don't recognize anything on the error dialog in comment #36 that could be coming from the Web browser plugin. In fact, when I google the error message I get documentation about something called 'ToolTalk', which is a complete mystery to me. Given that the warning message about not being able to use the internal browser appears after using the preference page, everything appears to be working correctly and this is the first time that it is trying to use the browser support. Konrad - Is Help doing anything before calling the Web browser that might be causing this? Kim/Douglas: 1) Can you try going straight to the preferences page first to see if that gives the same error, or try using the browser in a different way, e.g. double clicking on an html file in the workspace. 2) It's odd that the system default browser is the only one listed by default. Should it have picked up any installed browsers on your machine? If so, can you post the default install directories that they are in? I'm not at work at the moment, so I can't answer. However, it might be helpful to know what Solaris configurations you've tested the browser support on... Help is performing its normal startup when first launched. Nothing specific to Solaris, and the error does not ring the bell. Opening HTML file withoug going through help, as Tim asked in comment #39 might give definite answer whether errror is related to help activity One extra thought is that the message is coming from operating system or Mozilla. Can someone with access to the machine put an HTML file on the destkop and double click it (or whatever Solaris equivalent is). Does it launch a browser? Yes, it does open a browser. Is there a good spot to set a breakpoint? Well, I've traced it down to see what is happening. So far, I've been able to figure out that the dialog is being opened by CDE, not by Eclipse itself. The dialog appears to be opened only after Eclipse returns to the event loop (not in direct response to trying to open Help). And Help is attempt to use the Program class to open the URL. From Sun's Desktop Integration Guide (which explains how the ToolTalk Document and Media Exchange Message Set works), the TT_DESKTOP_ENOENT error code means that: The file that was alleged to contain the document does not exist. The Program instance carries the following information: command = "Open" gnomeExpectUri = false iconPath = "SDthtml" name = "HTML" The file name is "http://127.0.0.1:61647/help/index.jsp". What happens if you try to go to that address manually? Could it be that Tomcat isn't starting? I can connect to this address through an instance of Netscape that is already running. I've confirmed that this used to work in 3.0.2. I'll try see what the differences might be. Previously the browser was opened directly by calling Runtime.exec(String). This works. My guess would be that the CDE "Program" functionality doesn't handle anything but files on disk. Judging by the user interface of the desktop, this seems likely. Billy: Is this an accurate assessment? I would expect that this problem could be fixed by using a technique similar to what the MozillaBrowserAdapter did in 3.0.2. Could you try one other test? Create a new workspace and go directly to the Web Browser preferences. There is a little bit of code that runs to determine if any browsers are installed in default locations. It could be that this is touching something that Solaris doesn't like. If so, setting a breakpoint in WebBrowserUtil.addFoundBrowsers() should show the problem. Program.execute() on CDE is implemented using DtActionInvoke with DtACTION_FILE plus the argument, so it is quite possible that it is assuming the argument is a filename. (In reply to comment #48) > Could you try one other test? Create a new workspace and go directly to the Web > Browser preferences. There is a little bit of code that runs to determine if any > browsers are installed in default locations. It could be that this is touching > something that Solaris doesn't like. If so, setting a breakpoint in > WebBrowserUtil.addFoundBrowsers() should show the problem. I set the breakpoint. WebBrowserUtil.addFoundBrowsers finds no other browsers. There is only the SystemBrowserDescriptor. That's not much worse, comparing to 3.0.x. Help only had a MozillaBrowserAdapter and it required Mozilla to be on the system path. So launching help 3.0.1 on this machine would probably just display a message refering the user to help preferences or to the .log. (In reply to comment #51) > That's not much worse, comparing to 3.0.x. Help only had a > MozillaBrowserAdapter and it required Mozilla to be on the system path. So > launching help 3.0.1 on this machine would probably just display a message > refering the user to help preferences or to the .log. Actually, it opened just fine. See comment #46. The problem is that in 3.0.2 it executes Mozilla using a full path to the executable, while in 3.1 it tries to execute Mozilla using the Program API provided by SWT. Not being able to see help on Solaris in 3.1 vs being able to do this on 3.0 seems like it is a lot worse. I am worried that this back and forth method of debugging is not going to allow us to solve this in time. My question is: Tim (or Dejan,Konrad), do you actually have access to a Solaris box, if not can you rlogin in to one? I think that will be the best way to get to the bottom of this in time for RC3. UI is helping but can only turn around things so fast. We are checking with our Infra team as to whether you can use the one we have here right now. (In reply to comment #53) > My question is: > Tim (or Dejan,Konrad), do you actually have access to a Solaris box, if not can > you rlogin in to one? We don't have a Solaris box and our attempts to use remote X to debug from here failed due to your firewall settings. What are the chances of getting one of you guys to come down here before we ship to sort this out? I succeeded loggig-in remotely to Solaris machine in Ottawa, but could get Eclipse to work. To make the tomorrow's nightly build useful, I suggest we try following changes to the UI Browser support: 1. Disable System Browser adapter if Solaris, because it has issues. 2. Add path "/usr/dt/bin/netscape" to plugin.xml for netscape browser definition. Created attachment 23258 [details]
Konrad's requested change
I have made the modification and released into HEAD to get the nightly build to
work.
Could someone please try how help launches using the nightly build? Thanks. The problem still exists in N20050616-0010. Created attachment 23349 [details]
94497_o.e.ui.browser_patch2.txt
I was able to do some work on Solaris:
Using 20050615 (without changes), I see the error from system browser, but user
can define a new browser in the prefernce page.
In N20050616, Netscape appears in the list of external browsers, but System
browser is still there. We did not disable it enough. Attached patch fixes
this. It properly compares OS string, and adds a check if System browser is
available when browsers are restore from preferences (otherwise old workspace
would still have the system browser visible).
I tested it works. No errors. Netscape launches.
Dejan please review/release. Thanks.
Patch looks good - released. Verified in I20050617-0010. A 3.0 workspace launched in I20050617-0010, as does a workspace created fresh using I20050617-0010. A workspace created using one of the broken builds, however, opens an error dialog saying that there is no browser defined in the preferences. Defining a browser in the preferences works. This is probably okay. Verified again on I20050617-1618, Solaris Motif. verified on 3.1 RC3 on Linux/Motif |