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

Uncaught TypeError: Cannot create proxy with a non-object as target or handler #160

Open
Juko8 opened this issue May 30, 2024 · 3 comments

Comments

@Juko8
Copy link

Juko8 commented May 30, 2024

Logging on our website caught one user having ~4k exceptions from this extension in a very short timespan.

Call Stack:
TypeError: Cannot create proxy with a non-object as target or handler
at simulate (chrome-extension://ijhfkkgjgpcplfeajghagkcebakjcpge/data/inject/block/main.js:52:52)
at Object.get (chrome-extension://ijhfkkgjgpcplfeajghagkcebakjcpge/data/inject/block/main.js:63:13)
at util.scorm.js:127:40

util.scorm.js being our code. Here is a snippet which seems to be the part the extension has issues with. We are opening a new window and then checking every 500 ms if it has been closed.

$('#TopDiv').addClass('BackGroundDisabled');
var win = window.open(scormUrl, '_blank', 'status=0,resizable=1,toolbar=0,location=0,width=' + width + ',height=' + height + ',scrollbars=1,left=' + parseInt((screen.availWidth / 2) - (width / 2)) + ',top=' + parseInt((screen.availHeight / 2) - (height / 2)) + '');

// If fullscreen, resize the new window:
if (fullscreen == 1) {
    win.moveTo(0, 0);
    win.resizeTo(screen.availWidth, screen.availHeight);
}

var refreshIntervalId;
if (ps.reload) {
    refreshIntervalId = setInterval(function () {
        if (win && win.closed) { // <----- This is line 127
            clearInterval(refreshIntervalId);
            __doPostBack('PopUpClosed', '');
        }
    }, 500);
}
else {
    refreshIntervalId = setInterval(function () {
        if (win && win.closed) {
            clearInterval(refreshIntervalId);
            $('#TopDiv').removeClass('BackGroundDisabled');
        }
    }, 500);
}

Operating system | Windows 10
Browser version | Edge 125.0
SDK version | javascript:3.0.1

@schomery
Copy link
Owner

schomery commented Jun 2, 2024

can I have the link?

@Juko8
Copy link
Author

Juko8 commented Jun 3, 2024

I could give you the link, but you wouldn't be able to access the page without a user login, which we typically only provide to our customer organizations and their employees.

@schomery
Copy link
Owner

schomery commented Jun 3, 2024

You can provide a minimal HTML page that cause the issue (Cannot create proxy with a non-object as target)

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

No branches or pull requests

2 participants