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

DataCloneError on IE11 #598

Open
gideonthomas opened this issue Feb 17, 2017 · 14 comments
Open

DataCloneError on IE11 #598

gideonthomas opened this issue Feb 17, 2017 · 14 comments
Labels

Comments

@gideonthomas
Copy link

I get this when I try to run Brackets on IE11:
screen shot 2017-02-17 at 5 44 21 pm

Not sure what's happening but it seems to be something wrong with postMessage (which I thought we fixed by using MessageChannel).

@humphd any ideas?

@humphd
Copy link

humphd commented Feb 18, 2017

This appears to be an instance of us trying to use an object (probably a buffer) that has been transferred across a MessageChannel and isn't available on the sending side anymore. We really need to see this happen in a src/ build so we can get a better stack.

NOTE: you still use postMessage with MessageChannel but you do it over a port vs. over a window.

@gideonthomas
Copy link
Author

Just to clarify, this only happens on Windows 8.1 IE 11. Works fine on WIndows 10 IE 11

@gideonthomas
Copy link
Author

@humphd so it breaks here: https://github.com/mozilla/brackets/blob/master/src/bramble/ChannelUtils.js#L49 (I can't get any more info than DataCloneError).

@humphd
Copy link

humphd commented Apr 13, 2017

I'm trying to reproduce now. I have a VM with Windows 8.1 and IE11 (11.0.9600.16384).

So far I can't hit it. After fixing #717, I see this:

screen shot 2017-04-13 at 1 12 23 pm

When I run full Thimble, everything seems to work, except I don't see any files in the Filetree (no errors related to this):

screen shot 2017-04-13 at 1 44 04 pm

If I manually add an HTML file, it works, and shows up. Not sure what this is all about. Something is silently failing and not writing files to the fs.

No DataCloneError though. Any more STR or info?

@gideonthomas
Copy link
Author

gideonthomas commented Apr 13, 2017

@humphd can you try loading https://brackets-testing.herokuapp.com/src/hosted.html in your vm? That's where I get the error.

@humphd
Copy link

humphd commented Apr 13, 2017

Works fine:

screen shot 2017-04-13 at 1 55 01 pm

We must be running different versions somehow?

@humphd
Copy link

humphd commented Apr 13, 2017

I wonder if you're hitting this: https://connect.microsoft.com/IE/feedback/details/783468/ie10-window-postmessage-throws-datacloneerror-for-transferrable-arraybuffers

That's exactly what we do. Why does it work for me, though?

@gideonthomas
Copy link
Author

hmm that's also IE 10. This is what I see:
screen shot 2017-04-13 at 1 59 32 pm
screen shot 2017-04-13 at 1 59 50 pm

I've asked code.org to confirm and tell us what they see.

@humphd
Copy link

humphd commented Apr 13, 2017

So I'm running with 11.0.9600.16384 and you have 11.0.9600.16663, so your'e ahead of me. Maybe they broke something in a later update?

@gideonthomas
Copy link
Author

Not sure. I also noticed that you're using Edge's devtools. I wonder if it isn't showing the datacloneerror while IE11's devtools is.

@humphd
Copy link

humphd commented Apr 13, 2017

Do you want to try a test? This code is basically testing to see if it's possible to use dataTransferrables. What if you do this:

try {
    port.postMessage({buffer: buffer}, [buffer]);
} catch(e) {
    port.postMessage({buffer: buffer});
}

@humphd
Copy link

humphd commented Apr 13, 2017

I filed a bug in Thimble on the filetree being empty. It's possible that these are connected.

I think it's unlikely (but not impossible) that I'm hitting this DataCloneError and just not seeing it.

@gideonthomas
Copy link
Author

Ran the test, it goes into the catch block and then breaks here: https://github.com/mozilla/brackets/blob/master/src/filesystem/impls/filer/RemoteFiler.js#L70

@humphd
Copy link

humphd commented Apr 14, 2017

OK, try this please:

try {
    port.postMessage({buffer: buffer}, [buffer]);
} catch(e) {
    callback(null, false);
}

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

No branches or pull requests

2 participants