Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21550

Nuxeo should not display an error page for Live Connect for Google documents if the credential file is missing.

    XMLWordPrintable

    Details

      Description

      If a the token associated with a Live Connect for Google document is deleted Nuxeo will display an error page when accessing the document.

      In some cases the error page may be displayed when accessing the the container of the document as well.

      Furthermore the log will contain errors like the following:

      2017-01-30 23:00:00,147 ERROR [Nuxeo-Work-blobProviderDocumentUpdate-875] [org.nuxeo.ecm.core.work.WorkManagerImpl] Uncaught error on thread Nuxeo-Work-blobProviderDocumentUpdate-875
      org.nuxeo.ecm.core.api.NuxeoException: No credentials found for user xxx@yyy.com and service googledrive
              at org.nuxeo.ecm.liveconnect.core.AbstractLiveConnectBlobProvider.getCredential(AbstractLiveConnectBlobProvider.java:285)
              at org.nuxeo.ecm.liveconnect.google.drive.GoogleDriveBlobProvider.getService(GoogleDriveBlobProvider.java:497)
              at org.nuxeo.ecm.liveconnect.google.drive.GoogleDriveBlobProvider.getDriveFile(GoogleDriveBlobProvider.java:533)
              at org.nuxeo.ecm.liveconnect.google.drive.GoogleDriveBlobProvider.retrieveFile(GoogleDriveBlobProvider.java:513)
              at org.nuxeo.ecm.liveconnect.core.AbstractLiveConnectBlobProvider.getFile(AbstractLiveConnectBlobProvider.java:261)
              at org.nuxeo.ecm.liveconnect.core.AbstractLiveConnectBlobProvider.toBlob(AbstractLiveConnectBlobProvider.java:204)
              at org.nuxeo.ecm.liveconnect.core.AbstractLiveConnectBlobProvider.readBlob(AbstractLiveConnectBlobProvider.java:97)
              at org.nuxeo.ecm.core.blob.BlobManagerComponent.readBlob(BlobManagerComponent.java:234)
              at org.nuxeo.ecm.core.storage.BaseDocument.getValueBlob(BaseDocument.java:459)
              at org.nuxeo.ecm.core.storage.BaseDocument.readComplexProperty(BaseDocument.java:645)
              at org.nuxeo.ecm.core.storage.BaseDocument.readComplexProperty(BaseDocument.java:660)
              at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.readDocumentPart(SQLDocumentLive.java:172)
              at org.nuxeo.ecm.core.api.DocumentModelFactory.createDataModel(DocumentModelFactory.java:208)
              at org.nuxeo.ecm.core.api.AbstractSession.getDataModel(AbstractSession.java:1966)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$1.run(DocumentModelImpl.java:492)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$1.run(DocumentModelImpl.java:489)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$RunWithCoreSession.execute(DocumentModelImpl.java:403)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.loadDataModel(DocumentModelImpl.java:494)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getDataModel(DocumentModelImpl.java:503)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getPart(DocumentModelImpl.java:1340)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getProperty(DocumentModelImpl.java:1387)
              at org.nuxeo.ecm.liveconnect.core.AbstractLiveConnectBlobProvider.checkChangesAndUpdateBlob(AbstractLiveConnectBlobProvider.java:125)
              at org.nuxeo.ecm.liveconnect.update.worker.BlobProviderDocumentsUpdateWork.work(BlobProviderDocumentsUpdateWork.java:72)
              at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:416)
              at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransactionAndCheckExceptions(AbstractWork.java:377)
              at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:338)
              at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      

      (though this may not be a bug)

      For a simple example try the following:

      • Using a Nuxeo server with Live Connect installed and configured for Google Drive
      • Create a File document and attach a file from Google Drive
      • Delete the token for the user in Home -> Cloud Services
      • Try to access the File

      Instead the platform should disable Live-Connect-related features, or at least have a user-friendly error message.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h