Debugger issues with iframes

Hello all,

Not sure if this is the place to put stuff like this, so please excuse me if this belongs elsewhere. I’ve been using FF Developer Edition as my daily dev browser for a long time, but haven’t ever posted issues.

I’m currently hacking on some legacy apps that use a lot of iframes. We load a custom Softphone into a popular CRM. The telephony backend is all proprietary, so there’s a lot of chatter back and forth.

While debugging these tools, I’ve noticed Firefox has a hard time showing me the proper source code. Let’s say the site I’m on has source from 6 frames. I select the frame I’m interested in, and then proceed to select my file from the tree-view on the Debugger tab. Clicking on said file results in a blank file. Firefox displays a single line of code in a 6000 line javascript file. I.e. setInterval()

Typically, I’ve found I can fix this by clicking somewhere within the source-code and then refreshing my browser. (clicking makes sure my frame selection is honored)

I see this happening with multiple files on this same project. All are over 5k lines. No libraries or tooling, just vanilla JS.

I’ve also seen that firefox’s debugger cannot follow iframe communication. For example, stepping into the following always results in an error, where Chrome is fine to follow the chain of events.

function PostMessage(msgType, data) {
  var msg = JSON.stringify({ msgType: msgType, data: data });
  g_IframeComms.contentWindow.postMessage(msg, g_AgentConfig.domain);
}

Is this just the nature of the beast, using a beta debugger? If so, I’m glad to report issues.

Thanks!

This isn’t great. I am wondering if this regressed as we fixed other source loading issues – has this worked before? Could you check if Browser Console has any errors?

I’ve also seen that firefox’s debugger cannot follow iframe communication.

We are just building out cross-frame/worker debugging; so I will put this on our radar soon. I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1599926

I’m not positive any of the console errors have anything to do with this, but I am still experiencing the issue.

The JS file is approximately 5k lines long. It seems about half the time all 5k lines are there, but it’s completely blank. However, I’ve noted a few things.

  • previously set breakpoints remain at their position.
  • The JS code uses long-polling (10 sec SetInverval). Sometimes all 5k lines are present, but the very last line of the source code will have a single function call. StartWatch(), which is the function setInterval calls.

Apologize for the huge block of text, but this is all I’m seeing in the console. I’m not sure if anything might be related. (nothing looks like it to me)

Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). Source: ctrl.viewUpdated(). m=core line 1011 > eval:30:381
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674415 ConduitsChild.jsm:108
sendRemoveListener on closed conduit tridactyl.vim.betas@cmcaine.co.uk.962072674416 2 ConduitsChild.jsm:108
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). injectGlobalHook.js:30:11375
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674514 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674541 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674501 ConduitsChild.jsm:108
sendRemoveListener on closed conduit tridactyl.vim.betas@cmcaine.co.uk.962072674433 2 ConduitsChild.jsm:108
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“default-src”). panel.js:62:24
Promise resolved after context unloaded
content.js:29761
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). aura_prod.js line 226 > eval:4:289
SecurityError: Permission denied to access property "Sfdc" on cross-origin object iframeinterface.js:1
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674613 ConduitsChild.jsm:108
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“default-src”). panel.js:62:24
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674597 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674555 ConduitsChild.jsm:108
sendRemoveListener on closed conduit tridactyl.vim.betas@cmcaine.co.uk.962072674556 2 ConduitsChild.jsm:108
Promise resolved after context unloaded
content.js:29761
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). injectGlobalHook.js:30:11375
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674604 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674656 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674642 ConduitsChild.jsm:108
sendRemoveListener on closed conduit tridactyl.vim.betas@cmcaine.co.uk.962072674569 2 ConduitsChild.jsm:108
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“default-src”). panel.js:62:24
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). aura_prod.js line 226 > eval:4:289
SecurityError: Permission denied to access property "Sfdc" on cross-origin object iframeinterface.js:1
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674731 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674714 ConduitsChild.jsm:108
Error: Page has navigated context.js:15:49
Error: CallResult for closed conduit tridactyl.vim.betas@cmcaine.co.uk.962072674672: ({childId:"tridactyl.vim.betas@cmcaine.co.uk.962072674672", callId:962072674788, path:"storage.sync.get", result:{}}) ConduitsChild.jsm:167:13
NS_ERROR_UNEXPECTED: 
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674671 ConduitsChild.jsm:108
sendRemoveListener on closed conduit tridactyl.vim.betas@cmcaine.co.uk.962072674672 2 ConduitsChild.jsm:108
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). injectGlobalHook.js:30:11375
Promise resolved after context unloaded
content.js:29761
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674722 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674776 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674760 ConduitsChild.jsm:108
sendRemoveListener on closed conduit tridactyl.vim.betas@cmcaine.co.uk.962072674687 2 ConduitsChild.jsm:108
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“default-src”). panel.js:62:24
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). aura_prod.js line 226 > eval:4:289
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIURI.host] 4 storage.js:1349
SecurityError: Permission denied to access property "Sfdc" on cross-origin object iframeinterface.js:1
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674851 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674835 ConduitsChild.jsm:108
Error: Resource server0.conn0.child1/source4124 does not exist selector.js:27:11
Error: CallResult for closed conduit tridactyl.vim.betas@cmcaine.co.uk.962072674792: ({childId:"tridactyl.vim.betas@cmcaine.co.uk.962072674792", callId:962072674906, path:"storage.sync.get", result:{}}) ConduitsChild.jsm:167:13
NS_ERROR_UNEXPECTED: 
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674791 ConduitsChild.jsm:108
sendRemoveListener on closed conduit tridactyl.vim.betas@cmcaine.co.uk.962072674792 2 ConduitsChild.jsm:108
Promise resolved after context unloaded
content.js:29761
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). injectGlobalHook.js:30:11375
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674842 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674894 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674880 ConduitsChild.jsm:108
sendRemoveListener on closed conduit tridactyl.vim.betas@cmcaine.co.uk.962072674806 2 ConduitsChild.jsm:108
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“default-src”). panel.js:62:24
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). aura_prod.js line 226 > eval:4:289
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIURI.host] 4 storage.js:1349
SecurityError: Permission denied to access property "Sfdc" on cross-origin object iframeinterface.js:1
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674968 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}.962072674953 ConduitsChild.jsm:108