Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B3desk 1.2.7 - upload document depuis nextcloud ne fonctionne pas #130

Closed
BHoury opened this issue May 22, 2024 · 2 comments
Closed

B3desk 1.2.7 - upload document depuis nextcloud ne fonctionne pas #130

BHoury opened this issue May 22, 2024 · 2 comments
Assignees
Labels
bug Une fonctionnalité existante a un comportement imprévu

Comments

@BHoury
Copy link
Collaborator

BHoury commented May 22, 2024

Bonjour,

Depuis la version 1.2.7 l'upload des documents depuis nuage vers la visio ne fonctionne plus.
Voici les logs d'erreur :

[2024-05-22 13:10:24,227] INFO in bbb: Add document on BigBLueButton room creation for file adm-accueil.pdf
[2024-05-22 13:10:34,367] INFO in meeting_files: Service requesting file url adm-accueil.pdf
[2024-05-22 13:10:35,180] ERROR in app: Exception on /ncdownload/0/204/06ed3fe14d3c9550b6439b98e19901ed8a73d748/adm-accueil.pdf [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1473, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 882, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/bbb-visio/b3desk/endpoints/meeting_files.py", line 612, in ncdownload
    client.download_sync(**kwargs)
  File "/usr/local/lib/python3.11/site-packages/webdav3/client.py", line 484, in download_sync
    self.download(local_path=local_path, remote_path=remote_path, progress=progress, progress_args=progress_args)
  File "/usr/local/lib/python3.11/site-packages/webdav3/client.py", line 397, in download
    self.download_file(local_path=local_path, remote_path=remote_path, progress=progress,
  File "/usr/local/lib/python3.11/site-packages/webdav3/client.py", line 67, in _wrapper
    res = fn(self, *args, **kw)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/webdav3/client.py", line 458, in download_file
    total = int(response.headers['content-length'])
                ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/structures.py", line 52, in __getitem__
    return self._store[key.lower()][1]
           ~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'content-length'
[2024-05-22 13:10:35,213] INFO in users: Nextcloud login for user <User 1544> not to be refreshed for 6 days, 22:25:39.750044
[2024-05-22 13:10:46,351] INFO in users: Nextcloud login for user <User 1544> not to be refreshed for 6 days, 22:25:50.888243
[2024-05-22 13:10:46,446] INFO in bbb: Add document on BigBLueButton room creation for file adm-accueil.pdf

Cdt
Benjamin

@LoanR
Copy link
Collaborator

LoanR commented May 27, 2024

Apps ne renvoie plus le token d'identification Nextcloud de l'utilisateur.

> curl --location --request POST 'https://portail.apps.education.fr/api/nctoken' --header 'X-API-KEY: [APPS_API_KEY] --header 'Content-Type: application/json' --data-raw '{"username":[USER] }'

Error: Error while retrieving Nextcloud token for user [USER] [restapi.nextcloud.getNcToken.tokenRequestError]

D'après Eole qui s'occupe du portail Apps :

Côté portail Apps, aucun changement n'a été effectué sur cette API.
Le message d'erreur remonté indique que le portail Apps n'a pas réussi à récupérer le jeton utilisateur auprès de son instance Nextcloud.
Est ce que la clé API aurait pu être changée côté nextcloud (clé de l'application sessiontoken) ?
Si c'est le cas, il faudra mettre à jour la variable de configuration nextcloud.sessionTokenKey du portail Apps.

L'enquête continue auprès de l'équipe qui s'occupe des instances Nextcloud...

@LoanR
Copy link
Collaborator

LoanR commented Jul 25, 2024

Le client webdav a introduit une regression et échouait s'il manquait la clé 'content-length'.

Fixed by a3b8514

@LoanR LoanR closed this as completed Jul 25, 2024
@LoanR LoanR added the bug Une fonctionnalité existante a un comportement imprévu label Jul 25, 2024
@LoanR LoanR self-assigned this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Une fonctionnalité existante a un comportement imprévu
Projects
None yet
Development

No branches or pull requests

2 participants