Drive Account Type setting as "PERSONAL" is lost after each sync with OneDrive

Description

Hello,

I have recently encountered a bug in FreeNAS concernig Cloud Credentials for OneDrive. The issue is that starting May (I've pinpointed exactly based on the last successfull sync) the setting for Drive Account Type in Cloud Credentials (in this case "PERSONAL") is lost. Practically I have to go and set it back manually again after each sync ocurrs. Then the sync runs ok for one time and immediately the setting is lost and at the next sync I get an error saying: FAIL:"PERSONAL" signalling that the Drive Account Type setting in Cloud Credentials is lost.

I also get the following error when I try to set another folder to sync on the same remote without first refilling this setting in Cloud Credentials after is being lost:

"Error: Traceback (most recent call last):
File "/usr/local/lib/python3.6/ site-packages/middlewared/ main.py", line 167, in call_method
result = await self.middleware.call_method( self, message)
File "/usr/local/lib/python3.6/ site-packages/middlewared/ main.py", line 1098, in call_method
return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
File "/usr/local/lib/python3.6/ site-packages/middlewared/ main.py", line 1046, in _call
return await methodobj(*args)
File "/usr/local/lib/python3.6/ site-packages/middlewared/ schema.py", line 664, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.6/ site-packages/middlewared/ plugins/cloud_sync.py", line 549, in list_directory
return await self.ls (dict(cloud_sync, credentials=credentials), path)
File "/usr/local/lib/python3.6/ site-packages/middlewared/ plugins/cloud_sync.py", line 553, in ls
with RcloneConfig(config) as config:
File "/usr/local/lib/python3.6/ site-packages/middlewared/ plugins/cloud_sync.py", line 59, in _enter_
config.update(dict(self.cloud_ sync["attributes"], **self.provider.get_task_ extra(self.cloud_sync)))
File "/usr/local/lib/python3.6/ site-packages/middlewared/ plugins/../rclone/remote/ onedrive.py", line 28, in get_task_extra
}[task["credentials"][" attributes"].get("drive_type", "")]
KeyError: 'personal'"

What I found very strange is that when I try to set again the remote with rclone config immediately after I input the tokken I get the following error:

"Failed to save new tokken in config file: section "onedrive" noy found" / I will attach a print screen from rclone config.

I should mention also that I have used both methods to link the OneDrive account: the old one without Client ID and Secret Key and the new one with Azure portal and both Client ID and Secret Key. In both cases the behavior is the same, I can perform the sync with OneDrive but immediately after the sync the setting of "PERSONAL" for Drive Account Type is lost and I receive the error above with FAIL:"PERSONAL" so I'm guessing there is a bug in FreeNAS which was introduced with U4.1 and was not solved in U5.

Problem/Justification

None

Impact

None

duplicates

SmartDraw Connector

Katalon Manual Tests (BETA)

Activity

Show:

Ion Manescu August 28, 2019 at 7:51 PM

Thanks for the confirmation. Hardly waiting for it! Best regards.

Dru Lavigne August 28, 2019 at 11:29 AM

the fix will be in U6 which is slated for September 10.

Ion Manescu August 28, 2019 at 10:50 AM

Hello and thanks for taking care. Do you know when U7 will be available? I see that the fix will be included in U7.

Vladimir Vinogradenko August 28, 2019 at 8:01 AM

Yes, we've already fixed this. , thank you for your feedback.

Ion Manescu August 27, 2019 at 12:09 PM

Hi Dru, I have uploaded the debug file as private attachment, can you please change the status from BLOCKED? Or do you need something else?

Duplicate
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

More fields

Katalon Platform

Created August 26, 2019 at 9:05 AM
Updated July 1, 2022 at 4:34 PM
Resolved August 28, 2019 at 8:01 AM