cancel
Showing results for 
Search instead for 
Did you mean: 

Google Docs cannot save to alfresco

bopolissimus
Confirmed Champ
Confirmed Champ
Hi All,

<ul>
  <li>Linux (Ubuntu Precise, Ubuntu Quantal, Linux Mint Nadia)</li>
  <li>alfresco-community-4.2.b linux installer</li>
  <li>Tested with browser hitting port 8080 and with apache reverse proxy sitting in front of alfresco.</li>
  <li>All alfrescos are not directly accessible from the internet, only from the LAN.</li>
</ul>

I have an alfresco 4.2.b instance which previously worked perfectly with Google Docs.  Recently I tested google docs again and, while the document will open in Google Docs, when I click on "Save to Alfresco", the save fails with "Failed to save Google Doc to Alfresco."

I thought it might be a problem with just that instance (installed WAR files into distribution tomcat), so I installed 4.2.b from scratch into separate virtual machines using the bundled installer.  Even with this fresh install however, saving in Google Docs fails the same way.

I've since tried on other alfresco installations (4.2.b, 4.2.c) and I get the same error in all of them. 

My client machines are Linux (tested with chrome and firefox).  In case it was a problem with my client, I tested on various other linux clients (some pristine virtual machines) and on a Windows 7 machine too.  Same error.

In case it was possibly due to the google account I was using, I switched to another free account.  That failed similarly.

Has anyone else seen this? How would I debug this?  I have
tomcat/shared/classes/alfresco/extension/custom-log4j.properties

and have uncommented:

log4j.logger.org.alfresco.repo.googledocs=debug

but I still see nothing in the debug logs.

Thanks in advance for any pointers.

Gerald
69 REPLIES 69

cyberjus
Champ in-the-making
Champ in-the-making
<blockcode>
13:08:16,580 DEBUG [org.alfresco.integrations.google.docs.webscripts.SaveContent] Parsed JSON: {"majorVersion":"false","description":"1.3","nodeRef":"workspace://SpacesStore/b09f5c12-7b54-4082-be53-848206ffc7c7","override":"false"}
13:08:16,582 DEBUG [org.alfresco.integrations.google.docs.webscripts.SaveContent] Saving Node to Alfresco from Google: workspace://SpacesStore/b09f5c12-7b54-4082-be53-848206ffc7c7
13:08:16,589 DEBUG [org.alfresco.integrations.google.docs.webscripts.SaveContent] Check for Concurent Users.
13:08:16,589 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Check for Concurrent Editors (Edits that have occured in the last 600 seconds)
13:08:16,606 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] OAuth Access Token Exists
13:08:16,606 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Attempt to create OAuth Connection
13:08:16,833 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Connection Created
13:08:16,839 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Google Docs Client initiated
13:08:17,562 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Revisions Found
13:08:17,562 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Revisions within threshhold found
13:08:17,562 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Get Google Docs user metadata
13:08:17,573 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] OAuth Access Token Exists
13:08:17,573 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Attempt to create OAuth Connection
13:08:17,696 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Connection Created
13:08:17,702 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Google Docs Client initiated
13:08:17,820 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Get Google Docs user metadata
13:08:17,832 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] OAuth Access Token Exists
13:08:17,832 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Attempt to create OAuth Connection
13:08:18,140 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Connection Created
13:08:18,145 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Google Docs Client initiated
13:08:18,246 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Concurrent Edits: false
13:08:18,248 DEBUG [org.alfresco.integrations.google.docs.webscripts.SaveContent] NodeRef: workspace://SpacesStore/b09f5c12-7b54-4082-be53-848206ffc7c7; ContentType: document
13:08:18,249 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Node workspace://SpacesStore/b09f5c12-7b54-4082-be53-848206ffc7c7 locked by Google Docs
13:08:18,249 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Unlock Node workspace://SpacesStore/b09f5c12-7b54-4082-be53-848206ffc7c7 from Google Docs Editing
13:08:18,325 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Get Google Document for node: workspace://SpacesStore/b09f5c12-7b54-4082-be53-848206ffc7c7
13:08:18,332 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] OAuth Access Token Exists
13:08:18,332 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Attempt to create OAuth Connection
13:08:18,535 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Connection Created
13:08:18,541 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Google Docs Client initiated
13:08:18,552 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Current mimetype: application/vnd.openxmlformats-officedocument.wordprocessingml.document; Mimetype of Google Doc: application/vnd.openxmlformats-officedocument.wordprocessingml.document
13:08:18,556 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Export format: docx
13:08:18,556 DEBUG [org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl] Export URL: https://docs.google.com/feeds/download/documents/Export?docID=14fcAggm1eRkC8CG89i3j8x6KpUIo9GHt3X8s3...
</blockcode>

cyberjus
Champ in-the-making
Champ in-the-making
I confirmed the last line - export URL gives me a document not found page on another document. However, when I changed "docID" to "id" it worked.

I am sure you already know this, but the current export url format on google docs themselves is more like:
https://docs.google.com/document/d/{DocumentId}/export?format=docx
or
https://docs.google.com/document/export?format=docx&id={DocumentId}

I am not familiar enough with the code base to make the change myself in my own install, but I could probably poke around. 

I know it must be frustrating at the mercy of Google who changes things without warning and on their own timelines.

The issue you have is that either the AMP did not install correctly (are the alfresco-googledocs-repo 2.0.3 jar and any older versions of that jar in the war file?) or the old war file is still being used.

dm_nypl
Champ in-the-making
Champ in-the-making
Jared,

I was unable to get this to work. I patched both amp files against alfresco.war and redeployed to my container (at /alfresco/tomcat/webapps) removing both the older .war file and the apps folder. I still could not save from google docs, nor create a new google doc from the share application.

i noticed the older google-docs-share jar was in alfresco/tomcat/webapps/WEB-INF/lib, so, on a lark i decided to run the two patches against the share.war app. again I removed all the older artifacts, rebooted my server, and then redeployed with the two freshly patched (alfresco and share) war files.

no luck, I am still unable to save from google docs.

jottley
Confirmed Champ
Confirmed Champ
Look at in your WEB-INF/lib directories for both alfresco and share how many jar files with the name alfresco-googledocs-repo*.jar and alfresco-googledocs-share*.jar are there?  Can you also post the start up log showing the modules being loaded.

dm_nypl
Champ in-the-making
Champ in-the-making

/opt/alfresco/tomcat/webapps/alfresco/WEB-INF/lib$ ls  alfresco-googledocs*
alfresco-googledocs-repo-2.0.3-23.jar  alfresco-googledocs-share-2.0.3-23.jar

/opt/alfresco/tomcat/webapps/share/WEB-INF/lib$ ls  alfresco-googledocs*
alfresco-googledocs-repo-2.0.3-23.jar  alfresco-googledocs-share-2.0.3-23.jar


You'll need to tell me which log i should be posting – nothing is going to the main catalina log (sorry I'm new with this system)

Thanks

jottley
Confirmed Champ
Confirmed Champ
No problem, we were all new to it at some point Smiley Happy We just want you to be successful. 

We are looking for the alfresco.log file. 

It does look like you cross installed them (which shouldn't be causing the issue you are seeing, but we will want to clean that up eventually).  First lets look at the alfresco.log file. You should see in it a section that will state the number of modules found and which ones it is starting or installing.  It should look like this:


22:39:34,488 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Found 1 module(s).
22:39:34,583 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Starting module 'org.alfresco.integrations.google.docs' version 2.0.3


Just post that section and we will try to move forward from there.

dm_nypl
Champ in-the-making
Champ in-the-making

01:38:58,204 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Starting module 'org.alfresco.integrations.google.docs' version 2.0.3.
01:38:58,554 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Starting module 'org.alfresco.integrations.share.google.docs' version 2.0.3.


I saw this pop up a little later.

01:39:23,516 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'googledocs' subsystem, ID: [googledocs, v2]
01:39:23,911 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'googledocs' subsystem, ID: [googledocs, v2] complete


Good news is that I was able to create a document in google docs and then save it back to alfresco, but now the file isn't displaying in the alfresco file viewer. I get an error pop up that says "The preview could not be loaded from the server"

the trace im getting in the log looks like


Caused by: org.alfresco.scripts.ScriptException: 04230089 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 04230088 Failed to create directory for file storage: /opt/alfresco/tomcat/temp/Alfresco/2013/5/23/1/44


getting closer though!

dm_nypl
Champ in-the-making
Champ in-the-making
Somehow the permissions starting at /opt/alfresco/tomcat/temp/Alfresco/2013/ were changed from my user accounts to root:root. So after chowning the dir back to my account. Everything seems to be working.

jottley
Confirmed Champ
Confirmed Champ
Very Good!  Glad to hear things are working again.