timche / gmail-desktop

:postbox: Nifty Gmail desktop app for macOS, Linux & Windows
MIT License
845 stars 91 forks source link

Can't Attach File with Drag and Drop Method #268

Closed fatihturan closed 1 year ago

fatihturan commented 3 years ago

OS macOS Version 14.0.3 (16610.4.3.1.7)

Gmail Desktop Version Version 3.0.0-alpha.19 (3.0.0-alpha.19)

Describe the bug When I dragging a file into the compose window then "Drag file here" placeholder is blinking and file can't be inserted in compose window.

Steps to reproduce the behavior

  1. Launch the Gmail Desktop
  2. Click on the "Compose" button
  3. Drag a file into compose window.

Expected behavior File should be attached in compose window.

Media Screen Recording 2021-04-01 at 06 38 46 PM

timche commented 3 years ago

Are you still having this bug? I've tried to reproduce it, but it work for me.

fatihturan commented 3 years ago

Yes, I just upgraded to Version: 3.0.0-alpha.25 (dev) but the bug still occurs:

https://user-images.githubusercontent.com/26871/114264778-8a399980-99f5-11eb-9947-cf78254592c2.mov

timche commented 3 years ago

I was able to reproduce it, but another app instance while the other just works fine. Still not sure why it happens though. Out of interest, do you happen to have this bug (#227) too where Command adds indentation? On the instance where the the drag and drop bug happens, also has the indentation bug.

fatihturan commented 3 years ago

I don't have any issue like that in the #227 at the moment.

brendanmeyer commented 3 years ago

I am also seeing this in Version: 3.0.0-alpha.27 (dev) and I don't seem to have #227 either

timche commented 3 years ago

Unfortunately this is not trivial to fix for me and I'd need everyone's help to find out what causes it. This bug also happens in my dev instance, but not in my installed one. Really weird.

brendanmeyer commented 3 years ago

is there anything that would make it easier to track down from my side, I'm glad to do what I can to help?

timche commented 3 years ago

@brendanmeyer unfortunately not. The bug seems really random to me and I also just try to figure out how to reproduce it or fix it.

weranda commented 3 years ago

I have the same problem — can't attach the image file:

https://user-images.githubusercontent.com/9132570/116220045-f7b72b00-a754-11eb-838f-fdc5df7c9b8e.mov

JohnLGalt commented 3 years ago

I'm also having the same issue at @fatihturan and @weranda have shown in their videos.

OS Windows 10 x64 20H2 (19042.928)

Gmail Desktop Version v3.0.0 αlpha 27

(Hardware as follows: https://valid.x86.fr/tf5prr )

It takes several tries, but eventually it (randomly) gets attached. Note, this is not a "it randomly works like it is supposed to" - the, for lack of a better description, staccato, repeated / rapid-fire attempt to attach a file continues to happen, it just randomly will accept the file, quite possibly due to when I release the mouse button (in terms of what is showing on the screen). Pretty much as exactly as @weranda's video above shows, it just happens to fall in at some random point of repeatedly trying.

I was using it to attach 3 pictures to an email I was sending another dev here on GitHub, and the first pic attached in 4 attempts, the second somewhere between 8 and 10 attempts, and the last took a lot more than 10 attempts, at least 15, before it caught the attachment.

timche commented 2 years ago

I finally found the root cause of this issue: The custom user agent is loading a slightly different version of Gmail and causes the drag and drop to behave weirdly in Electron.

So if you have this issue, please try disabling Use User Agent Fix or removing any custom user agent and use the default user agent instead.

Please let me know if it works for you.

fatihturan commented 2 years ago

Hi @timche I can confirm that disabling the Use User Agent Fix is solving this issue. Thanks for sharing it. ✌🏻