Bug 578285 - Installer fails on renamed user accounts
Summary: Installer fails on renamed user accounts
Status: NEW
Alias: None
Product: Oomph
Classification: Tools
Component: Setup (show other bugs)
Version: 1.23.0   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-19 17:42 EST by Josh Holmes CLA
Modified: 2022-01-21 22:19 EST (History)
2 users (show)

See Also:


Attachments
The error messages from the installer in my situation. (500.34 KB, text/plain)
2022-01-19 17:42 EST, Josh Holmes CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Holmes CLA 2022-01-19 17:42:28 EST
Created attachment 287858 [details]
The error messages from the installer in my situation.

I created a user account on my computer with a typo in my name.  Rather than delete it and creating a new one without the typo, I tried creating a new account with the right name and move everything over.  This failed, so I ended up renaming the account.  This process did not rename my home folder.  

This series of events causes the installer to fail because it assumes the user name is the same as the home folder name.

My situation:  I have 2 notable folders in C:\Users.  I have UserNaem and UserName.  I am logged in to an account called UserName, but whose home directory is UserNaem.  The installer gives me approximately 472 errors of the following form:

  ERROR: org.eclipse.equinox.p2.artifact.repository code=1003 Unable to write to repository: file:/C:/Users/UserName/.p2/pool.
  java.io.IOException: Failed to create directory C:\Users\UserName\.p2\pool\plugins.
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getOutputStream(SimpleArtifactRepository.java:1048)
    at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transferSingle(MirrorRequest.java:289)
    at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transfer(MirrorRequest.java:234)
    at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.perform(MirrorRequest.java:156)
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:779)
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.DownloadJob.run(DownloadJob.java:64)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Attached is the log from the eclipse installer.  I did alter the report, replacing my username with the usernames used in the post above.  It should be noted that my home directory has a space in the name, but I do not think that was the cause of this issue.
Comment 1 Josh Holmes CLA 2022-01-19 17:44:26 EST
I believe this is either simply due to the change in user name OR the existence of a home folder of the same name as the user account that is not the home folder of the user account.
Comment 2 Josh Holmes CLA 2022-01-19 18:00:55 EST
I tried going into the registry editor and renaming my home folder to UserName (and renaming the folder itself).  I also renamed the UserNaem folder to something else.  This operation was successful and I am able to log in to both user accounts.  However, Eclipse still fails to install, attempting to add things to the now non-existent folder UserNaem.

I will try renaming the home folder to UserNaem temporarily for the installation process then change it back to see if that works.
Comment 3 Josh Holmes CLA 2022-01-19 18:10:31 EST
The installer worked after I made the user account have the same name I originally created it with.  I guess at some point, I renamed the home folder in the past from Usernaem to something else and forgot about it.  I was having user account troubles at the time, so this isn't outside the realm of possibilities.

So, I suppose I should sum up the cause of the bug.  At some point in the past, I renamed the home folder of my Windows 10 user account from nameA to nameB using the registry editor and the folder rename tool.  Eclipse was attempting to use nameA, even though was no longer associated with the account.  

This is still a bug, but less severe than I originally thought because I did something strange to cause it to happen.
Comment 4 Ed Merks CLA 2022-01-20 03:15:45 EST
When I installed my new Windows 10 machine, it made my home director be edmer instead of merks!  Thanks Windows 10 for not asking me the folder name want but just choose to extract it from my email address instead.  After much Googling I figured I could change it, but that wasn't trivial...

In any case, if you rename a user folder after having used it for a while, it's not at all unlikely that files will have been created that refer to files in that user home's absolute location.

So, for example, anything in the .p2 folder and the .eclipse folders are likely to have absolute paths that will be broken.

The installer has a BUNDLE POOLS... menu that allows you determine/change the location of the shared bundle pool so you could have used this to create a new location.

But the installer could be smarter and notice this problem earlier; it's just that renaming your home folder is not a common operation and tend to break a lot of things on Windows...
Comment 5 Josh Holmes CLA 2022-01-21 17:41:05 EST
(In reply to Ed Merks from comment #4)
> When I installed my new Windows 10 machine, it made my home director be
> edmer instead of merks!  Thanks Windows 10 for not asking me the folder name
> want but just choose to extract it from my email address instead.  After
> much Googling I figured I could change it, but that wasn't trivial...
> 
> In any case, if you rename a user folder after having used it for a while,
> it's not at all unlikely that files will have been created that refer to
> files in that user home's absolute location.
> 
> So, for example, anything in the .p2 folder and the .eclipse folders are
> likely to have absolute paths that will be broken.
> 
> The installer has a BUNDLE POOLS... menu that allows you determine/change
> the location of the shared bundle pool so you could have used this to create
> a new location.
> 
> But the installer could be smarter and notice this problem earlier; it's
> just that renaming your home folder is not a common operation and tend to
> break a lot of things on Windows...

I have to say that if Windows doesn't want us renaming our home folders, it should let us CHOOSE the name of our home folder.  I do hope the Eclipse installer can be fixed so that it uses the current name of the home folder (as stated in the registry) rather than the original.
Comment 6 Ed Merks CLA 2022-01-21 22:19:39 EST
Yes, the Windows behavior is annoying and so very basic that a developer wants to control the name of the home folder, not have it derived from some email address...

One would hope that would get fixed.  Like one would hope you could tell the machine not to reboot automatically after an update.  But good luck with that.

Note that the installer does use the proper home folder, but it finds <home>/.p2/pool.info which tells it where you want your agent located, and it's that information that is wrong.  But how to know it's wrong?  Because the folder specified there is is missing?  What if it's a network drive that is currently unavailable?  The profiles.info is also broken..

But certainly one could detect early that there is and will be a problem if the agent location is not currently available...