-
Type: Bug
-
Status: Resolved
-
Priority: Blocker
-
Resolution: Fixed
-
Affects Version/s: 4.1.1
-
Fix Version/s: 4.1.2
-
Component/s: Remote client
-
Environment:Windows
-
Tags:
-
Sprint:nxDrive 11.1.6
-
Story Points:1
Issue
From anywhere in a synced folder:
- Right click > New File
- Select anything, let's say "Microsoft Office Word"
- There is now a file named "Nouveau Document Microsoft Word.docx", try to change its name before pressing the Enter key to validate.
- Windows will not allow the rename and keep saying "the file is opened in Nuxeo Drive".
Here are logs:
2019-04-08 10:16:32 4500 3828 INFO nxdrive.engine.processor Executing processor on <DocPair[5] local_path=WindowsPath('Super Mario Bros !/Nouveau Document Microsoft Word.docx'), remote_ref='', local_state='created', remote_state='unknown', pair_state='locally_created', filter_path=None>(0) 2019-04-08 10:16:32 4500 3828 DEBUG nxdrive.engine.processor Calling _synchronize_locally_created() on doc pair <DocPair[5] local_path=WindowsPath('Super Mario Bros !/Nouveau Document Microsoft Word.docx'), remote_ref='', local_state='created', remote_state='unknown', pair_state='locally_created', filter_path=None> 2019-04-08 10:16:32 4500 3828 DEBUG nxdrive.engine.processor Soft locking WindowsPath('Super Mario Bros !/Nouveau Document Microsoft Word.docx') 2019-04-08 10:16:32 4500 3828 DEBUG nxdrive.client.local_client Getting xattr 'ndrive' from WindowsPath('//?/C:/Users/Windows10/Documents/Nuxeo Drive/Super Mario Bros !/Nouveau Document Microsoft Word.docx'): '' 2019-04-08 10:16:32 4500 3828 DEBUG nxdrive.engine.processor Entered _synchronize_locally_created, parent_pair=<DocPair[2] local_path=WindowsPath('Super Mario Bros !'), remote_ref='defaultSyncRootFolderItemFactory#default#c07b12b8-7956-4607-ae2d-26a9fc0c8ed1', local_state='synchronized', remote_state='synchronized', pair_state='synchronized', filter_path=None> 2019-04-08 10:16:32 4500 3828 INFO nxdrive.engine.processor Creating remote document 'Nouveau Document Microsoft Word.docx' in folder 'Super Mario Bros !' 2019-04-08 10:16:32 4500 3828 DEBUG nxdrive.client.local_client Getting xattr 'ndrive' from WindowsPath('//?/C:/Users/Windows10/Documents/Nuxeo Drive/Super Mario Bros !/Nouveau Document Microsoft Word.docx'): '' 2019-04-08 10:16:32 4500 3828 DEBUG nuxeo.client Calling 'http://192.168.0.109:8080/nuxeo/api/v1/upload' with headers={'Content-Type': 'application/json', 'X-NXDocumentProperties': '*', 'X-NXRepository': 'default', 'X-Application-Name': 'Nuxeo Drive', 'X-Client-Version': '4.1.2', 'User-Agent': 'Nuxeo Drive/4.1.2', 'Accept': 'application/json, */*', 'X-User-Id': 'Administrator', 'X-Device-Id': 'cb066508fd2511e887b1080027a1b76a', 'Cache-Control': 'no-cache'}, params=None and cookies=<RequestsCookieJar[Cookie(version=0, name='JSESSIONID', value='A928A998C34E308FCBA90192362B9B36.nuxeo', port=None, port_specified=False, domain='192.168.0.109', domain_specified=False, domain_initial_dot=False, path='/nuxeo', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={'HttpOnly': None}, rfc2109=False), Cookie(version=0, name='X-Authentication-Token', value='01562226-503b-4046-9f8f-d47b31c4ecb3', port=None, port_specified=False, domain='192.168.0.109', domain_specified=False, domain_initial_dot=False, path='/nuxeo', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={}, rfc2109=False)]> 2019-04-08 10:16:32 4500 3828 DEBUG urllib3.connectionpool http://192.168.0.109:8080 "POST /nuxeo/api/v1/upload HTTP/1.1" 201 58 2019-04-08 10:16:32 4500 3828 DEBUG nuxeo.client Response from 'http://192.168.0.109:8080/nuxeo/api/v1/upload': '{"batchId":"batchId-a0c0f730-41ce-4da6-abe7-2e8cdaacc96e"}' with cookies <RequestsCookieJar[Cookie(version=0, name='JSESSIONID', value='A928A998C34E308FCBA90192362B9B36.nuxeo', port=None, port_specified=False, domain='192.168.0.109', domain_specified=False, domain_initial_dot=False, path='/nuxeo', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={'HttpOnly': None}, rfc2109=False), Cookie(version=0, name='X-Authentication-Token', value='01562226-503b-4046-9f8f-d47b31c4ecb3', port=None, port_specified=False, domain='192.168.0.109', domain_specified=False, domain_initial_dot=False, path='/nuxeo', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={}, rfc2109=False)]> 2019-04-08 10:16:32 4500 3828 DEBUG nuxeo.client Calling 'http://192.168.0.109:8080/nuxeo/api/v1/upload/batchId-a0c0f730-41ce-4da6-abe7-2e8cdaacc96e/0' with headers={'Cache-Control': 'no-cache', 'X-File-Name': 'Nouveau%20Document%20Microsoft%20Word.docx', 'X-File-Size': '0', 'X-File-Type': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'Content-Length': '0', 'Content-Type': 'application/json', 'X-NXDocumentProperties': '*', 'X-NXRepository': 'default', 'X-Application-Name': 'Nuxeo Drive', 'X-Client-Version': '4.1.2', 'User-Agent': 'Nuxeo Drive/4.1.2', 'Accept': 'application/json, */*', 'X-User-Id': 'Administrator', 'X-Device-Id': 'cb066508fd2511e887b1080027a1b76a'}, params={} and cookies=<RequestsCookieJar[Cookie(version=0, name='JSESSIONID', value='A928A998C34E308FCBA90192362B9B36.nuxeo', port=None, port_specified=False, domain='192.168.0.109', domain_specified=False, domain_initial_dot=False, path='/nuxeo', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={'HttpOnly': None}, rfc2109=False), Cookie(version=0, name='X-Authentication-Token', value='01562226-503b-4046-9f8f-d47b31c4ecb3', port=None, port_specified=False, domain='192.168.0.109', domain_specified=False, domain_initial_dot=False, path='/nuxeo', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={}, rfc2109=False)]> 2019-04-08 10:16:52 4500 3828 DEBUG urllib3.connectionpool http://192.168.0.109:8080 "POST /nuxeo/api/v1/upload/batchId-a0c0f730-41ce-4da6-abe7-2e8cdaacc96e/0 HTTP/1.1" 500 None 2019-04-08 10:16:52 4500 3828 DEBUG nuxeo.client Calling 'http://192.168.0.109:8080/nuxeo/api/v1/upload/batchId-a0c0f730-41ce-4da6-abe7-2e8cdaacc96e/0' with headers={'Cache-Control': 'no-cache', 'X-File-Name': 'Nouveau%20Document%20Microsoft%20Word.docx', 'X-File-Size': '0', 'X-File-Type': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'Content-Length': '0', 'Content-Type': 'application/json', 'X-NXDocumentProperties': '*', 'X-NXRepository': 'default', 'X-Application-Name': 'Nuxeo Drive', 'X-Client-Version': '4.1.2', 'User-Agent': 'Nuxeo Drive/4.1.2', 'Accept': 'application/json, */*', 'X-User-Id': 'Administrator', 'X-Device-Id': 'cb066508fd2511e887b1080027a1b76a'}, params={} and cookies=<RequestsCookieJar[Cookie(version=0, name='JSESSIONID', value='A928A998C34E308FCBA90192362B9B36.nuxeo', port=None, port_specified=False, domain='192.168.0.109', domain_specified=False, domain_initial_dot=False, path='/nuxeo', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={'HttpOnly': None}, rfc2109=False), Cookie(version=0, name='X-Authentication-Token', value='01562226-503b-4046-9f8f-d47b31c4ecb3', port=None, port_specified=False, domain='192.168.0.109', domain_specified=False, domain_initial_dot=False, path='/nuxeo', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={}, rfc2109=False)]> 2019-04-08 10:16:52 4500 3828 DEBUG urllib3.connectionpool Resetting dropped connection: 192.168.0.109
Worst, if you restart Drive, the synchronization will be endless because of an upload error:
2019-04-08 10:23:43 2108 6604 INFO nxdrive.engine.processor UploadError: unable to upload file 'Nouveau Document Microsoft Word.docx' (source: HTTPError(500), error: java.net.SocketTimeoutException, server trace: None) 2019-04-08 10:23:43 2108 6604 WARNING nxdrive.engine.processor Delaying conflicted document: <DocPair[5] local_path=WindowsPath('Super Mario Bros !/Nouveau Document Microsoft Word.docx'), remote_ref='', local_state='created', remote_state='unknown', pair_state='locally_created', filter_path=None> 2019-04-08 10:23:43 2108 6604 DEBUG nxdrive.engine.processor Postpone action on document(Upload): <DocPair[5] local_path=WindowsPath('Super Mario Bros !/Nouveau Document Microsoft Word.docx'), remote_ref='', local_state='created', remote_state='unknown', pair_state='locally_created', filter_path=None>
Cause
In NXPY-88, we passed the file descriptor to the requests module when doing a one-shot upload. This is a good way of doing things, but in our scenario and particular use with Drive, this is problematic. This is something we have to do differently.