Defect #17151

File upload broken on Chrome 36

Added by Toshi MARUYAMA over 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Attachments
Target version:2.4.6
Resolution:Fixed Affected version:

Description

On Fedora 20:
https://www.google.com/intl/en/chrome/browser/beta.html

$ LANG=C rpm -qi google-chrome-beta-36.0.1985.49-1.x86_64
Name        : google-chrome-beta
Version     : 36.0.1985.49
Release     : 1
Architecture: x86_64
Install Date: Wed Jun 11 13:27:12 2014
Group       : Applications/Internet
Size        : 182695355
License     : Multiple, see http://chrome.google.com/
Signature   : DSA/SHA1, Wed Jun  4 10:07:36 2014, Key ID a040830f7fac5991
Source RPM  : google-chrome-beta-36.0.1985.49-1.src.rpm
Build Date  : Wed Jun  4 09:59:53 2014
Build Host  : precise64build1.chrome.corp.google.com
Relocations : /opt 
Packager    : Chrome Linux Team <chromium-dev at chromium.org>
Vendor      : Google Inc.
URL         : http://chrome.google.com/
Summary     : Google Chrome
Description :
The web browser from Google

Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.

When "Choose Files" is clicked:

fedora20-chrome-36.png (44.1 KB) Toshi MARUYAMA, 2014-06-11 06:41

17151.patch Magnifier (1.36 KB) Felix Schäfer, 2014-06-25 14:11

17151_redmine_2.3_latest.patch Magnifier (960 Bytes) Pierre Pretorius, 2014-07-23 13:45


Related issues

Related to Redmine - Defect #13932: File upload does not work with Safari Closed
Duplicated by Redmine - Defect #17366: Add duplicate files on chrome on Windows7 64bit Closed
Duplicated by Redmine - Defect #17495: Problem attaching files using Chrome ver. 36.0.1985.125 m... Closed
Duplicated by Redmine - Defect #17533: Attach File Broken in Chrome Closed
Duplicated by Redmine - Defect #17528: AJAX uploading shows multiple uploads and inputs Closed
Duplicated by Redmine - Defect #17536: File attachment bug in the new version of chrome. Closed
Duplicated by Redmine - Defect #17559: Same file gets Attach at atime with 21 FileUpload fields ... Closed
Duplicated by Redmine - Defect #17606: Reproduction of forms to add files in the browser Google ... Closed
Duplicated by Redmine - Defect #17653: Layout is broken when using chrome to upload an attachment Closed
Duplicated by Redmine - Defect #17665: Attachment upload called twice using Chrome Closed
Duplicated by Redmine - Defect #17677: When upload file, program show multi control upload and d... Closed

Associated revisions

Revision 13183
Added by Toshi MARUYAMA over 4 years ago

fix file upload broken on Chrome 36 (#17151)

Contributed by Felix Schäfer.

Revision 13199
Added by Toshi MARUYAMA over 4 years ago

fix file upload broken on Chrome 36 (#17151)

Contributed by Felix Schäfer.

Revision 13201
Added by Toshi MARUYAMA over 4 years ago

Merged r13199 from trunk to 2.5-stable (#17151)

Fix file upload broken on Chrome 36.

Contributed by Felix Schäfer.

Revision 13203
Added by Toshi MARUYAMA over 4 years ago

Merged r13199 from trunk to 2.4-stable (#17151)

Fix file upload broken on Chrome 36.

Contributed by Felix Schäfer.

Revision 13350
Added by Toshi MARUYAMA about 4 years ago

revert r13199 (#17151)

Chrome 36.0.1985.143 was released.

History

#1 Updated by Toshi MARUYAMA over 4 years ago

  • Description updated (diff)

#2 Updated by Toshi MARUYAMA over 4 years ago

  • Description updated (diff)

#3 Updated by Etienne Massip over 4 years ago

It's a beta, are you sure it's not a browser issue ?

#4 Updated by Toshi MARUYAMA over 4 years ago

Etienne Massip wrote:

It's a beta,

Yes.
But "37.0.2042.0 canary" has same problem.
http://www.chromium.org/getting-involved/download-chromium

are you sure it's not a browser issue ?

No problem with following browser on my Windows 8.1
  • Firefox 29.0.1
  • Chrome 35.0.1916.153 m
  • IE 11.0.9699.17107

#5 Updated by Toshi MARUYAMA over 4 years ago

  • Related to Defect #13932: File upload does not work with Safari added

#6 Updated by Felix Schäfer over 4 years ago

I can confirm this bug on 38.0.2066.5 canary too, and a Planio customer observed this issue on Chrome 36.0.1985.84 too.

I think this is a browser issue though as both browsers make 2 requests to upload.js with 2 different attachment_id (1 and 2 in my and the customers tests).

#7 Updated by Felix Schäfer over 4 years ago

Please find attached the proposed patch from one of my colleagues at Planio. This fixes the issue for us in Chrome 38.

It seems in Chrome 36 and following $(inputEl).clone().val(''); (source:trunk/public/javascripts/attachments.js@13182#L118) triggers the onchange callback a second time, adding the callback later instead of inline with the element solves this issue.

#8 Updated by Jan from Planio www.plan.io over 4 years ago

  • Status changed from New to Resolved
  • Target version set to Candidate for next minor release

#9 Updated by Toshi MARUYAMA over 4 years ago

  • Status changed from Resolved to New
  • Target version changed from Candidate for next minor release to 2.5.2

#10 Updated by Toshi MARUYAMA over 4 years ago

  • Target version changed from 2.5.2 to 2.4.6

#11 Updated by Toshi MARUYAMA over 4 years ago

I have confirmed this patch fixes in google-chrome-beta-36.0.1985.84-1 on Fedora 20.

#12 Updated by Toshi MARUYAMA over 4 years ago

  • Subject changed from FIle upload broken on Chrome 36 to File upload broken on Chrome 36

#13 Updated by Etienne Massip over 4 years ago

If this is a beta browser version issue, then why not fix browser instead??

#14 Updated by Felix Schäfer over 4 years ago

The issue is indeed in the js code, but as it is somewhat of a corner case it didn't create a problem until now.

Furthermore, following this logic you would need to remove all IE or other browser-specific hacks :-)

#15 Updated by Etienne Massip over 4 years ago

Felix Schäfer wrote:

Furthermore, following this logic you would need to remove all IE or other browser-specific hacks :-)

You don't get it, this fix is for a beta version, this is nonsense if the bug is indeed in the browser and not in jq or ror.

Could we wait for the 36 release to make sure it affects it too before committing it, eventually report the issue to chrome project?

#16 Updated by Toshi MARUYAMA over 4 years ago

Etienne Massip wrote:

If this is a beta browser version issue, then why not fix browser instead??

Chrome 36, 37 and 38 have this problem.
Chrome and Chromium version policy is not clear.
I am afraid Chrome and Chromium team will refuse bug fix of Chrome 36.
Such as Rails team refused bug fix of Rails 3.2.

#17 Updated by Etienne Massip over 4 years ago

What if it has already been fixed in 36 release?

#18 Updated by Toshi MARUYAMA over 4 years ago

Such as Rails team refused bug fix of Rails 3.2.

http://goo.gl/1G4olw

#19 Updated by Toshi MARUYAMA over 4 years ago

  • Target version deleted (2.4.6)

#20 Updated by Toshi MARUYAMA over 4 years ago

I have created chromium ticket.
http://goo.gl/FjMZtS

#21 Updated by Toshi MARUYAMA over 4 years ago

  • Target version set to 2.4.6

http://goo.gl/ReABLM

It may be too late for Google Chrome 36.

#22 Updated by Toshi MARUYAMA over 4 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Chrome/Chromium version policy is not clear.
So, I committed trunk r13199, 2.5-stable r13201 and 2.4-stable r13203.

#23 Updated by Felix Schäfer over 4 years ago

Thanks!

#24 Updated by Toshi MARUYAMA over 4 years ago

  • Duplicated by Defect #17366: Add duplicate files on chrome on Windows7 64bit added

#25 Updated by Etienne Massip over 4 years ago

Chrome 36 is out and the regression hasn't been merged so it's buggy til 37 comes.

That would be great to add a comment to explain that this commit is due to regression and can be reverted when 37 is out.

#26 Updated by Toshi MARUYAMA over 4 years ago

  • Related to Defect #17495: Problem attaching files using Chrome ver. 36.0.1985.125 m and Button "Select files" added

#27 Updated by Toshi MARUYAMA over 4 years ago

  • Related to deleted (Defect #17495: Problem attaching files using Chrome ver. 36.0.1985.125 m and Button "Select files")

#28 Updated by Toshi MARUYAMA over 4 years ago

  • Duplicated by Defect #17495: Problem attaching files using Chrome ver. 36.0.1985.125 m and Button "Select files" added

#29 Updated by Rafał Lisowski over 4 years ago

Works for me.

Redmine: 2.5.1.stable
Google Chrome: 36.0.1985.125

Toshi MARUYAMA wrote:

Chrome/Chromium version policy is not clear.
So, I committed trunk r13199, 2.5-stable r13201 and 2.4-stable r13203.

#30 Updated by Gennady Grechin over 4 years ago

Rafał Lisowski wrote:

Redmine: 2.5.1.stable
Google Chrome: 36.0.1985.125

Not works for me.

#31 Updated by Toshi MARUYAMA over 4 years ago

Gennady Grechin wrote:

Rafał Lisowski wrote:

Redmine: 2.5.1.stable
Google Chrome: 36.0.1985.125

Not works for me.

Because r13201 is in 2.5.2, not in 2.5.1.
2.5.2 includes 2.4.6 fixes.

#32 Updated by Etienne Massip about 4 years ago

  • Duplicated by Defect #17533: Attach File Broken in Chrome added

#33 Updated by Etienne Massip about 4 years ago

  • Duplicated by Defect #17528: AJAX uploading shows multiple uploads and inputs added

#34 Updated by Pierre Pretorius about 4 years ago

The patch for 2.4 and 2.5 doesn't work in 2.3. Attached is the patch for 2.3. It modifies attachments.js to remove the onchange before cloning the input box, then it adds it to the cloned box afterwards.

#35 Updated by Etienne Massip about 4 years ago

  • Duplicated by Defect #17536: File attachment bug in the new version of chrome. added

#36 Updated by Attila Radulovic about 4 years ago

Pierre Pretorius wrote:

The patch for 2.4 and 2.5 doesn't work in 2.3. Attached is the patch for 2.3. It modifies attachments.js to remove the onchange before cloning the input box, then it adds it to the cloned box afterwards.

Thank you very much Pierre, your patch file for 2.3 solved the problem within my 2.3.4.stable.12746.

#37 Updated by Toshi MARUYAMA about 4 years ago

  • Duplicated by Defect #17559: Same file gets Attach at atime with 21 FileUpload fields and other 8 uploading status on waiting. added

#38 Updated by Cheyenne Wills about 4 years ago

Quick question.. on the 2.3 patch, does views/attachements/_form.html.erb need updated as well or just the javescript part?

#39 Updated by Attila Radulovic about 4 years ago

Cheyenne Wills wrote:

Quick question.. on the 2.3 patch, does views/attachements/_form.html.erb need updated as well or just the javescript part?

I patched only the javascipt file with the command:

patch attachments.js < 17151_redmine_2.3_latest.patch

#40 Updated by Cheyenne Wills about 4 years ago

Thank you

#41 Updated by Vinicius Ferreira about 4 years ago

I'm running Redmine 2.5.1 and started having that problem with the latest Chrome update, version 36.0.1985.125 m. Is it fixed in 2.5.2? Is there a patch for 2.5.1?

#42 Updated by Toshi MARUYAMA about 4 years ago

Vinicius Ferreira wrote:

Is it fixed in 2.5.2?

Yes.

2.5.2 includes 2.4.6 fixes.

#43 Updated by red dot about 4 years ago

I'm also running Redmine 2.5.1 is there any patch for it? Or can I use the attachments.js and _form.html.erb from 2.5.2 in 2.5.1 to fix this bug?

#44 Updated by Toshi MARUYAMA about 4 years ago

red dot wrote:

I'm also running Redmine 2.5.1 is there any patch for it?

http://www.redmine.org/projects/redmine/repository/revisions/13201/diff?format=diff

#45 Updated by Toshi MARUYAMA about 4 years ago

  • Duplicated by Defect #17606: Reproduction of forms to add files in the browser Google Chrome! added

#46 Updated by Fernando Silva about 4 years ago

Hi guys, firstly, thank you by your effort on fixing it!

I'm using a BitNami package - 2.5.2 and I've just migrate from 2.4.1 and I would like to share with you guys that I had to run the following commands on MySQL, in order to run 2.5.2 correctly (it was need due my customized fields ;)

use bitnami_redmine

ALTER TABLE custom_fields ADD format_store TEXT(65535);
ALTER TABLE custom_fields ADD description TEXT(65535);

Tks again!
Fernando Sampaio

#47 Updated by seyfer seed about 4 years ago

Toshi MARUYAMA wrote:

red dot wrote:

I'm also running Redmine 2.5.1 is there any patch for it?

http://www.redmine.org/projects/redmine/repository/revisions/13201/diff?format=diff

How to use it? - solved

I'm use it, and it's not solve my problem.
I have same ussue like in top screen on 2.5.1.

#48 Updated by Toshi MARUYAMA about 4 years ago

seyfer seed wrote:

Toshi MARUYAMA wrote:

red dot wrote:

I'm also running Redmine 2.5.1 is there any patch for it?

http://www.redmine.org/projects/redmine/repository/revisions/13201/diff?format=diff

How to use it? - solved

I'm use it, and it's not solve my problem.
I have same ussue like in top screen on 2.5.1.

Why not update to 2.5.2?

#49 Updated by Toshi MARUYAMA about 4 years ago

  • Duplicated by Defect #17653: Layout is broken when using chrome to upload an attachment added

#50 Updated by Toshi MARUYAMA about 4 years ago

seyfer seed wrote:

Toshi MARUYAMA wrote:

red dot wrote:

I'm also running Redmine 2.5.1 is there any patch for it?

http://www.redmine.org/projects/redmine/repository/revisions/13201/diff?format=diff

How to use it? - solved

How do you apply?

#51 Updated by chu chu about 4 years ago

Toshi MARUYAMA wrote:

Vinicius Ferreira wrote:

Is it fixed in 2.5.2?

Yes.

2.5.2 includes 2.4.6 fixes.

Hi, I still encounter the same problem in 2.5.2.stable.
Any advice?

#52 Updated by Toshi MARUYAMA about 4 years ago

chu chu wrote:

Hi, I still encounter the same problem in 2.5.2.stable.

How do you check your version is 2.5.2?

#53 Updated by Toshi MARUYAMA about 4 years ago

  • Duplicated by Defect #17665: Attachment upload called twice using Chrome added

#54 Updated by Toshi MARUYAMA about 4 years ago

  • Duplicated by Defect #17677: When upload file, program show multi control upload and duplication current file upload added

#55 Updated by Toshi MARUYAMA about 4 years ago

http://goo.gl/htEwxs

This issue should be fixed by 36.0.1985.143, which was pushed to stable channel yesterday.

#56 Updated by chu chu about 4 years ago

Toshi MARUYAMA wrote:

http://goo.gl/htEwxs

This issue should be fixed by 36.0.1985.143, which was pushed to stable channel yesterday.

It works well now,
thank you!

Also available in: Atom PDF