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

AdSense trouble in NWjs #6099

Closed
bambooCZ opened this issue Aug 15, 2017 · 10 comments
Closed

AdSense trouble in NWjs #6099

bambooCZ opened this issue Aug 15, 2017 · 10 comments

Comments

@bambooCZ
Copy link

Hi,

I've encountered a bug in NWjs which prevents AdSense to work in some cases in NWjs.

It has something to do with iframe cross-origin access. It fails in webview and in top window frame also.

snimek obrazovky 2017-08-15 v 13 46 23

@bambooCZ
Copy link
Author

bambooCZ commented Aug 15, 2017

Sorry - test app (compatible with Chrome and NWjs)
adsense-trouble.zip

--disable-web-security solves the problem, but I can not send app to production with this flag.

@Christywl
Copy link
Contributor

I can reproduce this issue on Linux/Windows with nwjs-sdk-v0.24.2.

@bambooCZ
Copy link
Author

Any news?

@rogerwang
Copy link
Member

Will see this soon.

@rogerwang
Copy link
Member

I found the difference with NW and Chrome as the following. But with the minified JS it's hard to tell more information from it.

In the attached HTML downloaded from https://ad.doubleclick.net/ddm/adi/N9166.161769.PROZENY.CZ/B20104791.201578368;dc_ver=41.108;dc_eid=40004001;sz=300x600;osdl=1;u_sd=1;dc_adk=4037388879;ord=lfmoe0;click=https%3A%2F%2Fi.imedia.cz%2Fclickthru%3FspotId%3D0%26destination%3D;dc_rfl=0,https%3A%2F%2Fsos.seznam.cz%2Fcampaign%2FbannerPreviewScreen%3FbannerId%3D1394729%26onlyPreview%3D1$0;xdt=0;crlt=bey8qr3aAx;sttr=117;prcl=s?, only a small portion of function I is executed in NW. In Chrome the function E and F at the end of function I is executed. In NW only the line 287-290 and line 292-299 is executed.
1.zip

@rogerwang
Copy link
Member

btw upstream chrome crashed when I tried to debug it in another way. filed issue here: https://bugs.chromium.org/p/chromium/issues/detail?id=775846

@bambooCZ
Copy link
Author

bambooCZ commented Oct 18, 2017

Hi,

I've managed to isolate the issue. Try URL https://xn--mrvk-xpa.tk/test/

Basically document.querySelector("iframe").contentWindow.top throws exception in NWjs. Not in other browsers.

EDIT: Well, probably that is the issue :D

@rogerwang
Copy link
Member

Great! This is very helpful. Will push a fix soon.

@rogerwang
Copy link
Member

This is fixed in git and will be available in the next nightly build.

@rogerwang
Copy link
Member

@wanghongjuan wanghongjuan self-assigned this Jan 18, 2018
wanghongjuan added a commit to wanghongjuan/nw.js that referenced this issue Jan 18, 2018
- Add test for issue nwjs#6099
- This case is failed on failed version 0.24.2, pass on fixed version 0.27.4
wanghongjuan added a commit to wanghongjuan/nw.js that referenced this issue Jan 24, 2018
- Add test for issue nwjs#6099
- This case is failed on failed version 0.24.2, pass on fixed version 0.27.4
wanghongjuan added a commit to wanghongjuan/nw.js that referenced this issue Jan 29, 2018
- Add test for issue nwjs#6099
- This case is failed on failed version 0.24.2, pass on fixed version 0.27.4
rogerwang pushed a commit that referenced this issue Feb 5, 2018
- Add test for issue #6099
- This case is failed on failed version 0.24.2, pass on fixed version 0.27.4
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

4 participants