Can you please open the exception from locals panel and check what the error is?
And for root folder…I guess we are directly not able to upload there…there should be atleast one folder under it…you are getting dev because that is the first folder in your root folder
Try driveitem.parentreference.id to get parent id and then we have to use it in get file/folder activity as input to get the root folder which can be used to upload the item
https://docs.uipath.com/activities/other/latest/user-guide/office365-get-item-info
Hope this helps
Cheers