slingcode icon indicating copy to clipboard operation
slingcode copied to clipboard

Standalone slingcode.html unable to launch apps

Open bryan-lott opened this issue 5 years ago • 3 comments

Hi, I'm unable to launch an app from slingcode if I download the slingcode.html file and run it locally. After clicking on the launch button for (for instance) Hello World, I just get a blank screen with no app. Running it from slingcode.net/slingcode.html works as expected. In addition, after I've opened the blank screen/no app, if I then edit the app, the stop button shows but doesn't seem to work Tried on both Chrome and Brave.

The console for the app edit screen when clicking on the stop button gives the following output:

VM5 slingcode.html:1 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('null') does not match the recipient window's origin ('null').
(anonymous) @ /C:/Users/mysti/OneDrive/Desktop/slingcode.html?app=c87e1e4a-f9f0-49e2-bcef-b3e7a2b1a8f9:1
Ig @ VM5 slingcode.html:1
c @ VM5 slingcode.html:1
t @ VM5 slingcode.html:1
(anonymous) @ VM5 slingcode.html:1
u @ VM5 slingcode.html:1
(anonymous) @ VM5 slingcode.html:1
r @ VM5 slingcode.html:1
J @ VM5 slingcode.html:1
K @ VM5 slingcode.html:1
ee @ VM5 slingcode.html:1
ae @ VM5 slingcode.html:1
Xr @ VM5 slingcode.html:1
m @ VM5 slingcode.html:1
be @ VM5 slingcode.html:1
ve @ VM5 slingcode.html:1
l.unstable_runWithPriority @ VM5 slingcode.html:1
Ct @ VM5 slingcode.html:1
h @ VM5 slingcode.html:1
(anonymous) @ VM5 slingcode.html:1
/C:/Users/mysti/OneDrive/Desktop/slingcode.html?app=c87e1e4a-f9f0-49e2-bcef-b3e7a2b1a8f9:1 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('null') does not match the recipient window's origin ('null').

The console for the blank screen gives the following output:

Invalid asm.js: Expected function name
slingcode.html?app=c87e1e4a-f9f0-49e2-bcef-b3e7a2b1a8f9:1 CodeMirror includes: {} {} {} {}
slingcode.html?app=c87e1e4a-f9f0-49e2-bcef-b3e7a2b1a8f9:1 can-make-files? true
slingcode.html?app=c87e1e4a-f9f0-49e2-bcef-b3e7a2b1a8f9:1 can-p2p? true
slingcode.html?app=c87e1e4a-f9f0-49e2-bcef-b3e7a2b1a8f9:1 main!
slingcode.html?app=c87e1e4a-f9f0-49e2-bcef-b3e7a2b1a8f9:1 reload!

Happy to help however I can!

bryan-lott avatar Jun 24 '20 14:06 bryan-lott

@bryan-lott perfect, thanks for all the detail here. I have replicated this issue and will fix. :+1:

chr15m avatar Jun 25 '20 05:06 chr15m

Note to self: investigating this further new versions of Chrome are blocking access to MessageEvent.source object. A potential workaround is to ask the destination frame to do the re-rendering itself with a postMessage, rather than trying to push directly into the window.

chr15m avatar Jul 08 '20 13:07 chr15m

just FYI: Latest Firefox works fine

adisetiawan avatar Jul 10 '20 01:07 adisetiawan