Microsoft OneDrive repository integration error

Microsoft OneDrive repository integration error

by Susana L. -
Number of replies: 2

Hi!

We are experiencing an error when trying to integrate Microsoft OneDrive repository with Moodle 3.9 on production (2 nodes + DB PostgreSQL, shared moodledata, memcached).

The user is able to authenticate with his Microsoft account, the files are shown in the file picker, but after selecting a file the user gets the following error:   

"Cannot read file. Either the file does not exist or there is a permission problem.
 [localcachedir]/c8763eec-01d6-41bd-950f-d127f92a0d5e/78a83fb3-2256-4b9c-8b90-bf15cd1dc797/notas.png
Error code: storedfilecannotread"

* line 489 of /lib/filestorage/file_system.php: file_exception thrown
* line 348 of /lib/filestorage/file_system_filedir.php: call to file_system->validate_hash_and_file_size()
* line 1794 of /lib/filestorage/file_storage.php: call to file_system_filedir->add_file_from_path()
* line 1323 of /lib/filestorage/file_storage.php: call to file_storage->add_file_to_pool()
* line 1373 of /repository/lib.php: call to file_storage->create_file_from_pathname()
* line 313 of /repository/repository_ajax.php: call to repository::move_to_filepool()

Microsoft OneDrive settings: Supported files: internal, Default return type: internal

  • Maximum uploaded file size (maxbytes) is 2GB sitewide and the files we are trying to retrieve have a few KB (so it is not a file size issue)
  • Permissions on moodledata are set as recommended and localcachedir permissions on each node (/var/local/cache) is 777 apache:apache
  • No issues integrating with Google Drive
  • No problem with OneDrive integration with this same OneDrive account on a simpler moodle instance (1 node) (so it is not a Microsoft account issue)
  • No other issues on a 32k users production server

Any thoughts? Similar issues??

Thank you!
Best,
susana

Average of ratings: -
In reply to Susana L.

Re: Microsoft OneDrive repository integration error

by Abu Ali -
Hi dear, i am getting the same error in few files only the rest of the files can be downloaded but some of the files are showing the same error. how did you solve this problem. i appricate your answer and it will a great help for me
In reply to Abu Ali

Re: Microsoft OneDrive repository integration error

by Susana L. -
Hi Abu Ali, I didn't solve the problem...
On production server I get the error... but on a test server I am able to download all of the files... so it seems to be some infrastructure issue, cache sharing between nodes? firewall issues?? I don't know.. I didn't have more time to spend with this specific issue so I gave up sad ...
But maybe your issue is related to file sizes? I remember some people had similar issues and it was something with filesize limits...