jstaf / onedriver

A native Linux filesystem for Microsoft OneDrive
GNU General Public License v3.0
1.94k stars 96 forks source link

GUI launcher won't open again if the mounting process is canceled #165

Closed mariosplen closed 2 years ago

mariosplen commented 3 years ago

GUI launcher won't open again if the mounting process is canceled

Steps to reproduce the behavior:

  1. Start OneDriver for the first time
  2. Click on the + sign and choose a mounting point
  3. When you are asked to enter your Microsoft credentials close the window
  4. The onedriver window will say that onedriver-launcher is not responding
  5. Click on Force Quit

The GUI launcher will no longer start

A fix is to go to the terminal and run: onedriver -w

Running on: OS: Manjaro Linux Kernel version: 5.10.59-1

jstaf commented 3 years ago

Good find - I'll check this out.

mariosplen commented 3 years ago

I updated to 0.11.2 and it is fixed

jstaf commented 3 years ago

I looked into this and the GUI just waits up to 2 minutes for the fileystem to complete the authentication process (this is the GUI "freezing") but the filesystem doesn't have any way of telling the GUI that the authentication process got cancelled. I think the correct way to happen would be via dbus. There is some work that needs to happen to fix this.

abraunegg commented 3 years ago

@jstaf

I think the correct way to happen would be via dbus.

One issue with using dbus for this approach, which has been seen with 'onedrive' is that dbus runs as 'root' and the client, runs as 'user' - and as such, socket permissions etc prevent allowing the correct communication between the client and dbus to allow notifications to be sent & read.

jstaf commented 3 years ago

I believe no special permissions are needed if we connect to the user session bus. The GUI launcher already uses dbus in this manner to start/stop the appropriate systemd services :slightly_smiling_face:

jstaf commented 2 years ago

This was indirectly fixed by #227. I rewrote the entire GUI in Go for unrelated reasons and now the "open the newly mounted directory" bit is handled in a separate thread. So now if you close the window halfway through, nothing bad happens (though the other thread still gets stuck for 120s, the user never sees this and the app continues running normally).

Anyhow, fixed :slightly_smiling_face: