Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 189128

Summary: Vista-specific error dialog when recording using IAC/IE on XP.
Product: z_Archived Reporter: Paul Slauenwhite <paulslau>
Component: TPTPAssignee: Paul Slauenwhite <paulslau>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: dmorris, jkubasta
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 177396, 211066    
Bug Blocks:    
Attachments:
Description Flags
Screen capture.
none
Screen capture #1
none
Screen capture #2
none
Patch
none
Patch V2 none

Description Paul Slauenwhite CLA 2007-05-25 08:33:32 EDT
IWAT3040E error when HTTP recording.

Using the TPTP-4.4.0-200705080100Y driver on XP Pro SP2/IE7, the enclosed error dialog is displayed when HTTP recording using the IAC.

This dialog should only be seen on Vista when there are not sufficient privileges to execute regedit.

Also, there are two issues with the message in this dialog:

1) Eclipse should be title case.
2) The new line character is not resolving correctly in the details section of the dialog.
Comment 1 Paul Slauenwhite CLA 2007-05-25 08:34:27 EDT
Duwayne, please investigate.  

We need a test case for this symptom added to the URL test execution test suite.
Comment 2 Paul Slauenwhite CLA 2007-05-25 08:35:38 EDT
Created attachment 68760 [details]
Screen capture.
Comment 3 Paul Slauenwhite CLA 2007-05-25 08:36:17 EDT
Note, clicking OK allows the recording to continue successfully.
Comment 4 Paul Slauenwhite CLA 2007-05-29 15:09:53 EDT
Using the TPTP-4.4.0-200705290100 build, I can reproduce this symptom using the IAC (see screen capture #1) but with the Agent Controller, I am getting another error (see screen capture #2):

Your browser is set in to use a SOCKS proxy.
Please de-select it if you wish to record.

Comment 5 Paul Slauenwhite CLA 2007-05-29 15:10:06 EDT
Created attachment 69125 [details]
Screen capture #1
Comment 6 Paul Slauenwhite CLA 2007-05-29 15:10:23 EDT
Created attachment 69126 [details]
Screen capture #2
Comment 7 DuWayne Morris CLA 2007-05-30 13:07:46 EDT
Hi Paul,

Hi Paul,

I am not able to reproduce this problem so far.  

One machine XP SP2, IE 7 and the 05080100C All-in-One Build.
Another machine XP SP2, IE 7 and the 05080100D All-in-One Build.
A third machnine XP SP2, IE 6 and the 05080100D All-in-One Build.

I am at a loss as to how to reproduce this problem.  Not sure what to do next unless I can get access to the machine that has the problem.  Also, did you use an All-in-One build?  Perhaps I need to perform the same install you did with the same files and the same JVM version.
Comment 8 Paul Slauenwhite CLA 2007-06-01 10:16:52 EDT
(In reply to comment #7)

Yes, using the TPTP-4.4.0-200705300100 all-in-one build, I can reproduce it consistency on my laptop.  Also, Liz was able to reproduce on her desktop using the May 28 driver.
Comment 9 Paul Slauenwhite CLA 2007-06-01 10:18:38 EDT
After investigating with Duwayne, there are couple of issues here:

1) When the user closes the workbench before IE is closed, some or all of the recorder proxy settings remain (see Tools >> Internet Options >> Connections >> LAN Settings >> Proxy server).  This was the cause of this defect.  As a work-around, the user can deselect these recorder proxy settings before starting another recording session.  After applying the work-around, Liz and I can successfully record using the IAC/IE.  Defect 190476 has been opened to address the problem of leaving corrupted state after workbench shut-down.  A redame entry will be added in 4.4 for this issue (see 190478).

2) There are two occurrences of following messages that should be merged using version of the string in org.eclipse.hyades.test.core\src\org\eclipse\hyades\test\core\internal\resources\messages.properties:

org.eclipse.hyades.test.core\src\org\eclipse\hyades\test\core\internal\resources\messages.properties:
RecorderClientApp_VISTA_ADMIN_ERROR 
RecorderClientApp_WINDOWS_ADMIN_ERROR

org.eclipse.hyades.test.tools.ui\src\org\eclipse\hyades\test\tools\ui\internal\resources\messages.properties:
HttpRecorderLaunchWizard_VISTA_ADMIN_ERROR 
HttpRecorderLaunchWizard_WINDOWS_ADMIN_ERROR

3) The error dialog cited in this defect is created in org.eclipse.hyades.internal.recorder.http.util.RecorderParamHelper#handleInvalidProxySettings(RecorderRegistryInfo) in the following block:

      else if (thisProxyError == regInfo.VISTA_ADMIN_ERROR) {
				// below is for bugzilla 177396 mdd
				UiPlugin.reportExceptionToUser(new RecorderException(ToolsUiPluginResourceBundle.HttpRecorderLaunchWizard_VISTA_ADMIN_ERROR), 
						ToolsUiPluginResourceBundle.HttpRecorderLaunchWizard_UNABLE_TO_START_RECORDER_MESSAGE, 
						ToolsUiPluginResourceBundle.HttpRecorderLaunchWizard_VISTA_ADMIN_ERROR, 
						ToolsUiPluginResourceBundle.HttpRecorderLaunchWizard_WINDOWS_GENERAL_ERROR);  
				throw new RecorderException(ToolsUiPluginResourceBundle.HttpRecorderLaunchWizard_VISTA_ADMIN_ERROR);
			}

This code should be invoked on non-Vista platforms.

4) Somewhat related, the HttpRecorderLaunchWizard_RECORDING_SELECT_DIFFERENT_BROWSER message in org.eclipse.hyades.test.tools.ui\src\org\eclipse\hyades\test\tools\ui\internal\resources\messages.properties has two spaces where there should be one.

As such, decreasing severity and deferring to 4.5.

Duwayne, please provide a sizing.
Comment 10 Paul Slauenwhite CLA 2007-09-24 08:33:12 EDT
This issue has been found in 4.4.0.3 testing.

Since this defect impacts the usability of the URL recorder, we need to address it early in 4.5. 

Duwayne, please provide a sizing.
Comment 11 Paul Slauenwhite CLA 2007-11-05 13:46:53 EST
Included in 4.5 plan for the Test Tools project.
Comment 12 Paul Slauenwhite CLA 2007-11-05 14:44:22 EST
Please provide a sizing for this defect before Monday, November 12, 2007.
Comment 13 DuWayne Morris CLA 2007-11-28 09:28:23 EST
Just to clarify, this defect is to clean up the error messages while another defect was filed to cover the case of leaving the browser state pointed to a proxy recorder when exiting Eclipse while in record mode.

Adding estimate and setting target iteration.
Comment 14 Paul Slauenwhite CLA 2008-01-30 12:14:20 EST
Deferred from I5 to I6 with PMC approval.
Comment 15 Paul Slauenwhite CLA 2008-02-21 09:00:09 EST
Duwayne, I will complete this defect as part of the HTTP Recorder enhancement work.
Comment 16 Paul Slauenwhite CLA 2008-02-25 12:35:20 EST
*** Bug 211066 has been marked as a duplicate of this bug. ***
Comment 17 Paul Slauenwhite CLA 2008-02-28 13:21:35 EST
(In reply to comment #13)
> Just to clarify, this defect is to clean up the error messages while another
> defect was filed to cover the case of leaving the browser state pointed to a
> proxy recorder when exiting Eclipse while in record mode.

Yes, #2 - 4 in comment #9.
Comment 18 Paul Slauenwhite CLA 2008-02-28 15:23:09 EST
The problem is in the org.eclipse.hyades.internal.execution.recorder.ui.wizards.RecorderRegistryInfo.getRegistryInfo(StringBuffer) method, where an IOException is thrown when reading the file (newSettingsFile.tmp) containing the original registry settings for the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings key.  The file, stored in the root workspace directory, is never written causing the IOException when it is read.  Unfortunately, using the 4.5.0M5-200802170400 build, I cannot reproduce it now.  I would assume it is the regedit or Runtime.exec() failing.

That said, the org.eclipse.hyades.internal.recorder.http.util.RecorderParamHelper.handleInvalidProxySettings(RecorderRegistryInfo) method was using the wrong error strings, given the impression that the general Windows issue was a Windows Vista-specific error.

The following files checked into CVS (HEAD) to resolve #2 - 4 in comment #9:

org.eclipse.hyades.test.core.internal.resources.TestCorePluginResourceBundle.java
/org.eclipse.hyades.test.core/src/org/eclipse/hyades/test/core/internal/resources/messages.properties
/org.eclipse.hyades.test.tools.ui/src/org/eclipse/hyades/test/tools/ui/internal/resources/messages.properties
org.eclipse.hyades.internal.recorder.http.util.RecorderParamHelper.java
Comment 19 Paul Slauenwhite CLA 2008-04-02 12:55:40 EDT
Able to spordically reproduce this defect using the TPTP-4.5.0-200804011409 build, producing the following exception:

java.io.FileNotFoundException: D:\Workspaces\workspace_TPTP\newSettingsFile.tmp (The system cannot find the file specified.)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:135)
	at org.eclipse.tptp.test.recorders.url.ui.internal.util.URLRecorderRegistryInfo.getRegistryInfo(URLRecorderRegistryInfo.java:206)
	at org.eclipse.tptp.test.recorders.url.ui.internal.util.URLRecorderRegistryInfo.<init>(URLRecorderRegistryInfo.java:83)
	at org.eclipse.tptp.test.recorders.url.ui.internal.util.URLRecorderParamHelper.getRecorderParams(URLRecorderParamHelper.java:64)
	at org.eclipse.tptp.test.recorders.url.ui.internal.wizards.URLRecorderWizardProvider.doFinish(URLRecorderWizardProvider.java:110)
	at org.eclipse.tptp.test.internal.recorder.ui.wizards.NewTestFromRecordingWizard.performFinish(NewTestFromRecordingWizard.java:106)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3773)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3372)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:260)
	at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:280)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:273)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
	at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:582)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:499)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:410)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3773)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3372)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2375)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2339)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2205)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:478)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:473)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:362)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:615)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Comment 20 Paul Slauenwhite CLA 2008-04-02 13:31:20 EDT
Patch approved by the PMC and checked into CVS (HEAD).
Comment 21 Paul Slauenwhite CLA 2008-04-02 15:37:21 EDT
This problem is caused by the regedit /e process terminating before the exported registry file is created.
Comment 22 Paul Slauenwhite CLA 2008-04-02 15:38:20 EDT
Created attachment 94607 [details]
Patch
Comment 23 Paul Slauenwhite CLA 2008-04-02 15:39:01 EDT
Hours worked for triage and creating patch.
Comment 24 Paul Slauenwhite CLA 2008-04-02 20:29:49 EDT
(In reply to comment #20)
> Patch approved by the PMC and checked into CVS (HEAD).
> 

Ignore.
Comment 25 Paul Slauenwhite CLA 2008-04-02 20:45:37 EDT
Created attachment 94646 [details]
Patch V2

Improved patch.
Comment 26 Paul Slauenwhite CLA 2008-04-02 20:48:32 EDT
Hours for additional triage and improved patch.

Verified that the regedit /e process routes any error messages to a Window dialog and not the standard error stream.  As such, the launched process is executing correctly and we cannot monitor the java.lang.Process' error stream for any errors to report back to the user.
Comment 27 Paul Slauenwhite CLA 2008-04-09 15:28:38 EDT
Patch V2 checked in to CVS (HEAD).
Comment 28 Paul Slauenwhite CLA 2008-06-10 10:54:33 EDT
Verified in TPTP-4.5.0RC3-200806031051.  Closing.