title: Google App Engine with Google Drive integration
body: <p>I am making an application which is deployed in Google App Engine and it uses Google Drive to share documents with its users.</p>
  
  <p>I have followed the following tutorial: <a href="https://developers.google.com/drive/api/v3/quickstart/java" rel="nofollow noreferrer">https://developers.google.com/drive/api/v3/quickstart/java</a> , my code is exactly the same.</p>
  
  <p>but something weirds happens, sometimes it works and sometimes I get the following error: </p>
  
  <pre><code>INF/classes/tokens/StoredCredential (Read-only file system)
  java.io.FileNotFoundException: /base/data/home/apps/e~eulen-efqm/0-14-0-12.426618281033040373/WEB-INF/classes/tokens/StoredCredential (Read-only file system)
      at java.io.FileOutputStream.open0(Native Method)
      at java.io.FileOutputStream.open(FileOutputStream.java:270)
      at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:213)
      at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:162)
      at com.google.api.client.util.store.FileDataStoreFactory$FileDataStore.save(FileDataStoreFactory.java:108)
      at com.google.api.client.util.store.AbstractMemoryDataStore.set(AbstractMemoryDataStore.java:96)
      at com.google.api.client.auth.oauth2.DataStoreCredentialRefreshListener.makePersistent(DataStoreCredentialRefreshListener.java:94)
      at com.google.api.client.auth.oauth2.DataStoreCredentialRefreshListener.onTokenResponse(DataStoreCredentialRefreshListener.java:79)
      at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:493)
      at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217)
      at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:868)
      at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
      at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
      at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
      at com.eulen.google.efqm.googledrive.operaciones.OperacionesGeneralesGoogle.getContent(OperacionesGeneralesGoogle.java:75)
      at com.eulen.google.efqm.googledrive.operaciones.OperacionesGeneralesGoogle.getFolder(OperacionesGeneralesGoogle.java:34)
      at com.eulen.google.efqm.googledrive.operaciones.OperacionesDirectoriosGoogle.getGoogleSubFolders(OperacionesDirectoriosGoogle.java:41)
      at com.eulen.google.efqm.googledrive.operaciones.OperacionesDirectoriosGoogle.getGoogleRootFolders(OperacionesDirectoriosGoogle.java:51)
  </code></pre>
  
  <p>the error happens in the <code>execute()</code> method. In localhost it always works perfectly tho.</p>
  
  <p>What could the problem be? Thanks</p>