Last Comment Bug 361233 - installation of 1.1b breaks mapi linkage from excel and word
: installation of 1.1b breaks mapi linkage from excel and word
Status: RESOLVED FIXED
relnote-seamonkey1.1.1
: fixed-seamonkey1.1.1, fixed1.8.1.3
Product: MailNews Core
Classification: Components
Component: Simple MAPI (show other bugs)
: 1.8 Branch
: x86 Windows XP
: -- major with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
: 364675 368051 368054 369567 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-19 15:36 PST by brian lehrhoff
Modified: 2008-07-31 04:30 PDT (History)
17 users (show)
jaymoz: blocking1.8.1.2-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Registry file to fix missing startup on MAPI call issue (890 bytes, text/plain)
2007-01-19 06:43 PST, Christian Franke
no flags Details
Patch for nsMapiRegistryUtils.cpp (791 bytes, patch)
2007-01-20 07:08 PST, Christian Franke
mscott: review+
mscott: superreview+
mscott: approval‑thunderbird2+
Details | Diff | Splinter Review
error trying send file from microsoft visio (6.76 KB, image/png)
2007-01-31 15:50 PST, Igor Velkov
no flags Details
second error window trying send file from microsoft visio (3.21 KB, image/png)
2007-01-31 15:52 PST, Igor Velkov
no flags Details
error trying send file from OpenOffice 2.1 (6.77 KB, image/png)
2007-01-31 15:53 PST, Igor Velkov
no flags Details

Description brian lehrhoff 2006-11-19 15:36:49 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061030 SeaMonkey/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061030 SeaMonkey/1.0.6

after installing 1.1b, can't attach documents from word or excel via mapi.

Reproducible: Always

Steps to Reproduce:
1.installed 1.1b
2.opened word
3.opened existing document
4.file/send/to mail as attachment
5. got message "login failed. you must login to microsoft exchange to access your address book.
6. similar message in excel.
7. system restore corrected issue.
8. re-install of 1.1b broke it again.

(using moz for mail, not outlook.)




something is obviously breaking the mapi or ldap settings in the registry.  i can offer a before-and-after export, but i have no way to compare ... nor do i know what to compare ...
Comment 1 Christian Franke 2007-01-17 04:12:15 PST
The bug can also be reproduced with other apps using MAPI like OpenOffice 2.1 or the "Send To|Mail recipient" function of explorer.

After installing SM 1.1b on XP SP2, MAPI does no longer work.

Result when examining the old MAPI Sample "smpcli32" from Win32 SDK in debugger:

With SM 1.1b, the call:

  result = MAPILogon ((ULONG) hWnd, NULL, NULL,
             MAPI_LOGON_UI | MAPI_NEW_SESSION, 0, &lhSession))

successfully loads mozMapi32.dll but returns MAPI_E_FAILURE.

The error code is likely returned by InitMozillaReference():
http://lxr.mozilla.org/seamonkey/source/mailnews/mapi/mapiDll/MapiDll.cpp#109

After re-installing SM 1.0.7, the SM MAPI works again.

This regression should IMO block 1.1
Comment 2 Christian Franke 2007-01-17 05:02:34 PST
Don't see differences between 1.1b and 1.0.7 in MAPI related registry entries and *mapi*.dll install locations. So this is probably not an installer issue, suggest to change Product/Component to Core/Mail:Simple MAPI.
Comment 3 Andrew Schultz 2007-01-17 06:17:57 PST
==> Core
(you'll want to re-request a new blocking flag. blocking-thunderbird2, I guess)
Comment 4 Christian Franke 2007-01-17 12:13:36 PST
At least the nsMapiRegistry.* modules are only used by SM.
(http://lxr.mozilla.org/seamonkey/source/mailnews/mapi/mapihook/src/)
So I don't know whether this affects TB also.
==> Request blocking 1.8.1.2 only (does this request blocking SM 1.1 ?)

As the bug affects all apps using MAPI, the summary should probably be more general (and include "[regression]") to avoid dups.
Comment 5 Christian Franke 2007-01-17 23:47:13 PST
This is IMO a dup of Bug 364675 (already confirmed).
Comment 6 Robert Kaiser 2007-01-18 04:34:47 PST
*** Bug 364675 has been marked as a duplicate of this bug. ***
Comment 7 Robert Kaiser 2007-01-18 04:44:36 PST
Christian: If you don't know if it affects Thunderbird, best is to test if it does. If mapiDll is the problem as you assume in comment #1 then it probably affects both SeaMonkey and Thunderbird, I guess.

It would probably be a good idea to check bonsai for changes in MAPI code between 1.0 and 1.1 and/or find the regression range so that we can find out the suspect change(s).

This would be nice to have fixed by SeaMonkey 1.1.1 but as long as no suspect changes are known, it will be hard to find someone who can fix it.

(Confirmed by dupe, the other one was duped to this one, as this one here is probably the right component and the older bug report)
Comment 8 Bruno 'Aqualon' Escherl 2007-01-18 04:59:55 PST
Looking at the changes in bonsai, only bug 353906 can be the reason for this regression.
Comment 9 Christian Franke 2007-01-18 05:33:58 PST
(In reply to comment #8)
> Looking at the changes in bonsai, only bug 353906 can be the reason for this
> regression.

Yes, probably.

Tracing MAPILogon() on assembly level, I found that ::CoCreateInstance() for MapiProxy.dll failed.

Steps to Reproduce:
1. Uninstall SM
2. Install SM 1.1b, do NOT open Mail window
3. Examine registry key
   HKCR\Interface\{6EDCD38E-8861-11D5-A3DD-00B0D0F3BAA7}
4. Open Mail, confirm to make SM the default mail app.
5. Repeat step 3.

Observed:
Key removed during step 4, so MapiProxy.dll no longer registered

Expected:
Key should not be removed.

Hotfix:
Go to installation dir and run:
  regsvr32 MapiProxy.dll

Now MAPI works again when SM is running. Autostart does still not work.
Comment 10 Worcester12345 2007-01-18 14:40:34 PST
(In reply to comment #4)
...
> ==> Request blocking 1.8.1.2 only (does this request blocking SM 1.1 ?)
> 
> As the bug affects all apps using MAPI, the summary should probably be more
> general (and include "[regression]") to avoid dups.


regression key word also

Comment 11 Christian Franke 2007-01-19 06:43:37 PST
Created attachment 252054 [details]
Registry file to fix missing startup on MAPI call issue

If MAPI works only when SM is already running, edit the install path in this file and apply the file with regedit.

It adds the entries which should have been added by RegisterServer().
http://lxr.mozilla.org/seamonkey/source/mailnews/mapi/mapihook/src/Registry.cpp#223

Apparently, this function is never called by nsWindowsShellService::setDefaultMail()
(Hmm... the RegisterServer() call is enclosed in #ifndef __MINGW32__ ;-)

Hope this helps.
Comment 12 Christian Franke 2007-01-20 07:08:01 PST
Created attachment 252159 [details] [diff] [review]
Patch for nsMapiRegistryUtils.cpp

The regression was actually introduced by attachment 240565 [details] [diff] [review] from bug 353906:
nsMapiRegistryUtils::setDefaultMailClient() calls UnRegisterServer() instead of RegisterServer().

The problem was found by code review and therefore the patch is not tested, sorry.

(I take back my last comment about nsWindowsShellService::setDefaultMail(), it is not used by SM).

The bug should not affect TB.
I would request blocking next SM release, but there is no flag ;-)
Comment 13 Christian Franke 2007-01-20 07:12:31 PST
Comment on attachment 252159 [details] [diff] [review]
Patch for nsMapiRegistryUtils.cpp

r?mscott
Comment 14 Scott MacGregor 2007-01-20 08:44:47 PST
Comment on attachment 252159 [details] [diff] [review]
Patch for nsMapiRegistryUtils.cpp

good catch!
Comment 15 Frank Wein [:mcsmurf] 2007-01-21 00:19:27 PST
Christian: Do you need help landing this patch?
Comment 16 Christian Franke 2007-01-21 04:38:17 PST
(In reply to comment #15)
> Christian: Do you need help landing this patch?

Yes, I don't have checkin rights and I'm not sure which approval*? request is appropriate.
Comment 17 Tobias Fischer 2007-01-21 05:03:24 PST
Trunk is also affected from this Bug. Would be good to get the Checkin for
Christians Patch into Trunk frist, than ask for Approval for 1.8-Branch too. 

If this goes into Trunk first, I will take a look on the first Builds including
the patch. 
Comment 18 Christian Franke 2007-01-21 05:38:13 PST
(In reply to comment #17)
> Trunk is also affected from this Bug.

HEAD revision (1.32) is IMO OK, it calls RegisterServer():
http://lxr.mozilla.org/seamonkey/source/mailnews/mapi/mapihook/src/nsMapiRegistryUtils.cpp#1033

This module is no longer used by TB on both Trunk and 1.8 Branch.
This bug only affects SM on 1.8 Branch.
Comment 19 Andrew Schultz 2007-01-23 17:35:21 PST
Comment on attachment 252159 [details] [diff] [review]
Patch for nsMapiRegistryUtils.cpp

hmm, why does this need TB approval?
http://mxr.mozilla.org/mozilla1.8/source/mailnews/mapi/mapihook/src/Makefile.in#100
Comment 20 Scott MacGregor 2007-01-25 10:42:31 PST
Comment on attachment 252159 [details] [diff] [review]
Patch for nsMapiRegistryUtils.cpp

approving for the branch (I can't se the 1.8.1.2 flag, but i can set the thunderbird flag) since this is a mailnews only change.
Comment 21 Scott MacGregor 2007-01-25 10:43:20 PST
clearing the blocking flag, I approved the patch for the branch.
Comment 22 neil@parkwaycc.co.uk 2007-01-25 15:44:03 PST
Fix checked in.
Comment 23 Tobias Fischer 2007-01-26 08:10:33 PST
(In reply to comment #18)
> (In reply to comment #17)
> > Trunk is also affected from this Bug.
[...]
> This module is no longer used by TB on both Trunk and 1.8 Branch.
> This bug only affects SM on 1.8 Branch.
> 
Hmm, are you sure? I have tested SM 1.1 Build 20070126 and verified, that the Bug was fixed for the Branch, but neither sendto:, nor mailto: Protocols were working in SeaMonkey Trunk-Builds. 
I think that SeaMonkey-trunk was affected too, and need the patch. 
Comment 24 neil@parkwaycc.co.uk 2007-01-26 08:20:16 PST
Well, not that patch, because that error doesn't exist on the trunk.
Comment 25 Tobias Fischer 2007-01-26 08:29:21 PST
Well, I am not very personal to lxr and reading Code, but when I understand right, I have to file a new Bug for the Trunk?
Comment 26 neil@parkwaycc.co.uk 2007-01-26 08:31:37 PST
Assuming that nobody else has, then yes; this one seems to be branch-only.
Comment 27 Mirek 2007-01-26 14:37:05 PST
*** Bug 368054 has been marked as a duplicate of this bug. ***
Comment 28 Igor Velkov 2007-01-31 15:50:44 PST
Created attachment 253550 [details]
error trying send file from microsoft visio

Now i made deinstall of seamonkey; set outlook as defaukt mail program, and installed Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070131 SeaMonkey/1.5a.
Then I made it as default system mailer, but as early bug active:
1. when I select file in windows explorer, then press send to->mail recipient menu, does nothing;
2. when I choose "file->send by mail as attachement in microsoft visio 2003, system shows window (look to attachement)

I propose this bug have to be reopened.
Comment 29 Igor Velkov 2007-01-31 15:52:18 PST
Created attachment 253551 [details]
second error window trying send file from microsoft visio
Comment 30 Igor Velkov 2007-01-31 15:53:18 PST
Created attachment 253553 [details]
error trying send file from OpenOffice 2.1

sending from OpenOffice 2.1 all the same.
Comment 31 Tobias Fischer 2007-02-01 01:22:34 PST
(In reply to comment #26)
> Assuming that nobody else has, then yes; this one seems to be branch-only.
> 
I have filed Bug 368952 for Mapi-Linkage issue in SM-Trunk-Builds. 
Comment 32 Chris Thomas (CTho) [formerly cst@andrew.cmu.edu cst@yecc.com] 2007-02-06 17:52:49 PST
*** Bug 369567 has been marked as a duplicate of this bug. ***
Comment 33 brian lehrhoff 2007-03-01 16:30:39 PST
having loaded 1.1.1 and blindly tried the mapi ... IT WORKS!

thanks to all who persevered with such a seemingly simple bug.  and now, after all these years of using moz, i feel like one of the family :)
Comment 34 Scott MacGregor 2007-03-03 12:59:22 PST
adding a keyword.
Comment 35 Mirek 2007-03-03 14:07:09 PST
Reopening (but I cannot find the proper ticker in the new Bugzilla interface to really reopen.... :-(  ).

Reason:
Well, the bug does not seem to be fully fixed. When Mozilla (SM1.1.1) is running, no problem, fix is OK. However, without Mozilla running, it still does not work. E.g., the context file menu "Send to / Mail recipient" does not start Mozilla and no action is actually performed. Invoking in the Word (File/SendTo/MailRecipient) results in the old infamous cryptic message...

Previously, before this bug, Mozilla was started at these instances an compose message window has appeared. The workaround still has to be applied manually.
Comment 36 brian lehrhoff 2007-03-03 14:17:51 PST
That's an easy fix.  Moz should always be running.

I guess we reopen this.  At least it's not as critical as it was.
Comment 37 Frank Wein [:mcsmurf] 2007-03-03 14:25:05 PST
Do me a favor: File a new bug and mention the bug # here? It would be rather confusing if the remaining issue will be mixed with the old issue in one bug...
Comment 38 Mirek 2007-03-04 07:29:42 PST
Well, I do not think it wise to file a new bug, as this bug was about all issues caused by this MAPI regression. For example, Bug 364675 (see above), is marked as dupe of this one - and deals only with the issue in my Comment #35 . Filing a new bug would require to re-assess all old duplicates and would make the bug triaging more confusing.
Comment 39 Robert Kaiser 2007-06-08 15:39:16 PDT
Is this still happening with 1.1.2?
Comment 40 Bruno 'Aqualon' Escherl 2007-06-10 06:31:10 PDT
WFM with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070509 SeaMonkey/1.1.2, doesn't matter if SeaMonkey is already running or isn't running.
Comment 41 Robert Kaiser 2007-06-10 06:47:09 PDT
OK, let's re-mark it as FIXED then.

If such an issue comes up again for anyone else, please file a NEW bug on that.
Comment 42 Mirek 2007-06-10 21:14:19 PDT
(In reply to comment #39)
> Is this still happening with 1.1.2?
> 

Yes, same problem, no change. Seamonkey has to be running in order to use context-based "send-to". Please note that Seamonkey has to be completely off-loaded from the memory, so you have to have Quick-launch feature disabled.
Comment 43 Tobias Fischer 2008-03-27 17:56:08 PDT
*** Bug 368051 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.