New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 699067 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Feature



Sign in to add a comment

Copying large amount of HTML to the clipboard using clipboardData.setData('text/html', ...) reports a failure when it seems to succeed.

Reported by sjom...@gmail.com, Mar 7 2017

Issue description

Steps to reproduce the problem:
1. Navigate to https://jsfiddle.net/SamMiller/vb7yzwy7/ on Chrome in Android.
2. Tap on the copy button which will copy a large amount of html to the clipboard.
3. An android native message bubble will appear at the bottom of the screen saying "Failed to copy to the clipboard", but this is wrong.
4. Tap on the contenteditable and paste the contents of the clipboard, it is a very long list of dates the last of which is "23-MAY-05". The copy command has clearly succeeded (execcommand('copy') returns true).

What is the expected behavior?
The native message bubble saying "Failed to copy to the clipboard" should not appear because the copy clearly succeeded. If the copy did in fact fail, nothing should of been copied to the clipboard.

What went wrong?
An android native message bubble appears at the bottom of the screen saying "Failed to copy to the clipboard" when actually the copy seems to have succeeded.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: Chrome 56.0.2924.87 and Chrome Beta 57.0.2987.88 and Chrome Canary 59.0.3032.0  Channel: stable
OS Version: 7.1.1;Pixel C Build/N4F26O
Flash Version:

 
Cc: prashanthpola@chromium.org
Labels: triage-te
Cc: -prashanthpola@chromium.org tedc...@chromium.org
Components: Blink>DataTransfer
Labels: -Type-Bug -triage-te Type-Feature
Status: Available (was: Unconfirmed)
We are to repro this issue on Chrome Stable:56.0.2924.87, 55.0.2883.91 Device:Pixel-C / N4F26O.
Components: -Blink>DataTransfer

Comment 4 by dcheng@chromium.org, Mar 10 2017

Components: Blink>DataTransfer

Comment 5 by sjom...@gmail.com, May 12 2017

Any update on this? It's very confusing to our users to report that the copy has failed when it has actually succeeded.
Project Member

Comment 6 by sheriffbot@chromium.org, May 14 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 7 by sjom...@gmail.com, May 15 2018

This issue is still happening but slightly different now. The native message bubble still appears at the bottom of the screen saying "Failed to copy to the clipboard" and it seems the copy has actually failed.

**However, execcommand('copy') still returns true meaning detecting that this has happened is more difficult.**

The copy should work and execcommand('copy') should return true.

Comment 8 by sjom...@gmail.com, May 15 2018

And just to clarify, that was running on Chrome 66.0.3359.158 on Android 8.1.0; Pixel C Build/OPM1.171019.011.
Cc: dcheng@chromium.org
The "Failed to copy to the clipboard" is because the text being copied is beyond the limit of what Android will allow.  We are catching the following exception in that case:

05-15 12:58:17.271  8195  8195 E cr_Clipboard: Caused by: android.os.TransactionTooLargeException: data parcel size 1109668 bytes
05-15 12:58:17.271  8195  8195 E cr_Clipboard: 	at android.os.BinderProxy.transactNative(Native Method)
05-15 12:58:17.271  8195  8195 E cr_Clipboard: 	at android.os.BinderProxy.transact(Binder.java:615)
05-15 12:58:17.271  8195  8195 E cr_Clipboard: 	at android.content.IClipboard$Stub$Proxy.setPrimaryClip(IClipboard.java:170)
05-15 12:58:17.271  8195  8195 E cr_Clipboard: 	at android.content.ClipboardManager.setPrimaryClip(ClipboardManager.java:123)
05-15 12:58:17.271  8195  8195 E cr_Clipboard: 	... 10 more

+dcheng@ as the owner of ui/clipboard.  I don't know enough about the blink communication to say how we could change the codebase to ensure the execCommand returned false in this case.
Cc: pwnall@chromium.org sandeepkumars@chromium.org
 Issue 843098  has been merged into this issue.
Labels: -Pri-2 Pri-3
Status: Available (was: Untriaged)
Hitting the snooze on this and demoting to P3.

The bug still reproduces with Chrome (Canary) 69.0.3462.0 and Android OPM4 on a Pixel C. Relevant bit of logs below.

06-18 01:34:27.773 15593 15593 E JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 1109672)
06-18 01:34:27.784 15593 15593 I chromium: [INFO:CONSOLE(44)] "true", source: https://fiddle.jshell.net/SamMiller/vb7yzwy7/show/ (44)

Sign in to add a comment