Google Colaboratory and Google Drive integration fails - google-drive-api

I am not able to save a new notebook in my Google Drive environment.
Google Colaboratory works with predefined notebooks such as Hello, Colaboratory, but I am not able to save any into my Drive folder.
I have the Colaboratory app allowed in the Google Drive settings and really dont know how to solve it. Colaboratory communicates with Drive - it even creates the notebook files in the Google Drives folder, but when loading any notebook file it always report following Notebook loading error
There was an error loading this notebook. Ensure that the file is accessible and try again.
Neither the details of the error help much:
Failed to fetch TypeError: Failed to fetch
I was playing with the access rights of both the file and the folder and could not find any solution.
Update: Chrome 64.0.3282.167 (64 bit); Windows 10 1709. I use two users on the Chrome. Creating Notebooks works normally on different computers with my username.
This is the output from console:
Chrome Console Output

On Google Chrome, I was seeing this issue randomly and it mentioned not being able to load the file /some/google/path/thats/gone/because/this/fixed/it/client.js. I tried clearing my cache and hard reloading, and sure enough, Colab starting working again.

As with standard cookies, third-party cookies are placed so that a site can remember something about you at a later time. Both are typically used to store surfing and personalization preferences and tracking information.
Google's colaboratory uses third party cookies and your browser most likely has them disabled.
Navigate to your browser settings, search for cookies and enable third party cookies. This should hopefully fix your problem.

I had the same problem, and I just disabled AdBlock on google Colab in everything works perfectly.

try to close/pause AdBlock and reload the page, it works for me.

Related

Website/domain being blocked by google in Google Chrome

Since few days we are experiencing an issue in one of our a domain named "id-validation.us".
Google is blocking this domain on browsing from google-chrome. We tried to rectify the issue and found that google blocking all hits which is being done to id-validation.us. We are using a wildcard certificate on this domain and certificate is fine as it is working well on rest of the domain. We tried to remove the code from a web server as well but the result is still same.
Google is throwing below error once you browse the website from google-chrome. Currently, an index.html file is placed on this web-server for this domain but the response is same.
error message
Can someone help me find the solution to this problem?
You may have some automated script that may affect the computer or browser settings. Google recognizes any automatic redirection or setting-changing code in a server/website as malware.

Sharing Google Drive Realtime Documents

I have created a realtime document on Google Drive. When I attempt to share this file with someone who doesn't have my app installed, the file shares successfully, but when they click the file it says "Sorry, no preview is available".
This realtime document is a shortcut file. How do I get it to prompt the person to authorize my app?
I'm using the Realtime Playground as my example as I'm not sure of the specifics of your application.
App authorisation
When you created your application you visited the Google API Console and created a project with Drive API enabled. At some point you copied "Client ID" from the Google API Console into you application ID code.
In the realtime-playground case APP_ID is set in the javascript file rtpg.js (you might not be using JavaScript but there will be an equivalent step for other languages).
rtpg.APP_ID = '840867953062';
File creation
I believe that any drive realtime document/shortcut you created with your application will contain a reference to the creating application (mostly likely in the form of the client/application ID you obtained above).
File sharing
Once you can see your newly created Google Drive Realtime document/shortcut you can share this with somebody else using the normal Google Drive sharing methods. At this point they can see it but cannot do anything apparently useful with it. This is where I believe your application may differ from the realtime-playground example.
Integration with Chrome Web Store
On the GitHub repository for realtime-playground you'll notice a cws (Chrome Web Store) directory containing the stuff necessary to deploy the realtime-playground as Google Drive application in the Chrome Store including screenshots to be used. If you look at the manifest.json file you will see another reference to the client id:
"api_console_project_id" : "840867953062"
So if I share a realtime-playground file with somebody who doesn't have it installed, then clicking on the file in Google Drive will result in a "Connect app" popup which will try to locate the corresponding Chrome Web Store Drive app (using the common id as the key) and this will show something similar to what you might see if you found this application directly in the Chrome Web Store.
The manifest.json also contains:
"app" : { "launch" : {
"web_url" : "https://realtimeplayground.appspot.com/" } }
which tells Google Drive what to do when the installed app is called.
So my guess is that your application doesn't work like this as you don't yet have public visibility of your app in the Chrome Web Store.
See also: Create a Chrome Web Store Listing
I hope this helps.
That is fine. If you open your eyes, you will notice that Playground demo does not provide any preview either
Yet, you see, the associated app is available. You can click it and open-with works normally. Your app-created files operate similarly. They are associated with your app by default. You can open them by open with rather than by preview. Can you? No, you cannot. But that is another question.
Otherwise, I see no cleverness in associating your file with chrome extension rather than with your app.
How do I get it to prompt the person to authorize my app?
I recently had a similar question. Instead of linking your files with extension in chrome, pass the direct link, like http://your-app#fileId=..., as playground demonstrates to your shared fellow if open-with fails.
The preview seems to be another story.
Wait, Do you mean that I need to create a new fresh account to test how your file is unassociated with your app? How do you preview the files in your primary account? If you know how to preview you may answer my question, at least partially. But why do you associate authorization with preview?

Cloud Storage Download Appears to Be Malicious

I uploaded a utility in the last few days to google cloud storage.
It's a zip file containing two executables and a readme file.
I tested the download and it worked fine. I then looked into how I could see the download stats and yesterday I enabled logging.
I posted the link to a mailing list this afternoon and clicked it to verify that I had the right link and the download in chrome reports "xxx.zip appears to be malicious".
This did not happen prior to when I enabled logging, but I don't know for sure that is what caused it.
I am using a CNAME alias for the download, and I am a paying google apps customer.
The executables are not malicious in any way. They are simple utilities for doing replacements in text files. They do not access the network at all.
My question is "Why is my zip file being reported as malicious?" and is there any way to remedy this situation?
I looked around for a solution to this problem and I found the following advice:
1) Sign your EXEs. As it turns out, this advice is incorrect. While it has worked for some people, there are people who report that even signed executables are reported as malicious downloads.
2) Use SSL. SSL access is not available for google cloud storage unless you use the commondatastorage.googleapis.com or sandbox.google.com URLs. While this does might work, it doesn't resolve my problem.
3) Use the commondatastorage.googleapis.com URL. This works. The same file using the commondatastorage.googleapis.com url rather than my custom CNAME record does not report that it "appears malicious".
4) Register your site with Google Webmaster Tools. Getting around Chrome's Malicious File Warning According to this stackoverflow entry, the solution is to sign up for Google Webmaster Tools and add your site.
I have tried this one, but it has not made a change just yet. Because this is google cloud storage and not a main site, I added an index.html page, a 404 page, and ran the gsutil commands to enable web configuration within google cloud storage. I added the site to Webmaster Tools and additionally added it to Google Analytics.
I'll give solution 4 a few days to see if it pans out.
It seems like this is more of an issue with Google Chrome and not necessarily Google Cloud Storage. Chrome's methods for identifying malicious files are less than desirable right now.

Uploaded file sometimes doesn't appear on the Google Drive web page

I've observed a strange behavior of Google Drive when I uploaded several files in a row to Google Drive by calling Google Drive APIs.
Everything seems working properly, I can get correct response back from API, such as file ID and URL. But when I looked into the folder where I uploaded files by web browser, files are sometimes missing.
This issue can be resolved by accessing the following URL which should not be necessary.
https://docs.google.com/file/d/<file ID>/edit
Could it be a Google Drive bug?
I've had the same problem. Usually the file would appear after some time. But sometimes not at all!
I've also noticed discrepancies between files shown in the web UI and files shown in the Google Drive directory on my PC. I would chalk this up to Drive's bugs.
Google drive still does this.
Files can take a long time to appear on the web gui. Similarly deleted files can remain on the web gui for a long time (and you get an error if you click on them).
I would really love a way to make drive more responsive.
İf you are uploading your files inside a folder then this might cause a problem. Make sure that parent folder exists for the file that you upload.

Google Drive Offline Document File Location

Has anyone discovered where/how offline Google Documents are stored when using Google Drive in Chrome? They must be stored locally but where?
Have tried the browser cache etc but can't see it unless I'm missing something very obvious!
To clarify, the file that is stored within 'My Documents/Google Drive' is a text file with a URL, what I am looking for is where the file that the URL points to is held when in offline mode.
It turns out the offline documents are stored in the HTML5 FileSystem.
The Chrome FileSystem storage is located here on my Windows 7 machine:
C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default\File System
I added a number of large images to a document with the Chrome "Offline Docs" enabled and was able to see the FileSystem storage directory grow appropriately.
I then used the HTML5 FileSystem Explorer extension for Chrome to view the file structure of an offline document and was able to confirm that the images were, indeed being retrieved from the HTML5 FileSystem when Chrome was offline. See screenshot:
Further, it may interest you, the location where Google Drive stores offline docs in Android's file system.
sdcard/android/data/com.google.android.apps.docs/
Google Drive uses Chrome's IndexedDB for storing data about files. To see the contents, open developer console (Ctrl + Shift + I) and choose Resources tab.
This answer tells you about actual location of IndexedDB in the file system on Windows.
On Linux it's: ~/.config/google-chrome/Default/IndexedDB
On my computer (Windows 8.1 / Chrome version 41.0.2272.101 m) I found the filesystem at "C:\Users\my username\Appdata\Local\Google\Chrome\User Data\Profile 1\File System"
I needed to find it because I had some corrupted images in Google Slides (they worked on other computers or other browsers on my computer, just not in chrome on my computer). I deleted the File System directory and shazam, the images reloaded and were no longer corrupted.
Mine were all stored in
C:\users\%username%\Google Drive\
Have you downloaded Google Drive?
Offline access is available only when you’re using Chrome. See Setup Offline Access and Google Docs Offline. It seems like offline documents are encoded by Chrome and stored at some secret places, in order to force you to use Chrome.
Google drive stores the offline files in a folder called... android/data/com.google.android.apps.docs/files/pinned_docs_files_do_not_edit/
in that folder u will find the desired files.
Please be aware that...
The files that you will find can be of two formats..
1) encrypted
2) open type
If you have left unchecked the option to encrypt (by default in google drive) the files that u downloaded will be visible, but not accessible by the standard reader. every attempt to read it will be result in a failed operation.
But ... if you DISABLED the encryption in google drive, u will be able to open freely with any type of reader.