Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1783

Handle account addition with already used local folder

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.2.0
    • Component/s: Framework

      Description

      Issue

      Steps:

      • Add a new account using the local folder /home/USER/drive.
      • Delete the Engine database.
      • Add a new account using the local folder /home/USER/drive.
      2019-07-18 15:52:34 32431 140618611681088 ERROR    nxdrive.gui.api    Unexpected error
      Traceback (most recent call last):
        File "gui/api.py", line 532, in bind_server
          **kwargs,
        File "gui/api.py", line 501, in _bind_server
          starts=False,
        File "manager.py", line 661, in bind_engine
          engine_def = self.dao.add_engine(engine_type, local_folder, uid, name)
        File "engine/dao/sqlite.py", line 594, in add_engine
          (path, engine, key, name),
        File "engine/dao/sqlite.py", line 129, in execute
          return super().execute(*args, **kwargs)
      sqlite3.IntegrityError: UNIQUE constraint failed: Engines.local_folder
      

      On the GUI side, the error is "Unknown error occurrend when trying to connect".

      Fix

      We should catch the error and display a proper message.
      And add tests.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h