Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callstack Instrument fails to capture some parts of the stack #845

Open
vringar opened this issue Jan 19, 2021 · 13 comments
Open

Callstack Instrument fails to capture some parts of the stack #845

vringar opened this issue Jan 19, 2021 · 13 comments

Comments

@vringar
Copy link
Contributor

vringar commented Jan 19, 2021

@hadiamjad pointed out on Matrix that the callstack instrument captures less than the Firefox debugger shows.

Firefox output

OpenWPM output

@vringar
Copy link
Contributor Author

vringar commented Jan 19, 2021

It would be nice to get the raw string output from OpenWPM instead of an image since that's easier to read/understand (at least for me).

@hadiamjad
Copy link

hadiamjad commented Jan 21, 2021

2/a</e.prototype.addCreative@https://ced-ns.sascdn.com/diff/templates/ts/dist/banner/sas-banner-1.2.js:1:16788;null
16/o</e.prototype.init@https://ced-ns.sascdn.com/diff/templates/ts/dist/banner/sas-banner-1.2.js:1:13108;null
onLoad@https://www3.smartadserver.com/ac?nwid=0&siteid=81298&pgid=632202&fmtid=35212&async=1&visit=s&tmstp=6304051897&tag=sas_35212&sh=768&sw=1366&pgDomain=https%3A%2F%2Fwww.atresplayer.com%2F&noadcbk=sas.noad&isLazy=0&isAdRefresh=0:111:27;null
l@https://www3.smartadserver.com/ac?nwid=0&siteid=81298&pgid=632202&fmtid=35212&async=1&visit=s&tmstp=6304051897&tag=sas_35212&sh=768&sw=1366&pgDomain=https%3A%2F%2Fwww.atresplayer.com%2F&noadcbk=sas.noad&isLazy=0&isAdRefresh=0:58:1483;null
sas.utils.Latch/this.notify@https://www3.smartadserver.com/ac?nwid=0&siteid=81298&pgid=632202&fmtid=35212&async=1&visit=s&tmstp=6304051897&tag=sas_35212&sh=768&sw=1366&pgDomain=https%3A%2F%2Fwww.atresplayer.com%2F&noadcbk=sas.noad&isLazy=0&isAdRefresh=0:58:1639;null
sas.utils.loadScript/r</<@https://www3.smartadserver.com/ac?nwid=0&siteid=81298&pgid=632202&fmtid=35212&async=1&visit=s&tmstp=6304051897&tag=sas_35212&sh=768&sw=1366&pgDomain=https%3A%2F%2Fwww.atresplayer.com%2F&noadcbk=sas.noad&isLazy=0&isAdRefresh=0:58:3392;null
e/sas.utils._callbacks[c]<@https://www3.smartadserver.com/ac?nwid=0&siteid=81298&pgid=632202&fmtid=40121&async=1&visit=s&tmstp=6304051897&tag=sas_40121&sh=768&sw=1366&pgDomain=https%3A%2F%2Fwww.atresplayer.com%2F&noadcbk=sas.noad&isLazy=0&isAdRefresh=0:58:2866;null
sas.events.addLoadEvent/e<@https://www3.smartadserver.com/ac?nwid=0&siteid=81298&pgid=632202&fmtid=40121&async=1&visit=s&tmstp=6304051897&tag=sas_40121&sh=768&sw=1366&pgDomain=https%3A%2F%2Fwww.atresplayer.com%2F&noadcbk=sas.noad&isLazy=0&isAdRefresh=0:58:1260;null
r@https://statics.atresmedia.com/atresplayer/webapp/vendor.873e38b533.js:9:76012;null

@hadiamjad
Copy link

this might be the reason: #678?

@vringar
Copy link
Contributor Author

vringar commented Jan 21, 2021

Yes, that seems like the reason. Can you check if that setting is set?

@hadiamjad
Copy link

hadiamjad commented Jan 21, 2021

Where I can find this setting in openWPM?

@vringar
Copy link
Contributor Author

vringar commented Jan 21, 2021

https://github.com/mozilla/OpenWPM/blob/8dad9fd2129f8375575813baaa19992efdde47de/test/test_profile.py#L109-L134
If you add this command to the command sequence you can check whether the pref is set.

@vringar
Copy link
Contributor Author

vringar commented Jan 22, 2021

I just realized that this answer is a little short. Should I explain myself further or is this enough to get you going?

@hadiamjad
Copy link

No, it's understandable, I'll update you on this soon.

@hadiamjad
Copy link

Here, I have added TestConfigSetCommand at line 68 and it raises AssertionError. Looks like flag is not set.

Screenshot (102)

@vringar
Copy link
Contributor Author

vringar commented Jan 24, 2021

You can set the pref by using the BrowserParams like this:

browser_params[i].prefs = {"javascript.options.asyncstack": True}

Which I'm hoping is going to fix the issue.

@hadiamjad
Copy link

Nope, unfortunately, it's still not working.

@hadiamjad
Copy link

hadiamjad commented Jan 28, 2021

Interestingly when I tried capturing the call stack directly from selenium, it has the same problem.

image

@vringar
Copy link
Contributor Author

vringar commented Jan 29, 2021

Hmm, could you file a bug with Selenium then to see if maybe they can fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants