[CLOSED] [#632] JavaScript runtime error: Expected ']' in ext.axd

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] [#632] JavaScript runtime error: Expected ']' in ext.axd

    I get this exception repeating constantly...
     Exception was thrown at line 383, column 13 in http://localhost:51724/extnet/extnet-all-debug-js/ext.axd?v=37796 0x800a03ef - JavaScript runtime error: Expected ']'
    After eliminating all my panels and toolbars I still get this message. Here's my web.config...
    Last edited by Daniil; Jan 07, 2015 at 5:21 PM. Reason: [CLOSED] [#632]
  2. #2
    Hi @PeterParsonage,

    I don't see any exception running the test case that you provided.

    I get this exception repeating constantly...
    Please clarify where do you see that? Does it break the page or it continues working?

    What browser are you testing with?

    It looks there is a related thread with the same problem.
    http://forums.ext.net/showthread.php?50062
  3. #3
    As posted in the other thread the problem is in the getEl method

    The use of el as a variable name looks suspicious.
    el.toString() = "[object HTMLBodyElement]"
    eval("(" + el + ")") = exception


    
    Ext.net.getEl = function (el, skipDeep) {
        if (Ext.isEmpty(el, false)) {
            return null;
        }
        
        if (el.isComposite) {
            return el;
        }
        
        if (el.getEl) {
            return el.getEl();
        }
    
        if (el.el) {
            return el.el;
        }
    
        var cmp = Ext.getCmp(el),
            tEl;
        
        if (!Ext.isEmpty(cmp)) {
            return cmp.getEl();
        }
    
        if (Ext.validIdRe.test(el)) {
            tEl = Ext.get(el);
        }    
        
        if (Ext.isEmpty(tEl) && skipDeep !== true) {
            try {
                return Ext.net.getEl(eval("(" + el + ")"), true);
    //         ^ error position is here
    
            } catch (e) {}
        }
        
        return tEl;
    };
    Exception details (e)
    SyntaxError: Expected ']'
       at Ext.net.getEl (http://localhost:51724/extnet/extnet-all-debug-js/ext.axd?v=37796:383:13)
       at checkTarget (http://localhost:51724/extnet/extnet-all-debug-js/ext.axd?v=37796:22863:9)
       at call (http://localhost:51724/extjs/ext-all-debug-js/ext.axd?v=37796:22384:13)
       at Anonymous function (http://localhost:51724/extjs/ext-all-debug-js/ext.axd?v=37796:4710:17)
       at Anonymous function (http://localhost:51724/extjs/ext-all-debug-js/ext.axd?v=37796:4814:21)
  4. #4
    I forgot to say that the error shows in VS2013 Output window.

    The message shows repeatedly as long as the page is open. You can minimise the window and the error just keeps on coming. I have no idea why the function is being called.

    The page appears to operate correctly (when it has panels etc.) but is slow.
  5. #5
    I have seen that too... but was too busy with debugging issues. I will try to reproduce on a simple example.


    Exception was thrown at line 383, column 13 in http://localhost:50725/extnet/extnet...xt.axd?v=42411
    0x800a03ef - JavaScript runtime error: Expected ']'
    Exception was thrown at line 383, column 13 in http://localhost:50725/extnet/extnet...xt.axd?v=42411
    0x800a03ef - JavaScript runtime error: Expected ']'
    Exception was thrown at line 383, column 13 in http://localhost:50725/extnet/extnet...xt.axd?v=42411
    0x800a03ef - JavaScript runtime error: Expected ']'
    Exception was thrown at line 383, column 13 in http://localhost:50725/extnet/extnet...xt.axd?v=42411
    0x800a03ef - JavaScript runtime error: Expected ']'
    Exception was thrown at line 383, column 13 in http://localhost:50725/extnet/extnet...xt.axd?v=42411
    0x800a03ef - JavaScript runtime error: Expected ']'
    Exception was thrown at line 383, column 13 in http://localhost:50725/extnet/extnet...xt.axd?v=42411
    0x800a03ef - JavaScript runtime error: Expected ']'

    ... a lot of these !
  6. #6
    Hi,

    Actually I am getting these errors even on empty project.

    <%@ Page Language="C#" %>
     
    <!DOCTYPE html>
     
    <html>
    <head runat="server">
        <title>Ext.NET v3 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
        </form>
    </body>
    </html>

    I am running in under Windows 8.1 64bit Pro.
    Visual Studio 2013 12.0.31101.00 Update 4

    and currently downgraded IE 11.0.9600.16438
    I saw the same errors in the latest version of Internet Explorer 11 Version: 11.0.9600.17498 Update Version: 11.0.15 (KB3008923)
    Last edited by matt; Jan 06, 2015 at 5:01 PM.
  7. #7

    Versions

    Danill, I think it might be again our beloved IE 11 with Windows 8.1 pro

    Peter, what IE do you use? and windows version?
  8. #8
    Windows 8.1 and IE 11.0.15
  9. #9
    Visual Studio 2013:

    Click image for larger version. 

Name:	javascript-runtime-exception.png 
Views:	8 
Size:	25.5 KB 
ID:	18391

    Internet Explorer 11 with option "Break on All Exceptions":

    Click image for larger version. 

Name:	javascript-runtime-exception-ie.png 
Views:	6 
Size:	65.7 KB 
ID:	18401
  10. #10
    Please note that exception is inside try/catch block
    There is no real propogation of the exception. Exception is shown under VS debug only for your attention only. If you run the page without debugger then you will not have such warning
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] JavaScript Error SCRIPT1009 Expected '}'
    By ashleysbuss in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 05, 2013, 3:19 PM
  2. Replies: 2
    Last Post: May 09, 2013, 3:41 PM
  3. Microsoft JScript runtime error: Object expected
    By shrenuj_dev in forum 1.x Help
    Replies: 0
    Last Post: May 11, 2011, 5:02 AM
  4. Replies: 1
    Last Post: Dec 30, 2010, 5:44 AM
  5. [CLOSED] Desktop - Microsoft JScript runtime error: Object expected
    By Zarzand in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 18, 2010, 8:10 PM

Posting Permissions