[CLOSED] Exception in extnet-all-debug.js

  1. #1

    [CLOSED] Exception in extnet-all-debug.js

    I can't explain why it's happening, but I can tell you that once I turned on pause on exception I found my pages all exception in the same place with the latest built.


    (anonymous function) (ext-all-dev.js:25219)   Ext.net.ResourceMgr.init({
    Ext.dom.Element.select (ext-all-dev.js:31893)                this.registerPageResources();
    Ext.net.ResourceMgr.registerPageResources (ext.axd?v=6049:9741)                 Ext.select("link[type=text/css]").each(function (el) {
    Ext.net.ResourceMgr.init (ext.axd?v=6049:9672)                   elements = Ext.dom.Element.selectorFunction(selector, root);
    (anonymous function) (Profile.aspx?pid=84&did=151:556)
                        return single ? [ root.querySelector(path) ]
                            : Ext.Array.toArray(root.querySelectorAll(path));
    
    single: undefined
     path: "link[type=text/css]"
    root.querySelectorAll(path): <not available>
    Hope this is enough insight to help....

    I don't even know if it's a real exception because it never really shows up in Chrome's console as one and the catch in the same section never triggers.


    I'm suspicious it may be related to my integreation of google ads but I thought I should mention it still. When the ad finally changed to another, the problem disappeared.
    Last edited by Daniil; Oct 01, 2013 at 3:09 PM. Reason: [CLOSED]
  2. #2
    Hi @michaeld,

    Hard to say what might be wrong.

    For now we would like to clarify the following.

    Quote Originally Posted by michaeld View Post
    I turned on pause on exception
    Please clarify how and where did you do that?

    Quote Originally Posted by michaeld View Post
    I don't even know if it's a real exception because it never really shows up in Chrome's console as one and the catch in the same section never triggers.
    Hmm, where does it show up then? How did you catch it initially?

    Quote Originally Posted by michaeld View Post
    I'm suspicious it may be related to my integreation of google ads but I thought I should mention it still. When the ad finally changed to another, the problem disappeared.
    It would be nice to have a test case to reproduce it if possible.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hard to say what might be wrong.
    Agreed

    Quote Originally Posted by Daniil View Post
    Please clarify how and where did you do that?
    Chrome debugger, F12, Sources Tab. Click the "pause on exceptions" button on (looks like a pause button on an old cassette player) on the toolbar above where the stack trace appears. First button.

    Quote Originally Posted by Daniil View Post
    Hmm, where does it show up then? How did you catch it initially?
    Just turned this feature on to trap something else in my code and observed it trapped every time here.

    Quote Originally Posted by Daniil View Post
    It would be nice to have a test case to reproduce it if possible.
    You should be able to reproduce it on my my website if you go there. I'm able to trap it reliably when I follow the steps above. You should still have that address in your email. I'll be releasing beta this week so I won't have to be as protective of the domain here-after.

    I think the error is benign though as it doesn't seem to affect anything. I just thought it would be easy to add a conditional test if the result returned null or undefined to prevent it if that was appropriate after sharing the stack trace. I haven't spent any time on it. I just thought I would share in case it was something to worry about. Can you tell me what it might be doing in this section of code?
  4. #4
    Quote Originally Posted by michaeld View Post
    You should be able to reproduce it on my my website if you go there. I'm able to trap it reliably when I follow the steps above. You should still have that address in your email.
    Seems it was in my forums' PM box. Recently I cleaned it up because of it exceeded the size limit. Though I found the link in the browser's history.

    So, the page appears in Chrome. I go the the Sources tab. The "ext-all-dev.js" (sometimes something else) is opened on the left, the debugger stuff is opened on the right. Then I click the "||" (pause) button in the toolbar above that debugger stuff. Btw, I see the "Pause script execution (F8)" tooltip for it, not "pause on exceptions". So, I am not sure it is the same button that you are talking about. Could you provide a screenshot? So, I press it and it stops somewhere which doesn't look to be the exception you described.

    I found this on the Sencha forums. Maybe, it is related.
    http://www.sencha.com/forum/showthread.php?152140
  5. #5
    Quote Originally Posted by Daniil View Post
    So, the page appears in Chrome. I go the the Sources tab. The "ext-all-dev.js" (sometimes something else) is opened on the left, the debugger stuff is opened on the right. Then I click the "||" (pause) button in the toolbar above that debugger stuff. Btw, I see the "Pause script execution (F8)" tooltip for it, not "pause on exceptions". So, I am not sure it is the same button that you are talking about. Could you provide a screenshot? So, I press it and it stops somewhere which doesn't look to be the exception you described.
    Sorry, my bad, its the || pause button on the bottom toolbar with the purple hexagon (like a stop sign) around it.

    Quote Originally Posted by Daniil View Post
    I found this on the Sencha forums. Maybe, it is related.
    http://www.sencha.com/forum/showthread.php?152140
    Yeah, seems like the same issue and same suggested solution.
  6. #6
    I think I got it:
    http://stackoverflow.com/questions/5...-forward-slash

    Seems it breaks on Chrome only. At least, it is OK with FireFox. And I didn't test with IE.

    Anyway, please try this fix. If it helps remedy the issue, then I will commit it to SVN.

    Fix
    Ext.net.ResourceMgr.registerPageResources = function () {
        Ext.select("script").each(function (el) {
            var url = el.dom.getAttribute("src");
    
            if (!Ext.isEmpty(url) && !this.queue.contains(url)) {
                this.queue.buffer.push({
                    url: url,
                    loading: false
                });
            }
        }, this);
    
        Ext.select('link[type="text/css"]').each(function (el) {
            var url = el.dom.getAttribute("href");
    
            if (!Ext.isEmpty(url) && !this.queue.contains(url)) {
                this.queue.buffer.push({
                    url: url,
                    loading: false
                });
            }
        }, this);
    }
  7. #7
    Seems to address the problem. Was it anything to worry about?
  8. #8
    Committed to SVN.

    Yes, I think it is nice to get it addressed. There is a chance it could break something.

    Thanks for your thoroughness and the bug report!

Similar Threads

  1. [CLOSED] Error in Store.Sync.
    By mis@adphk.com in forum 2.x Legacy Premium Help
    Replies: 9
    Last Post: Dec 03, 2012, 10:33 AM
  2. [CLOSED] Runtime client error in /extnet/extnet-core-js/ext.axd?v=0
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 26, 2012, 7:13 AM
  3. updating to ExtNet 1.0 from 0.8.2
    By unaltro2 in forum 1.x Help
    Replies: 6
    Last Post: Jun 03, 2011, 5:14 PM
  4. Ext.net.Debug + Stores
    By peter.campbell in forum 1.x Help
    Replies: 2
    Last Post: Mar 29, 2011, 10:54 AM
  5. [CLOSED] [1.0] extnet-core-debug.js
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 11, 2010, 2:08 PM

Posting Permissions