gwtupload
gwtupload copied to clipboard
Infinite loop onSubmitComplete
The uploader gets stuck on an infinite loop in some browsers and in Chrome just fails to upload with the following error locally and also in production (local example below):
2015-05-07 10:59:15,508 [qtp540507577-244] <ERROR> server.UploadServlet: checkCORS error Origin: http://127.0.0.1:8888 does not match:^$ 2015-05-07 10:59:15,508 [qtp540507577-244] <INFO> server.UploadListener: UploadListener 18xqh1adxmbqu573spu3zou4 remove: total=79162 done=79162 cancelled=false finished=true saved=Thu May 07 10:53:27 EDT 2015 2015-05-07 10:59:15,508 [qtp540507577-244] <INFO> server.UploadListener: UploadListener created new instance. (slow=20, requestSize=181014) 2015-05-07 10:59:15,508 [qtp540507577-244] <ERROR> server.UploadServlet: UPLOAD-SERVLET (18xqh1adxmbqu573spu3zou4) parsing HTTP POST request 2015-05-07 10:59:16,701 [qtp540507577-244] <ERROR> server.UploadServlet: UPLOAD-SERVLET (18xqh1adxmbqu573spu3zou4) parsed request, 4 items received.
This issue is also referenced here:
https://code.google.com/p/gwtupload/issues/detail?id=209
I confirmed that this issue started happening when we upgraded to the 1.0.3 release, moving back to the 1.0.2-SNAPSHOT at least makes it work.
Confirmed that 1.0.1 works fine as well
I have the same issue ... any workaround ?
@zouabimourad In our case, we moved back to v1.0.1
@frandevel i'm using gwt 2.7.0 ... v1.0.1 doesn't work well with gwt 2.7.0
@zouabimourad we did not move forward to 2.7.0 because of having very serious compilation time issues. It was taking more than 50% more to compile. We stick to GWT 2.6.1 and gwtupload 1.0.1
@zouabimourad try 1.0.2-SNAPSHOT as I mentioned, works ok with 2.7.0, but really the GWT community desperately needs another uploader. I started wrapping jquery uploader but never got around to finishing it, feel free to find it in my repos and contribute.
@frandevel I'm very surprised to hear you had slow compile issues, one of the biggest advantages of 2.7 was a much better and faster compiler. Curious what the real slow down is.
Reason for this issue seems to be a combination of two things:
- Re-attaching the iFrame after upload fires another onSubmitComplete event with an empty response (as already stated in https://code.google.com/p/gwtupload/issues/detail?id=209)
- Error handling in Uploader#onSubmitComplete() triggers updateStatusTimer again and again in case of XML parsing error ("" cannot be parsed). This causes the endless loop.
Fix could be to just ignore empty content in onSubmitComplete or disabling re-attach of iFrame if not needed.
Any news on that? I also have the same loops with 1.03 and GWT 2.7. The combination GWT 2.6.1 and 1.01 works really well!!!
@stefanroeck what do you mean with reataching the iFrame?
Thanks Andy
Currently 1.0.3 on GWT 2.8 beta is working for me, at least on Chrome.
On Chrome... 2.7 and 1.0.3 is working as well... But not on Firefox. Chrome and all related Browsers have no issues
Does it solved? I have the same problem on firefox. gwtupload 1.0.3 gwt 2.7
Having the same issue on Firefox and IE, unfortunately this project doesn't seem to be maintained anymore.
This patch worked for me gwtUpload.patch.txt
Thanks so much for sharing that patch, I submitted a PR (https://github.com/manolo/gwtupload/pull/20) though I doubt it would get pulled, solves my problem though.
I'm afraid stefanroeck's patch brings back another issue reatachIframe() was supposed to fix: http://stackoverflow.com/questions/27711821 . So, my understanding is the iframe still needs to be reattached but the way reatachIframe() does it via JS doesn't work well with GWT's FormPanel. Once the iframe is reattached in FireFox and most likely IE, FormPanel fires deferred SubmitCompleteEvent that causes the issue. I attempted to reattach the iframe by removing and adding back the form panel via GWT API and it seemed have fixed the issue in one particular place I tested but it needs more testing. Here's the diff: ST-patch-diff.txt
Hi! Is there a solution for this problem?
The Pull request #20 (it solves the problem) has been merged but there is no released version including the fix commmit. You can checkout the master and release it locally and deploy the artifact in your network maven repository.