[mac] profile migration fails on not finding certain 4.x files and folders



19 years ago
3 years ago


(Reporter: racham, Assigned: sspitzer)


Mac System 8.5

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [rtm++])



19 years ago
I noticed that profile migration failing when the user's 4.x profile does not 
have one of the following folders.

* Mail folder 
* News folder
* ImapMail folder (if the user has an imap account)

Additionally on Macintosh : MagicCookie file

I ran into various situations which exposed this bug.

1. I create a 4.x profile and created an imap account. I didn't login into my 
imap account in 4.x. So, ImapMail folder is never created on 4.x. Now, when I 
tried to migrate the profile, I profile won't migrate as it won't find ImapMail 
folder. This might not be a common case. But it still probably is not the right 
thing to do.

2. I got very close to wrapping up with bug 44764 (japanese profiel migration) as 
I could get one of the japanese profiles migrated successfully on mac. Here is 
the case, If I create a profile using english communicator on Japanese OS, 
messenger creates Mail, News folders (and ImapMail folder on login for iamp 
accounts). So, I created one profile like that and logged into imap account. Now 
when I migrated the profile, it got migrated without any problems. Later I 
created a profile using japanese communicator build. In that profile, messenger 
created 'Mail' and 'News' folder names in japanese characters (a note here 
ImapMail folder name is created in english only). Now, when I tried to migrate 
this profile the profile migration code looks for folder names "Mail" and "News" 
(folder names in english) [http://lxr.mozilla.org/seamonkey/source/profile/pref-
migrator/src/nsPrefMigration.cpp#156] and it didn't find them and migration 

3. Also, another case [Mac only] was exposed when I tried to migrate after making 
sue that I have Mial, News and ImapMail folders. My 4.x profile didn't have a 
MagicCookie as it was a new profile and I didn't go a site that sets any cookies. 
So, profile migration failing to open the MagicCookie file bailed out and the 
migration was unsuccessful. I guess we need to check for the existence of the 
file before we try to poen and fail. Also, I think if we fail to open the cookie 
file for some reason, we should let user know of the fact and finish the 
migration of the profile. 

Seth should be able to tell us about the importance of the existence of those 
mail folders as factors to profile migration success/failure. Assigning this bug 
to him. 

This bug is generic profile migation problem.

Comment 1

19 years ago
nominating for rtm.
Keywords: rtm

Comment 2

19 years ago
Adding Scott Putterman to the cc list.

Comment 3

19 years ago
marking rtm need info.
Whiteboard: [rtm need info]
I believe sairuh has hit case #1 before, adding her to the cc list.

fixing #1 and #3 will be easy.  I'll start on a fix for them now.

fixing #2 is covered in bug #55449

I believe sairuh has hit case #1 before, adding her to the cc list.

fixing #1 and #3 will be easy.  I'll start on a fix for them now.

fixing #2 is covered in bug #55449

the MagicCookie mac bug is now bug #55955
what platform did you observe #1?

on win32, I created a profile that used imap in 4.x, then quit
I was able to migrate fine.  (my imap account, my bookmarks and my prefs came
over fine.)

Comment 8

19 years ago
Same results for me on WinNT (i.e. successful eventhough there were no mail
directories).  The only way I was able to make it error out was to remove the
prefs.js file.
hmm, maybe I was testing this wrong.

I'm going to try again, but by removing my "Mail" and "News" directories from my
4.x profile and see what happens.

if that does cause the problem, (which would match the scenario a japanese user
would hit in bug #55449) then this should be easy to fix.

hmm, removing "Mail" and "News" didn't seem to cause migration to fail.
zoinks!  winnt handles this, but not my mac.

you meddling kids.

Comment 12

19 years ago
Figures.  I think Old man Witherspoon works for Apple.
ok, I see the problem.  the reason it doesn't fail on winnt is differences in
the file spec implementations.

fix in hand.
here's the fix:

*** 2049,2052 ****
--- 2052,2061 ----
    rv = NS_FileSpecToIFile(&pathSpec, getter_AddRefs(pathFile));
    if (NS_FAILED(rv)) return rv;
+   PRBool exists = PR_FALSE;
+   pathFile->Exists(&exists);
+   NS_ASSERTION(exists, "the path does not exist.  see bug #55444");
+   if (!exists) return NS_OK;

  	rv = m_prefs->SetFileXPref((const char *)premigration_pref, pathFile);
r=putterman, sr=mscott

the problem was we'd fail to migrate because we'd fail to set the "premigration"

now, if the path points to a folder that doesn't exist, we just gracefully fail.
Whiteboard: [rtm need info] → [rtm+]

Comment 16

19 years ago
marking [rtm++]. I was just in a meeting where PDT agreed to mark this rtm++ and
it looks like we moved onto a different bug before hitting submit.
Whiteboard: [rtm+] → [rtm++]

remember, you need to be on a mac to verify this.
Last Resolved: 19 years ago
Resolution: --- → FIXED
Summary: profile migration fails on not finding certain 4.x files and folders → [mac] profile migration fails on not finding certain 4.x files and folders

Comment 18

19 years ago
reproduced the bug on an old build-verified fix on build 20001018008MN6
Keywords: vtrunk

Comment 19

19 years ago
Verified on the 10/31 Mac trunk build.
Keywords: vtrunk
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.