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

Bug 363121

Summary: Incorrect IP address is used to launch external browser
Product: z_Archived Reporter: Tony Chen <chenzhh>
Component: EDTAssignee: Tony Chen <chenzhh>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: jqian, jspadea, smythew, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tony Chen CLA 2011-11-08 00:27:51 EST
Will reported that:

when launching a RUI in an external browser via the VE Preview tab's run action, can the URL have "localhost" in it versus what we do today (i.e. calculate the machine's IP address)? I have problems with this every once in awhile and end up having to manually change the URL to localhost. I don't think we need to be "cute" ... localhost is fine.

sometimes a correct URL is opened on my machine (e.g. http://9.x.x.x.x), but lately (for whatever reason) I am seeing http://169.x.x.x more often, and this page never loads ...
Comment 1 Tony Chen CLA 2011-11-08 00:36:25 EST
I have to investigate more to understand why an incorrect ip address is in the launch url. In theory, EVServer is listening to all available addresses and any valid IP address for that machine should work. I'll find a machine with VPN to test out this. 

For the suggestion to simply change to localhost. Because this function (using IP instead of localhost) was added in 2009 by Brian intentionally, I think it represents some sort of user requirements. 

Jing mentioned she would like to keep the IP address rather than localhost, it makes the testing a lot easier, especially when you have to test on many different browers (most of the time they're scattered on different machines)
Comment 2 Justin Spadea CLA 2011-11-08 09:09:53 EST
I agree that a solution to the incorrect IP is preferable to changing it to localhost, for the same reasons that Jing gave.
Comment 3 Brian Svihovec CLA 2011-11-08 09:22:28 EST
I found this information on the web (http://support.microsoft.com/kb/956196#am2):

If the IP address starts with 169.x.x.x: Windows has assigned you an automatic IP address (Automatic Private IP address) because your Internet server provider (ISP) did not provide an IP address. This configuration prevents you from accessing the Internet. In this case, there may be a hardware configuration issue. Contact the ISP for help. See the "More information" section for contact information

I am guessing that this happens when the machine switches networks while EDT is already running.  It may be even more limited to trying to run a page in EDT while the machine is attempting to connect to a new network.

I am setting this as an enhancement for a future release, since I think there may be some cases where Localhost is still valid.  I could see us providing one of a few different options:

1) Preference to determine how the URL is rendered
2) Add a drop down selection to Launch in External Browser that lets the user choose what URL is used.  Pressing the button uses the last selection or a default.
3) Providing a button on the toolbar of the VE to copy a URL to the clipboard

Will, if you are interested, we could put a VMArg in for .7 to change the default to localhost if you want.  As Tony has mentioned, this is a 5 minute change.