Closed Bug 361702 Opened 18 years ago Closed 18 years ago

[sun&linux&mac] Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIIOService2.manageOfflineStatus]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame ::

Categories

(Thunderbird :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sugar.waffle, Assigned: mscott)

References

(Blocks 1 open bug)

Details

(Keywords: verified1.8.1.2)

Attachments

(1 file, 1 obsolete file)

Reproducible: Always

STR
1. Create new profile and pop account.
2. Start Thunderbird.

Error console message:
Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIIOService2.manageOfflineStatus]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///Users/sek/Desktop/Thunderbird.app/Contents/MacOS/components/offlineStartup.js :: anonymous :: line 88"  data: no]
Source File: file:///Users/sek/Desktop/Thunderbird.app/Contents/MacOS/components/offlineStartup.js
Line: 88

Mac OS X 10.3.9
version 2 beta 1 (20061123)
The same error message on Linux (Fedora 6 on a x86 PC), but not on Windows.

Thunderbird 2.0b1 (X11/20061217)
->NEW 
Probably should fix this before 2.0 final.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIIOService2.manageOfflineStatus]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: → [linux&mac] Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIIOService2.manageOfflineStatus]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame ::
All/All as I can reproduce on Linux with today's build (Tb2b1).
OS: Mac OS X 10.3 → All
Hardware: Macintosh → All
confirmed also on Fedora FC 6...
Confirmed.

Only occurs when pref->offline.autoDetect=true
This error seems to be occurring due to the fact that in the XPCOM code the Network Link Service can not be retrieved.

in file netwerk/base/src/nsIOService.cpp : ~ line 248

mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID)

does not return the service.

It should also be checked something along the lines of

mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv))
  NS_WARNING("Failed to load Network Link Service");

I'm not familiar with XPCOM so I'm not sure how to track down why the service is not being returned.
The do_GetService() is returning NS_ERROR_FACTORY_NOT_REGISTERED [0x80040154L].

I think the simple reason is there is no Unix code to implement this service. I can only see win32 code (nsNotifyAddrListener.cpp).
I wonder why Firefox isn't generating the same JS exception. It also calls the getter for manage offline status on the network service for all platforms...

http://lxr.mozilla.org/mozilla/source/browser/base/content/browser.js#4932
use a try/catch so we don't throw an exception on platforms that don't support the manage offline status logic yet.
Attachment #251580 - Flags: superreview?(bienvenu)
Attachment #251580 - Flags: superreview?(bienvenu) → superreview+
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1.2
Resolution: --- → FIXED
With this fix, I still get the same error, now at line 95.
(In reply to comment #10)
> With this fix, I still get the same error, now at line 95.
> 

i can confirm this and get now :
Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIIOService2.manageOfflineStatus]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///opt/thunderbird/components/offlineStartup.js :: anonymous :: line 95"  data: no]
Source File: file:///opt/thunderbird/components/offlineStartup.js
Line: 95

on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2pre) Gecko/20070116 Thunderbird/2.0b1 ID:2007011603
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I checked with Bonsai, and the current line 95 is the same as the old line 88.
Keywords: fixed1.8.1.2
This error in the console can still be found in Tb2b2 RC1 (2007011615). I saw it on es-ES on Ubuntu, and en-US on Mac.
On Solaris : TB(2b2 20070123)

Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIIOService2.manageOfflineStatus]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///tmp/22/thunderbird/components/offlineStartup.js :: anonymous :: line 95"  data: no]
Source File: file:///tmp/22/thunderbird/components/offlineStartup.js
Line: 95
changing summary because of comment#14
Summary: [linux&mac] Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIIOService2.manageOfflineStatus]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: → [sun&linux&mac] Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIIOService2.manageOfflineStatus]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame ::
According to:

http://lxr.mozilla.org/mozilla/source/netwerk/base/src/nsIOService.cpp#867

the setter for manageoffline service will throw an error when aManage is true and we currently aren't managing offline status. This is for platforms that don't support the TrackNetworkLinkStatusForOffline stuff.

On the trunk: Linux and Windows support nsINetworkLinkService

On the branch: it looks like only Windows supports nsINetworkLinkService.

Instead of sprinkling a bunch of try/catch clauses every time we try to set nsIIOService::ManageOfflineStatus, we could try to ifdef off the setoffline.autoDetect pref for the appropriate platforms on the appropriate branch. 

Status: REOPENED → ASSIGNED
Flags: blocking-thunderbird2+
Attached patch a better fixSplinter Review
back out the bogus try/catch from my previous attempt.

only turn on the offline detection code for windows. 

Although eventually I'd like to figure out how to turn it on for the flavors of linux that support the network link service on the trunk so those users can benefit from this feature too.
Attachment #251580 - Attachment is obsolete: true
Attachment #253812 - Flags: superreview?(bienvenu)
Attachment #253812 - Flags: superreview?(bienvenu) → superreview+
fixed on the branch and the trunk. Let me know if y'all still see this in tomorrow's builds. Thanks!
Status: ASSIGNED → RESOLVED
Closed: 18 years ago18 years ago
Keywords: fixed1.8.1.2
Resolution: --- → FIXED
WFM on
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a2pre) Gecko/20070203 Thunderbird/3.0a1 ID:2007020303
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2pre) Gecko/20070203 Thunderbird/2.0pre ID:2007020304
Error is gone at the latest build. So verified fixed on 1.8.1.2 with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2pre) Gecko/20070129 BonEcho/2.0.0.2pre ID:2007012904
Error present in Linux version 3.0a1pre (2007102403).

Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIIOService2.manageOfflineStatus]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///mnt/Work_Data/Thunderbird-3a1pre/thunderbird/components/offlineStartup.js :: anonymous :: line 95"  data: no]
Source File: file:///mnt/Work_Data/Thunderbird-3a1pre/thunderbird/components/offlineStartup.js
Line: 95
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: