Browser-laptop: Fixed drag & drop for images and files broken (causes screen to go white)

Created on 15 Feb 2017  ·  27Comments  ·  Source: brave/browser-laptop

Test plan

Conclusive steps to reproduce:

  1. Start a fresh instance (on macOS)
  2. Load github.com and create an issue
  3. Try to drop a file, works.
  4. Drag a bookmark or a tab, you pick.
  5. Try to drop a file... it should now work (0.13.3 - 0.13.5 it does not work).

Original issue description

  • Did you search for similar issues before submitting this one?
    Yes.
  • Describe the issue you encountered:
    I am unable to drag any images or files into the browser for websites designed to accept this feature (ie. Hangouts; Google Drive)
  • Platform (Win7, 8, 10? macOS? Linux distro?):
    Mac OS X El Capitan
  • Brave Version (revision SHA):
    0.13.3 b4cb1f5
  • Steps to reproduce:

    1. Open Google Drive.
    2. Drag file from Finder and Drop in Browser Window.
    3. Nothing happens.
  • Actual result:
    Nothing.

  • Expected result:
    File would begin uploading to, for example, Google Drive
  • Will the steps above reproduce in a fresh profile? If not what other info can be added?
    untested
  • Is this an issue in the currently released version?
    Yes, just updated
  • Can this issue be consistently reproduced?
    Yes
  • Extra QA steps:
    1.
    2.
    3.

  • Screenshot if needed:

  • Any related issues:

OmacOS Qchecked-Win64 Qchecked-macOS Qtest-plan-specified misdrag-and-drop release-noteinclude

Most helpful comment

All 27 comments

File uploading here on GitHub is working fine for me with Brave 0.13.4 on macOS 10.12.x.

Have you tried disabling shields? Click the lion icon in the top right and switch Shields to Down.

I restarted the browser, without change. Tried it one more time and it did. I'm not sure what the reason was.

This continues to happen for me, terminating the Brave task does the trick, but this is definitely new.

While this was not observed in prior builds for me, I have noticed it with a local run of e259d61b8b05041961bbff1ce456004f4dab3e4e.

I can't repro using master and it works great with 0.13.4... We can retest once a new preview build is cut. It does fail with 0.13.5 preview 1.

Sites which I tried drag and drop using master:

  • twitter.com
  • GitHub.com
  • outlook.com

Closing- this appears to work great with 0.13.5 preview 3. Let's re-open if it happens again

I'll keep the milestone just so we can confirm that it works during testing (if it's already in our test plan, we can remove milestone)

Re-opening after seeing the issue again in 0.13.5 preview 3 ☹️

I experienced the problem here on GitHub and I believe I have better repro steps:

  • I move Brave window out of the way (over to the left or something)
  • I click the desktop. Brave does not have focus
  • I drop the image file into the text area in GitHub
  • The UI shows an animation of the image which was dragged being returned to the desktop
  • The entire window goes white and becomes unusable

@bsclifton I tried these steps, but I couldn't reproduce this error. I experience this kind of error already on 0.13.4, but for now I don't have reproduction steps, it happened 3 or 4 times till now.

Ok I managed to crash it again (0.13.4). I managed to crash it only after brave was running for a long time, the whole day.

I spent about 90 minutes trying to make this happen (in which I ran into issues caused by the Amazon S3 services being down). Regardless of those, I could not get an error to happen. Everything always worked OK. I looked at crash reports on stats.brave.com and didn't see any reports which I believe were mine OR which had information which could be helpful.

Since the steps to repro aren't nailed down, I'm going to push this to 0.13.6. We should definitely keep eyes out for it

Here's how it happens for me sometimes.

I have Google Hangouts in a pinned tab.

I open Brave (new session after completely exiting).
Open Hangouts tab. Drag & Drop works. I open a new normal tab, and navigate to Google.com.
I click off of Brave.
Click back on the Pinned Hangouts tab and Drag & Drop stops working on all tabs.

This doesn't always work, and sometimes it just happens after having Brave open for some time.

screenshot courtesy of @echosa:
screen shot 2017-03-01 at 11 30 47 am

I just tried Imgur, GitHub, Jira, and Dropbox. All of them worked flawlessly. Of course they did, since I'm trying to capture the error. :-/ I recently closed and restarted Brave. Maybe it needs to be open for a while before the drag-and-drop error occurs? (Some kind of memory leak or something maybe?) If I can get the issue to happen during a recording, I'll post it here.

I reproduced this just now and captured it on video.

Video 1: single tab, could not reproduce. Note that I had another brave window open with 15 tabs, not visible on screen/not interacted with during this screen capture, but it was running.
https://youtu.be/_KogzGSvESI

Video 2: multiple tabs, immediately reproduced
https://youtu.be/Q5PUHFNbyuk

(not sure if the # of tabs is just coincidence or meaningful; in the latter case, Brave had been running with roughly that many tabs for at least 12 hours)

Context:

  • My Brave browser window had 15 tabs open (2 gmail, 3 github, 2 google drive, 1 google sheet, 1 google calender, 3 google documents, 1 pivotal tracker, 1 zendesk)
  • I attempted to drag a PNG file from my desktop onto the Zendesk tab into a designated drop zone
  • Upon releasing the mouse click, the file icon snapped back to the desktop, but the browser didn't immediate crash
  • I then attempt to drag it onto the browser again, the icon snapped back to the desktop, I got the Mac beachball, and then in about 2 seconds Brave went white (NOTE: the video did not capture the beach ball, not sure why)
  • I force quit Brave, although I'll mention that it was not listed as 'Not Responding' (I've never seen it listed in that state when this bug occurs)

Immediately prior to this, I had launched a new Brave window with just a single fresh tab (also Zendesk), and was able to drag/drop that same file twice without issue.

Specs:
Mac 10.11.4
Brave 0.13.4
rev 71d8ffc
Muon 2.56.4
libchromiumcontent 56.0.2924.87
V8 5.6.326.50
Node.js 7.4.0
Update Channel dev
os.platform darwin
os.release 15.4.0
os.arch x64

A few other notes I had written, but did not re-verify while doing the screen captures this morning:
1) a clean removal and fresh install of Brave did not resolve the issue
2) even if I drag and item onto the Brave browser but don't release the mouse click (and for instance, drop it back in its source folder instead), brave still crashes.
3) In some cases I have observed that if I first attach a file via the "click here to attach a file" option on a web page (zendesk or gmail), which pops up a finder dialogue box to locate the desired file, then subsequent attempts to drag and drop a file onto the browser work without causing a crash.

One more observation: today Brave had been open for a while with a bunch of tabs. I needed to transfer some image files from an SD card to Google Photos, so I opened a Firefox window so that I could use drag-drop. The act of dragging images from my SD Card (via Finder) onto the Firefox browser, without interacting with Brave directly at all, caused Brave to crash with the white screen exactly as I've observed when dragging files onto Brave itself.

@gregnyc I can confirm this happened to me, too. Not with Firefox, but with Photoshop.

@KevDoy @gregnyc @echosa @NejcZdovc do you all have Brave Payments enabled? I am just fixing a bug which (when it happens) causes a crash. I don't think it's related, but I'm curious

I have payments disabled.

Sent from my iPhone

On Mar 8, 2017, at 12:48 PM, Brian Clifton notifications@github.com wrote:

@KevDoy @gregnyc @echosa @NejcZdovc do you all have Brave Payments enabled? I am just fixing a bug which (when it happens) causes a crash. I don't think it's related, but I'm curious


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Payments are currently off, but I think I had the same issue when I had them turned on, as well.

I'm taking a look

Reproduces: 0.13.3 (also 0.13.4, 0.13.5, 0.14.0)
Chromium: 56.0.2924.87

Does not reproduce: 0.13.2
Chromium: 54.0.2840.100

Conclusive steps to reproduce:

  1. Start a fresh instance
  2. Load github.com and create an issue
  3. Try to drop a file, works.
  4. Drag a bookmark or a tab, you pick.
  5. Try to drop a file, does not work.

Removing all drag and drop handlers completely from our front end still reproduces. So seems like something from the chromium upgrade.

Verified this does not reproduce on Linux and Windows, it is macOS only.

This is the commit that introduces the bug:
https://chromium.googlesource.com/chromium/src.git/+/0678253f9e9c12a1cc704721ae6e013860bb909e

In particular isValidDragTarget returns false but only after having dragged a bookmark or tab or some other UI element from the window. I think maybe something like the RenderWidget host gets set to the parent window and not the webview. Still investigating .

Update:
Before dragging the bookmark, when dragging an image onto the webcontents, evaluates this to true (which makes isValidDragTarget return true):
GetRenderViewHostID(webContents_->GetRenderViewHost()) != dragStartViewID_

After dragging the bookmark, when dragging an image onto the webcontents, evaluates this to false (which makes isValidDragTarget return false):

I suspect maybe dragStartViewID_ is not getting rest properly.

Awesome, thanks!

On Fri, Mar 17, 2017 at 1:54 PM, Brian R. Bondy notifications@github.com
wrote:

Closed #7266 https://github.com/brave/browser-laptop/issues/7266.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/brave/browser-laptop/issues/7266#event-1004889459,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AY9LGZeaKbV4zh4aAvoedHVaijeOysxFks5rmsjlgaJpZM4MCDOQ
.

Awesome job, @bbondy! 😄

Was this page helpful?
0 / 5 - 0 ratings