Latest SoundCloud SDK Version
About a year ago, I successfully registered my App.
To my surprise, today I found that the SoundCloud (SC) sign-in feature is no longer working.
Upon clicking the button, a SC pop-up window appears with the message "Allow “domain.com” access to your SoundCloud account?". After clicking connect
, a callback pop-up displays the message "This popup should automatically close in a few seconds". Unfortunately, the callback pop-up never closes and I noticed some errors in the console:
Using Chrome 55.0.2883.87 m (64-bit)
VM2980 callback.html?code=3717208…&state=SoundCloud_Dialog_508d9:7 Uncaught DOMException: Blocked a frame with origin "http://domain.com" from accessing a cross-origin frame.
at onload (http://domain.com/callback.html?code=3717208cc602aba6cc0195157ecd2b6b&state…8d9#access_token=1-166020-17988851-e8f6b064d7ccd4&scope=non-expiring:7:105)
onload @ VM2980 callback.html?code=3717208…&state=SoundCloud_Dialog_508d9:7
Using Firefox 50.1.0
Error: Permission denied to access property "SC" callback.html:1:1
Learn More
The content of my callback.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8>
<title>Connect with SoundCloud</title>
</head>
<body onload="window.setTimeout(window.opener.SC.connectCallback, 1);">
<p>
This popup should automatically close in a few seconds
</p>
</body>
</html>
The AngularJS 1.6 component controller function triggered by a button on my page:
...
this.connect_sc = function () {
debugger;
// initiate auth popup
SC.connect().then(function () {
debugger;
return SC.get('/me');
}).then(function (me) {
debugger;
userPerma = me.permalink;
setScUi(me.username, me.avatar_url);
getPlaylists();
});
};
...
I attempted to debug the issue by adding breakpoints. However, the SC promise does not execute, it only pauses at the first debugger;
after clicking the button.
Why is this happening and how can it be resolved?