Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 403117

Summary: [import] Experimental importer doesn't work in Firefox
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 3.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2013-03-12 16:25:08 EDT
1. Checkout this Git repo: https://github.com/mamacdon/import-demo
2. Ensure you have a local Orion server running on localhost:8080 with the client code from 2013-03-12 or newer.
2. Edit embed.js and change the dependency 'http://127.0.0.2:8080/import/trampoline.js'
to                                         'http://localhost:8080/import/trampoline.js'
3. Ensure that you have a user with login 'mamacdon' and password 'mamacdon' set up on your local server. (Alternatively you can change the 'login' and 'password' fields in embed.js)
4. Run this command from your repo directory to start the "external site":
> node server.js
5. In Firefox, go to http://localhost:8081/embed.html -- this is now an external website that wants to import content into Orion.
6. Click the 'Try the sample' button.

An error is generated:
> Exception... "The object could not be cloned." code: "25" nsresult: "0x80530019 (DataCloneError)" location: "<unknown>"] 

Firefox seems to have a problem passing a Blob over window.postMessage. Sigh.

Possibly related:
https://bugzilla.mozilla.org/show_bug.cgi?id=722126

Presumably the PluginRegistry has dealt with this already. Would be great to find a way to reuse it for the import case :-|
Comment 1 Mark Macdonald CLA 2013-03-18 13:10:47 EDT
The fix is on the external site's end, not Orion's. Orion was not even getting the zip message, since Firefox failed to post it to us.

The fix was to pass an ArrayBuffer instead of a Blob. ArrayBuffer is better supported in FF.

see the change here:
https://github.com/mamacdon/import-demo/commit/57d0c5abb3cc0a7a261044115449100e6c30a36b#L0L25