My app embed "refused to connect"?

I had encountered the same issue while trying to embed an app to a web page.
The issue was that I hadn’t published the app after selecting the “Embed my app in a web page” checkbox, as @bridget suggested. Try to first select the checkbox and then publish the last version of your app.
It’s a silly suggestion, but you never know :stuck_out_tongue: