"typeerror: window.arguments is un...

Help
2011-05-12
2013-06-12
  • David de Leeuw
    David de Leeuw
    2011-05-12

    Hi Seb
    I am testing to use SEB on Windows 2008 R2 Terminal Server, Seb version 1.5.1, on Moodle 1.9.
    When I open a quiz  via Seb I get a "JavaScript Error: typeerror: windows.argument is undefined".
    If I try the same quiz directly via a browser it works without errors.
    Thanks for your help
    David de Leeuw
    Ben Gurion University of the Negev
    Beer Sheva, Israel

     
  • Dirk Bauer
    Dirk Bauer
    2011-05-12

    Hello Ben, maybe the reason is the obsolete version of Moodle 1.9. Please see

    http://www.safeexambrowser.org/download_releases_de.html

    If you have Moodle 1.9, the Moodle quiz mode is not suitable to SEB, so you have to install the additional package moodle_extension_1.0.1 . From Moodle 1.9.6 on, this Moodle extension for SEB is integrated in Moodle and the Moodle extension download is not required anymore.

    If that doesn't work:

    - have you used SEB in an ealier version, too?

    - please send me your Seb.ini, MsgHook.ini and if possible the logfile ../SEB Windows 1.5.1/SebWindowsService/SebWindowsService.logfile.txt And maybe send the URL to your Moodle exam, too. Which should anyway be contained in the Seb.ini :-)

    Regards, Dirk

     
  • David de Leeuw
    David de Leeuw
    2011-05-15

    Hi Dirk

    /* Sitenote: My name is David, I work at "Ben Gurion University" */

    I upgraded to 1.9.12 but that did not make any difference. (We are just starting to work on the upgrade to moodle 2.0)
    I get the same error if I link to Google and from there to other websites. I will send you the logs to your account.
    Thanks
    David

     
  • Dirk Bauer
    Dirk Bauer
    2011-05-16

    Hi David (sorry, of course Ben Gurion is known to me,
    but I misread since I have lots of SourceForge requests
    and am making new releases, so it is difficult to concentrate
    currently…

    Someone had a similar problem recently, producing the same
    JavaScript Error: typeerror: windows.argument is undefined.

    It seems that in this case a popup window is started, as you said too.
    Currently, SEB does not support such windows (no multiple windows
    or tabs in a quiz). It is planned for our new project which has just started
    in May 2011 and will last till the end of December 2011.

    Maybe it is possible to configure Moodle to not launch popup windows?

    The other one who had this problem worked on Win XP,
    but a re-installation of SEB seemed to solve the problem.

    Anyway: you wrote that an earlier version of SEB worked on PCs.
    I expect also SEB 1.5.1 working on PCs, did you try it?
    If not, which version worked (SEB 1.4.1 with XULRunner
    or SEB till 1.3.4 with Portable Firefox as browser component)?

    Futhermore, I could not get into your Moodle quiz.
    Starting SEB with

    URL_EXAM=http://fohs.bgu.ac.il/sites/moodle/mod/quiz/view.php?id=2912

    , I try to login using dirkba, and the password I got from you,
    but nothing happens. If I try to log into the Moodle quiz
    with a normal Firefox without SEB,
    I cat the message: "Waiting for…",
    but the quiz is not loaded.

    Regards,
    Dirk

     

  • Anonymous
    2011-05-16

    Hi Dirk

    Here is the msghook.ini

    DISABLE_CTRL_ESC=0
    DISABLE_ALT_TAB=0
    DISABLE_ALT_ESC=0
    DISABLE_ALT_F4=1
    DISABLE_START_MENU=1
    DISABLE_RIGHT_MOUSE=1
    DISABLE_F1=1
    DISABLE_F2=1
    DISABLE_F3=1
    DISABLE_F4=1
    DISABLE_F5=1
    DISABLE_F6=1
    DISABLE_F7=1
    DISABLE_F8=1
    DISABLE_F9=1
    DISABLE_F10=1
    DISABLE_F11=1
    DISABLE_F12=1
    DISABLE_ESCAPE=1
    B1=114
    KILL_CALLER_HOTKEY=Safe Exam Browser   1.5.1

    Here is SEB.INI

    HOOK_DLL=MsgHook.dll
    MESSAGE_HOOK=1
    EDIT_REGISTRY=1
    FORCE_WINDOWS_SERVICE=1
    REG_HIDE_FAST_USER_SWITCHING=1
    REG_DISABLE_LOCK_WORKSTATION=1
    REG_DISABLE_TASKMGR=1
    REG_DISABLE_CHANGE_PASSWORD=1
    REG_NO_CLOSE=1
    REG_NO_LOGOFF=1
    REG_ENABLE_SHADE=0
    REG_ENABLE_EASE_OF_ACCESS=0
    WIN9X_KILL_EXPLORER=1
    WIN9X_SCREENSAVERRUNNING=0
    NEW_DESKTOP=1
    SHOW_SEB_APP_CHOOSER=1
    STRONG_KILL_PROCESSES_BEFORE=
    STRONG_KILL_PROCESSES_AFTER=
    PERMITTED_APPS=Calculator,calc.exe;Notepad,notepad.exe;
    SEB_BROWSER=Seb,../xulrunner/xulrunner.exe ../xul_seb/application.ini
    AUTOSTART_PROCESS=Seb
    SHUTDOWN_AFTER_AUTOSTART_PROCESS_TERMINATES=0
    PROC_MONITORING=0
    LOG_FILE=1
    URL_EXAM=http://fohs.bgu.ac.il/sites

    I tried this with or without enrollment key: no difference.
    The message only pops up when starting the "questionnaire". I have
    no idea why it should pop up something.
    I tested 1.5.1 also on my PC (Windows 7)and it gives me the same error message. So the terminal server is not the issue.
    So this seems to be a problem of the "questionnaire".

    Concerning the account I gave you, I just logged in with it. It is supposed to be open from the world.

    Thanks for your help

    David

     
  • David de Leeuw
    David de Leeuw
    2011-05-17

    Hi Dirk and Dan

    Here is an update on progress.

    1. I did not have a "Safe Exam Browser" option on the quiz. I replaced the (1.9.12) moodle routines with the moodle_safe_quiz.101.zip package, ran the mysql update for the quiz table and the option appeared. Now on PC all works well (no more "argument error" !), but on the Windows 2008 R2 terminal server each user starting SEB gets stuck with

    "Component returned failure code 0x80070057 (MS_ERROR_ILLEGAL_VALUE) …  chrome://xul_seb/content/js/seb.js:: anonymous :: line 136" data : no "

    Thanks for all your help,

    David

     
  • I'm getting the same error as daviddeleeuw .  To give a bit more detail, I'd installed SEB 1.5.1 on 6 computers to use with moodle 2.0, and initially I was getting this javascript error after copying/pasting the SEB.ini and MsgHook.ini files that I'd customized.  When this caused the error david describes, I started with fresh/default ini files and then hand type the changes to them (url, etc.).  This seemed to work, but now one of my colleagues changed the URL on one of the computer and he's getting the same javascript error again (and can't seem to get it working again). 

    Any help in resolving this would be greatly appreciated.  Thanks!

    Eric

     
  • Hi David

    Now I finally found out about how it exactly works in Moodle with the Safe Exam Browser option. You have to be logged in as a Moodle administrator and go to the "Experimental" section in the menu "Site Administration" -> "Miscellaneous". There "Enable Safe Exam Browser integration" has to be activated, the default is "No".

    Looks like what you did was a work around, at least you also got the choice "Require Safe Exam Browser" in the "Browser security" field on the quiz settings form.

    The other error we're investigating, hope we find it out soon.

     
  • Btw. Sorry for the insufficient Moodle information which was caused by missing Moodle knowledge of us SEB developers. We will also add this to the documentation at safeexambrowser.org.

    Daniel

     
  • Dirk Bauer
    Dirk Bauer
    2011-05-17

    Hi Eric,

    maybe there was a problem due to the editor you used to change the ini files. What program did you use? We use the Notepad.exe and never had problems regarding, e.g., end-of-line characters then. By the way, what is your operating system? And could you please send me your Seb.ini, best would be as attachment of the file to an email and not pasting the Seb.ini contents into this thread (for this could repeat potential editor problems)?

    Dirk

     
  • Dirk Bauer
    Dirk Bauer
    2011-05-18

    Hi David,

    we talked about these issue yesterday,
    and the notion arose that maybe it is critical running SEB on Windows terminal server, since applications are running on that server only, aren't they?

    Are the actual SEB client and the SEB Windows Service running on a Server machine only? Do several users connect to just one SEB ?
    Because SEB requires the SEB Windows Service and the SEB client running on the same machine, namely the computer the student etc.
    is sitting at.

    The SEB Windows Service currently only supports one socket connection (between SEB client and service running on the student's machine). Do you run the SEB client on the student's machines and the SEB Windows Service on the server only? Just one instance?

    Do you have the logfile of the SEB Windows Service, usually located in the Program Directory under e.g.

    C:\Program Files (x86)\ETH Zurich\SEB Windows 1.5.1\SebWindowsService\SebWindowsService.logfile.txt

    [We are planning to use SEB also in a virtual desktop environment, running a SEB client and SEB Windows Service on a remote server, and connecting student's client machines running additional SEB instances. The student's client SEB only connects to the server in kiosk mode (e.g. using Vmware Client as third-party application).
    The server's SEB then connects to the Learning Management System and third-party applications.
    But this is planned for the SEB 2012 project starting this month and lasting till Dec 2012, so we do not have this solution yet.]

    Maybe there is also a problem reading the Seb.ini file.
    You could try to overwrite the Javascript file

    C:\Program Files (x86)\ETH Zurich\SEB Windows 1.5.1\Seb\xul_seb\chrome\content\js\seb.js

    By the seb.js file attached to this e-mail, and removing the // comment signs in the region of line 136 so the "throw …" commands are executed and print out some values in a pop-up windows (just for debugging).

    Maybe your SEB lands in the wrong if-branch and connects to www.20min.ch ?
    It should extract the exam URL using the method

    getUrlExamFropmFileSebIni()

    Maybe the "sebConfig" or "seb.configuration.file"
    Is not set to the right Seb.ini file?

    I could investigate myself but have no Windows Terminal Server in my office, just Windows XP and Windows 7.

    Kind Regards,
    Dirk

     
  • Dirk Bauer
    Dirk Bauer
    2011-05-18

    Since sending the seb.js file by e-mail did not work, here is the code of seb.js
    around line 136, where I added some "throw" commands for debugging:

    getUrl : function()
    {
    var url = "";
    //throw("window.arguments    = " + window.arguments);
    //throw("window.arguments = " + window.arguments);

    if (window.arguments != null)
    {
    var cmdLine = window.arguments.QueryInterface(Components.interfaces.nsICommandLine);
    //throw("cmdLine = " + cmdLine);

    if (cmdLine == null || cmdLine == "")
    {
    url = "www.20min.ch";
    return url;
    }

    url = cmdLine.handleFlagWithParam("url", false);
    //throw("url = " + url);
    }

    if (url == null || url == "")
    {
    url = this.getUrlExamFromWindowsRegistry();
    }

    if (url == null || url == "")
    {
    url = this.getUrlExamFromFileSebIni();
    throw("url = " + url);
    }

    if (url == null || url == "")
    {
    url = this.getUrlExamFromPreferences();
    }

    return url;
    },

     
  • Dirk Bauer
    Dirk Bauer
    2011-05-19

    Hi David,

    sorry for deleting your last posting from this thread, because the logfile was quite long… :-)
    It basically says that the SEB Windows Service is running, but then the error occurs on the SEB client side in the XULRunner part.

    I have an idea: Try to commment out the line where the error occurs, namely url = cmdLine.handleFlagWithParam("url", false); currently at line 150. Since the "var url" is still an empty string then (""), the JavaScript program shoud switch to the subsequent if statements and finally call the getUrlExamFromFileSebIni() function:

    url = this.getUrlExamFromFileSebIni();

    Usually, the program flow is this way.
    Maybe I have to comment out the error-producing code generally from the seb.js file,
    but I have to try out this on my machine and you on yours, too. So the code should look like

    getUrl : function()
    {
    var url = "";
    //throw("window.arguments    = " + window.arguments);
    //throw("window.arguments = " + window.arguments);

    if (window.arguments != null)
    {
    var cmdLine = window.arguments.QueryInterface(Components.interfaces.nsICommandLine);
    //throw("cmdLine = " + cmdLine);

    if (cmdLine == null || cmdLine == "")
    {
    return url;
    }

    // Please comment out the following line!
    //url = cmdLine.handleFlagWithParam("url", false);
    //throw("url = " + url);
    }

    if (url == null || url == "")
    {
    url = this.getUrlExamFromWindowsRegistry();
    }

    if (url == null || url == "")
    {
    url = this.getUrlExamFromFileSebIni();
    throw("url = " + url);
    }

    if (url == null || url == "")
    {
    url = this.getUrlExamFromPreferences();
    }

    return url;
    },

     
  • David de Leeuw
    David de Leeuw
    2011-05-19

    Hi Dirk

    I first commented out line 150, got a pop up with the correct http and then a white screen and got stuck.
    Then I replaced geturl with your function, got an empty blue screen..
    I think you will need a testing system on terminal server (windows 2008 r2) to figure out what is going on.
    Thanks
    David

     
  • Dirk Bauer
    Dirk Bauer
    2011-05-19

    Hello,

    I had problems on my own system, too, when trying out the above code.
    It seems that the "throw" command suspends or terminates the browser component,
    so we have to comment all throw commands for a working system.

    Please forget the code above and try the following,
    which works on my machine
    (acturally, my machine does NOT reacht the third if branch
    but only the first one, so I added the call of

    getUrlExamFromFileSebIni()

    to the first if-branch. So please try the following code:

    getUrl : function()
    {
    var url = "";
    //throw("window.arguments    = " + window.arguments);
    //throw("window.arguments = " + window.arguments);

    if (window.arguments != null)
    {
    var cmdLine = window.arguments.QueryInterface(Components.interfaces.nsICommandLine);
    //throw("cmdLine = " + cmdLine);

    if (cmdLine == null || cmdLine == "")
    {
    return url;
    }

    url = this.getUrlExamFromFileSebIni();
    //throw("1st branch, getUrlExamFromFileSebIni(): url = " + url);

    //url = cmdLine.handleFlagWithParam("url", false);
    //throw("1st branch, cmdLine.handleFlagWithParam(): url = " + url);

    }

    if (url == null || url == "")
    {
    url = this.getUrlExamFromWindowsRegistry();
    }

    if (url == null || url == "")
    {
    url = this.getUrlExamFromFileSebIni();
    throw("2nd branch: url = " + url);
    }

    if (url == null || url == "")
    {
    url = this.getUrlExamFromPreferences();
    }

    return url;
    },

     
  • Dirk, I have the Seb.ini and MsgHook.ini files you've requested, but can't see where I should attach them.  Can you provide an email or direct me on how to do this in sourceforge?  Thanks!

    Eric

     
  • arty99
    arty99
    2012-09-14

    I've been reading through the forum posts trying to find a solution for this still. Did anyone ever find out a way to get rid of the application type error alertbox?

    I pasted the code above into seb.js but it failed.

    Any insight into this would be a great help.

    Thanks in advance

     
  • Dirk Bauer
    Dirk Bauer
    2012-09-17

    Hi,

    which SEB version (number) do you use, and on which Windows version?
    I could help the last guy by changing his configuration files (SebStarter.ini and MsgHook.ini) last year.
    Maybe it would be best if you e-mailed me these two .ini files, and maybe also the log files
    SebStarter.log and MsgHook.log, which should lie in the same directory.

    For Windows 7, this is usually

    C:\ProgramData\ETH Zuerich\SEB Windows 1.8.2\

    For Windows XP, it is usually

    C:\Documents and Settings\All Users\Application Data\
    ETH Zuerich\SEB Windows 1.8.2\

    I will send you a private message containing my email address.

    Regards,
    Dirk