Capturing screenshots

Error monitoring tool for recording videos & screenshots of user sessions
Post Reply
User avatar
dimehb
Premium Member
Premium Member
Posts: 242
Joined: Fri Oct 02, 2015 11:06 am

Capturing screenshots

Post by dimehb » Mon Aug 19, 2019 8:44 am

I get an error message when I want to capture a screenshot with this config.

Code: Select all

var logger = window.RC && new RC.Logger({
            applicationId: "myKey",
            recordUserActions: true,
            recordSessionVideo: true,
            logResourceLoadFailures: true,
            logAjaxRequests: true,
            captureScreenshot: true,
            showUI: true,
            data: {
                company: "MyCompany"
                userName:"MyUser"
            }
        })

Code: Select all

Uncaught (in promise) TypeError: Cannot read property 'stack' of null
at i.<anonymous> (rootcause-full-extjs.js?_=1566196820009:10)
at Array.forEach (<anonymous>)
at i.createStackingContexts (rootcause-full-extjs.js?_=1566196820009:10)
at i.<anonymous> (rootcause-full-extjs.js?_=1566196820009:10)
at rootcause-full-extjs.js?_=1566196820009:10

(anonymous) @ rootcause-full-extjs.js?_=1566196820009:10
i.createStackingContexts @ rootcause-full-extjs.js?_=1566196820009:10
(anonymous) @ rootcause-full-extjs.js?_=1566196820009:10
(anonymous) @ rootcause-full-extjs.js?_=1566196820009:10
Promise.then (async)
i @ rootcause-full-extjs.js?_=1566196820009:10
doScreenshot @ rootcause-full-extjs.js?_=1566196820009:10
screenshot @ rootcause-full-extjs.js?_=1566196820009:10
(anonymous) @ rootcause-full-extjs.js?_=1566196820009:10
collectCrashData @ rootcause-full-extjs.js?_=1566196820009:10
collectCrashData @ rootcause-full-extjs.js?_=1566196820009:10
e.<computed> @ rootcause-full-extjs.js?_=1566196820009:10
collectCrashData @ rootcause-full-extjs.js?_=1566196820009:10
e.<computed> @ rootcause-full-extjs.js?_=1566196820009:10
collectCrashData @ rootcause-full-extjs.js?_=1566196820009:10
e.<computed> @ rootcause-full-extjs.js?_=1566196820009:10
handleError @ rootcause-full-extjs.js?_=1566196820009:10
onError @ rootcause-full-extjs.js?_=1566196820009:10
error (async)
addErrorListeners @ rootcause-full-extjs.js?_=1566196820009:10
start @ rootcause-full-extjs.js?_=1566196820009:10
start @ rootcause-full-extjs.js?_=1566196820009:10
e.<computed> @ rootcause-full-extjs.js?_=1566196820009:10
start @ rootcause-full-extjs.js?_=1566196820009:10
e.<computed> @ rootcause-full-extjs.js?_=1566196820009:10
init @ rootcause-full-extjs.js?_=1566196820009:10
init @ rootcause-full-extjs.js?_=1566196820009:10
e.<computed> @ rootcause-full-extjs.js?_=1566196820009:10
init @ rootcause-full-extjs.js?_=1566196820009:10
e.<computed> @ rootcause-full-extjs.js?_=1566196820009:10
RC.Logger @ rootcause-full-extjs.js?_=1566196820009:10
ErrorLogger.init @ Index?v=xmNecjKITfdZPTUnn0PE-yqBlkcXx9Jigl3iqRX2pqc1:189855
fire @ Base?v=J6ml6xMyD10orcJTVvU1PRTOd7sNVLLa0LZFhOd5QJg1:3075
fireWith @ Base?v=J6ml6xMyD10orcJTVvU1PRTOd7sNVLLa0LZFhOd5QJg1:3187
done @ Base?v=J6ml6xMyD10orcJTVvU1PRTOd7sNVLLa0LZFhOd5QJg1:9081
script.onload.script.onreadystatechange @ Base?v=J6ml6xMyD10orcJTVvU1PRTOd7sNVLLa0LZFhOd5QJg1:9578
load (async)
send @ Base?v=J6ml6xMyD10orcJTVvU1PRTOd7sNVLLa0LZFhOd5QJg1:9563
ajax @ Base?v=J6ml6xMyD10orcJTVvU1PRTOd7sNVLLa0LZFhOd5QJg1:8983
jQuery.<computed> @ Base?v=J6ml6xMyD10orcJTVvU1PRTOd7sNVLLa0LZFhOd5QJg1:9128
getScript @ Base?v=J6ml6xMyD10orcJTVvU1PRTOd7sNVLLa0LZFhOd5QJg1:9115
ErrorLogger.initialize @ Index?v=xmNecjKITfdZPTUnn0PE-yqBlkcXx9Jigl3iqRX2pqc1:189829
(anonymous) @ Index?v=xmNecjKITfdZPTUnn0PE-yqBlkcXx9Jigl3iqRX2pqc1:190231
fire @ Base?v=J6ml6xMyD10orcJTVvU1PRTOd7sNVLLa0LZFhOd5QJg1:3075
fireWith @ Base?v=J6ml6xMyD10orcJTVvU1PRTOd7sNVLLa0LZFhOd5QJg1:3187
ready @ Base?v=J6ml6xMyD10orcJTVvU1PRTOd7sNVLLa0LZFhOd5QJg1:3394
completed @ Base?v=J6ml6xMyD10orcJTVvU1PRTOd7sNVLLa0LZFhOd5QJg1:3424
Any ideas how to solve this?

User avatar
mats
Core Developer
Core Developer
Posts: 14792
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Capturing screenshots

Post by mats » Mon Aug 19, 2019 1:10 pm

Hmm no, never seen this. Do you have it running online somewhere that we can inspect?
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
dimehb
Premium Member
Premium Member
Posts: 242
Joined: Fri Oct 02, 2015 11:06 am

Re: Capturing screenshots

Post by dimehb » Fri Aug 23, 2019 5:54 pm

Sure but you'll need to do a few steps to get there, and I know you're not a big fan of doing such kind of things.

If I put a conditional breakpoint in the createStackingContexts, this is the object which has an empty parent:

Code: Select all

i {node: body#ext-element-1.fixed-topbar.fixed-sidebar.dashboard.sidebar-collapsed.x-webkit.x-chrome.x-windo…, parent: null, stack: null, bounds: null, borders: null, …}
backgroundClip: []
backgroundImages: null
borders: null
bounds: null
clip: []
colors: {}
computedStyles: CSSStyleDeclaration { …}
isPseudoElement: false
node: body#ext-element-1.fixed-topbar.fixed-sidebar.dashboard.sidebar-collapsed.x-webkit.x-chrome.x-windows.x-desktop.x-body.x-keyboard-mode.theme-sdtd.color-default.x-scroller
offsetBounds: null
opacity: null
parent: null
stack: null
styles: {display: "block", visibility: "visible"}
transformData: null
transformMatrix: null
visibile: true
visible: true
__proto__: Object
This corresponds to the body element inside the iframe.

The only noteworthy exception to the guides is that I conditionally load this script via jQuery.

Code: Select all

$.getScript("https://app.therootcause.io/rootcause-full-extjs.js", this.init.bind(this));
We made the error logger configurable, which is why we don't add it to the document by default. Any off chance this might be causing the issue?

User avatar
mats
Core Developer
Core Developer
Posts: 14792
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Capturing screenshots

Post by mats » Sat Aug 24, 2019 10:26 am

Very hard to say. Is your app running inside an iframe? Would need to reproduce it to know more.
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

Post Reply