JavaScript error upon loading Netscape internal mail web site

RESOLVED WORKSFORME

Status

()

Core
DOM: Core & HTML
RESOLVED WORKSFORME
16 years ago
15 years ago

People

(Reporter: David Pautler, Assigned: jst)

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
When using Moz 1.0rc for WinNT and going to this site, and then logging in,

http://nsmail-1.netscape.com/

I consistently get a popup warning of a JavaScript error.  Perhaps the Netscape
site isn't standards-compliant.

"JavaScript error: Line 0, uncaught exception: Not enough arguments"

Comment 1

16 years ago
Not caused by a bug in JS Engine. Reassigning to Browser-General
until we can get more information. Myself, I do not get any errors
when I login at http://nsmail-1.netscape.com/. Using Mozilla
trunk binary 20020508xx on WinNT. 


David:

1. Is it a popup that you get, or just a message in the JavaScript Console?
2. If it's a popup, what does the popup say in its titlebar?
3. Did the site ever work in previous Mozilla builds?
4. Have you changed anything in Edit > Preferences that might explain this?
5. Does the site work if you use a different Profile? To do this:

         [(path to mozilla)] ./mozilla -profilemanager
Assignee: rogerl → Matti
Component: JavaScript Engine → Browser-General
QA Contact: pschwartau → imajes-qa
(Reporter)

Comment 2

16 years ago
Phil asked:
>
> 1. Is it a popup that you get, or just a message in the JavaScript Console?

popup

> 2. If it's a popup, what does the popup say in its titlebar?

Alert

Here's more of the popup contents:

Not enough arguments [nsIDOMWindowInternal.clearTimeout]
nsresult: "0x80570001 [NS_ERROR_XPC_NOT_ENOUGH_ARGS]"
location: "JS Frame :: https://judge.mcom.com/main.js :: start :: line 1376"
data: no

> 3. Did the site ever work in previous Mozilla builds?

I hadn't tried the site with any browser before.

> 4. Have you changed anything in Edit > Preferences that might explain this?

Not that I know of.  I insist on screening all cookies and images.  Under
Advanced|Scripts, I give scripts all permissions except "open unrequested windows".

> 5. Does the site work if you use a different Profile? To do this:
>
>         [(path to mozilla)] ./mozilla -profilemanager

This cmd call launched a navigator without prompting me to select a
user/profile, so I don't think I have any other profiles.

     -dp-

Comment 3

16 years ago
David: thanks! We now see what the issue is:

   Not enough arguments [nsIDOMWindowInternal.clearTimeout]
   nsresult: "0x80570001 [NS_ERROR_XPC_NOT_ENOUGH_ARGS]"
   location: "JS Frame :: https://judge.mcom.com/main.js :: start :: line 1376"
   data: no
 

This is a familiar problem, e.g. see bug 58101 and its duplicates:
"Can't use MessengerExpress with NS6" on http://nsmail-2.mcom.co

The line that's erroring is the same as at 
http://bugzilla.mozilla.org/show_bug.cgi?id=58101#c13:


function start() {
  if (self.cfgFrame == null || self.mboxFrame == null || self.msgFrame == null) 
{
    window.setTimeout('start()', 100)
  } else if (state == 'init') {
    setFrames()
    if (NN >= 3)
      clearTimeout() <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< LINE 1376
    state = 'load'
    refreshing = false
    refreshCfg()
  }
}



Reassigning to DOM Level 0. Calling clearTimeout() without providing
an argument used to cause an exception in Mozilla. But in bug 132904,
"Clearing timeout without setting one & without passing timeoutID
throws exception", we changed our behavior so that no exception would be
thrown on this.


I'm confused: then why David is getting an alert with the 
NS_ERROR_XPC_NOT_ENOUGH_ARGS error in it? Who is putting up this
alert? Is it an error handler on nsmail-1, perhaps? I can't find it.

And why don't I get this alertbox? Using the Mozilla JavaScript Debugger,
I see I do fall into the above code, and clearTimeout() gets called
as above. Yet no error is generated, no exception is thrown, and I get
no alertbox!!!

Using Mozilla trunk binary 2002051408 on WinNT.
Assignee: Matti → jst
Component: Browser-General → DOM Level 0
QA Contact: imajes-qa → desale

Comment 4

16 years ago
OK, jst found that on nsmail-1, window.onerror has been set to:

function handleError(msg, url, line)
{ 
  alert(i18n['js error'] + "\n\n" + url + "," + 
        i18n.line + " " + line + "\n\n" + msg);

  return true;
}


I did some debugging and found that:

  i18n['js error'] = 'JavaScript Error' 
  i18n.line        = 'Line'


So this explains WHERE the popup is coming from, anyway.
But there is still the question of why any error is occurring
in the first place, in light of the fix for bug 132904.

Comment 5

16 years ago
Created attachment 83827 [details]
Reduced HTML testcase

Comment 6

16 years ago
David, a few more questions:

1. What Mozilla build ID are you using? If it's not in the titlebar,
   do Help > About Mozilla to get the information -

2. When you get the popup at the nsmail-1 site, is the same error
   also being printed in Tasks or Tools > etc. > JavaScript Console? 
   (be sure to clear it of any previous errors first)
 
3. Do you get the same error in a popup, and in the JavaScript Console,
   when you try the reduced testcase? 

Thanks -

Comment 7

15 years ago
reporter (David): can you reproduce this problem with a recent build of mozilla
(with the testcase?)? if so, please comment again with details. if not, please
resolve this report as WORKSFORME. thank you.
(Reporter)

Comment 8

15 years ago
I tried loading judge.mcom.com using Moz 1.2.1 and has no problems.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.