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

Bug 377161

Summary: DnD import not working on IE9
Product: [ECD] Orion Reporter: Tomasz Zarna <tomasz.zarna>
Component: ClientAssignee: Susan McCourt <susan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: simon_kaegi
Version: 0.5   
Target Milestone: 2.0 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tomasz Zarna CLA 2012-04-19 05:31:03 EDT
Steps:
1. Create a new folder
2. Import a zip
3. Drag and drop the zip on the dialog
=>
java.lang.NullPointerException: null
	at org.eclipse.orion.internal.server.servlets.xfer.ClientImport.readChunk(ClientImport.java:234) ~[na:na]
	at org.eclipse.orion.internal.server.servlets.xfer.ClientImport.doPut(ClientImport.java:200) ~[na:na]
	at org.eclipse.orion.internal.server.servlets.xfer.ClientImport.doPost(ClientImport.java:151) ~[na:na]
	at org.eclipse.orion.internal.server.servlets.xfer.TransferServlet.doPostImport(TransferServlet.java:115) ~[na:na]
	at org.eclipse.orion.internal.server.servlets.xfer.TransferServlet.doPost(TransferServlet.java:52) ~[na:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) ~[javax.servlet_3.0.0.v201112011016.jar:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) ~[javax.servlet_3.0.0.v201112011016.jar:na]
	at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:38) ~[na:na]
	at org.eclipse.orion.server.configurator.servlet.AuthorizedUserFilter.doFilter(AuthorizedUserFilter.java:84) ~[na:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) ~[na:na]
	at org.eclipse.orion.internal.server.hosting.HostedSiteRequestFilter.doFilter(HostedSiteRequestFilter.java:50) ~[na:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) ~[na:na]
	at org.eclipse.orion.internal.server.servlets.file.EditSupportFilter.doFilter(EditSupportFilter.java:46) ~[na:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) ~[na:na]
	at org.eclipse.orion.server.configurator.servlet.WelcomeFileFilter.doFilter(WelcomeFileFilter.java:99) ~[na:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) ~[na:na]
	at org.eclipse.orion.server.configurator.servlet.CacheFilter.doFilter(CacheFilter.java:73) ~[na:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) ~[na:na]
	at org.eclipse.orion.server.configurator.servlet.CacheFilter.doFilter(CacheFilter.java:73) ~[na:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) ~[na:na]
	at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:77) ~[na:na]
	at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:144) ~[na:na]
	at org.eclipse.orion.server.configurator.servlet.ExcludedExtensionGzipFilter.doFilter(ExcludedExtensionGzipFilter.java:42) ~[na:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:132) ~[na:na]
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68) ~[na:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) ~[javax.servlet_3.0.0.v201112011016.jar:na]
	at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:384) ~[org.eclipse.equinox.http.jetty_3.0.0.v20120216-2249.jar:na]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:594) ~[org.eclipse.jetty.servlet_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:485) [org.eclipse.jetty.servlet_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) [org.eclipse.jetty.server_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065) [org.eclipse.jetty.server_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:412) [org.eclipse.jetty.servlet_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) [org.eclipse.jetty.server_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999) [org.eclipse.jetty.server_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [org.eclipse.jetty.server_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) [org.eclipse.jetty.server_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.server.Server.handle(Server.java:351) [org.eclipse.jetty.server_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454) [org.eclipse.jetty.server_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900) [org.eclipse.jetty.server_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954) [org.eclipse.jetty.server_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:252) [org.eclipse.jetty.http_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [org.eclipse.jetty.http_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76) [org.eclipse.jetty.server_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609) [org.eclipse.jetty.io_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45) [org.eclipse.jetty.io_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599) [org.eclipse.jetty.util_8.1.1.v20120215.jar:8.1.1.v20120215]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534) [org.eclipse.jetty.util_8.1.1.v20120215.jar:8.1.1.v20120215]
	at java.lang.Thread.run(Thread.java:736) [na:1.6.0]

Importing the zip with the upload button works fine.
Comment 1 John Arthorne CLA 2012-04-20 13:31:55 EDT
What browser? Was this on orion.eclipse.org or localhost? Can you try a couple of different zips to see if it is a problem with a particular zip? If consistently reproducible, can you print the request headers you see in the browser console for the POST to /xfer?

FWIW this is working for me on latest on localhost, using Chrome. Here are the headers of the import request in my case:

Accept:*/*
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:146414
Content-Type:application/x-zip-compressed
Cookie:JSESSIONID=1pxs4rm34ptzuhpqdrlyc8j0t
Host:localhost:8080
Origin:http://localhost:8080
Referer:http://localhost:8080/navigate/table.html
Slug:Octocats.zip
Comment 2 Tomasz Zarna CLA 2012-04-23 04:44:29 EDT
(In reply to comment #1)
> What browser? 

FF 11.0

> Was this on orion.eclipse.org or localhost? 

locahost built from source code pulled this morning.

> Can you try a couple of different zips to see if it is a problem with a particular zip? 

Happened each time trying 3 different zip files.

> If consistently reproducible, can you print the request headers you see in the browser console for the POST to /xfer?

Accept	text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding	gzip, deflate
Accept-Language	en-us,en;q=0.5
Connection	keep-alive
Content-Length	276580
Cookie	JSESSIONID=1mmibxyml6kjs88ah4xpdsz6r
Host	localhost:8080
Referer	http://localhost:8080/navigate/table.html
Slug	w.zip
User-Agent	Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0
X-Requested-With	XMLHttpRequest

> FWIW this is working for me on latest on localhost, using Chrome. 

Affirmative, works fine on Chrome for me too.
Comment 3 John Arthorne CLA 2012-05-03 14:52:05 EDT
So the DnD import doesn't seem to work for me at all on Firefox (Win 7, tried FF 11 and FF 12). The browser captures the drop event first and opens a "save" dialog before any client code is run. 

It also failed for me on IE 9.

Anton does this work in Chrome only? We may need to consider removing it if it only works on Chrome (or at least say that in the drop zone text).
Comment 4 Anton McConville CLA 2012-05-03 15:59:01 EDT
Not sure what's going on with FF, I'm pretty sure that I tested it when I did this work originally. It should work in FF. I will need to handle it differently for IE.

I'll take a look at the FF issues.

(In reply to comment #3)
> So the DnD import doesn't seem to work for me at all on Firefox (Win 7, tried
> FF 11 and FF 12). The browser captures the drop event first and opens a "save"
> dialog before any client code is run. 
> 
> It also failed for me on IE 9.
> 
> Anton does this work in Chrome only? We may need to consider removing it if it
> only works on Chrome (or at least say that in the drop zone text).
Comment 5 Anton McConville CLA 2012-05-03 16:39:59 EDT
Have pushed a fix for FF now. It needed a little adjustment with the event handling. I'll need to treat IE very differently.

(In reply to comment #4)
> Not sure what's going on with FF, I'm pretty sure that I tested it when I did
> this work originally. It should work in FF. I will need to handle it
> differently for IE.
> 
> I'll take a look at the FF issues.
> 
> (In reply to comment #3)
> > So the DnD import doesn't seem to work for me at all on Firefox (Win 7, tried
> > FF 11 and FF 12). The browser captures the drop event first and opens a "save"
> > dialog before any client code is run. 
> > 
> > It also failed for me on IE 9.
> > 
> > Anton does this work in Chrome only? We may need to consider removing it if it
> > only works on Chrome (or at least say that in the drop zone text).
Comment 6 Susan McCourt CLA 2013-02-07 14:37:37 EST
We are on IE10 now, and this dialog was reworked to not be dependent on dojo/dijit. I was able to drag a file into the dialog in IE10.