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

Infinite loop onSubmitComplete #11

Open
payammeyer opened this issue May 7, 2015 · 18 comments
Open

Infinite loop onSubmitComplete #11

payammeyer opened this issue May 7, 2015 · 18 comments

Comments

@payammeyer
Copy link
Contributor

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] server.UploadServlet: checkCORS error Origin: http://127.0.0.1:8888 does not match:^$
2015-05-07 10:59:15,508 [qtp540507577-244] 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] server.UploadListener: UploadListener created new instance. (slow=20, requestSize=181014)
2015-05-07 10:59:15,508 [qtp540507577-244] server.UploadServlet: UPLOAD-SERVLET (18xqh1adxmbqu573spu3zou4) parsing HTTP POST request
2015-05-07 10:59:16,701 [qtp540507577-244] 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

@payammeyer
Copy link
Contributor Author

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.

@frandevel
Copy link

Confirmed that 1.0.1 works fine as well

@zouabimourad
Copy link

I have the same issue ... any workaround ?

@frandevel
Copy link

@zouabimourad In our case, we moved back to v1.0.1

@zouabimourad
Copy link

@frandevel i'm using gwt 2.7.0 ... v1.0.1 doesn't work well with gwt 2.7.0

@frandevel
Copy link

@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

@payammeyer
Copy link
Contributor Author

@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.

@stefanroeck
Copy link

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.

@ghost
Copy link

ghost commented Mar 10, 2016

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

@payammeyer
Copy link
Contributor Author

Currently 1.0.3 on GWT 2.8 beta is working for me, at least on Chrome.

@ghost
Copy link

ghost commented Mar 10, 2016

On Chrome... 2.7 and 1.0.3 is working as well... But not on Firefox. Chrome and all related Browsers have no issues

@colingan
Copy link

Does it solved? I have the same problem on firefox.
gwtupload 1.0.3
gwt 2.7

@payammeyer
Copy link
Contributor Author

Having the same issue on Firefox and IE, unfortunately this project doesn't seem to be maintained anymore.

@stefanroeck
Copy link

This patch worked for me
gwtUpload.patch.txt

@payammeyer
Copy link
Contributor Author

Thanks so much for sharing that patch, I submitted a PR (#20) though I doubt it would get pulled, solves my problem though.

manolo added a commit that referenced this issue Apr 13, 2016
@stezadov
Copy link
Contributor

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

@smdb21
Copy link

smdb21 commented Sep 12, 2018

Hi! Is there a solution for this problem?

@zouabimourad
Copy link

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.

smdb21 added a commit to proteomicsyates/PINT that referenced this issue Sep 13, 2018
smdb21 added a commit to proteomicsyates/PINT that referenced this issue Sep 13, 2018
mparfianowicz pushed a commit to atlassian-forks/gwtupload that referenced this issue Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants