Download Google Chrome Latest Version Offline

Posts about google chrome

17 January 2017

Google Chrome Cannot Read And Write To Its Data Directory

google chrome cannot read and write to its data directory, Failed to Create Data Directory Google Chrome Cannot Read and Write Its Data Directory. I've been working on a Cordova app, and I've suddenly had troubles with Chrome. I've wanted to start debugging, so I added support for a browser platform, and I use Chrome.

After running the app on Chrome, which worked before, I encountered this problem:

Failed To Create Data Directory
Google Chrome cannot read and write its data directory:
C:/Chromedevsession"
Google Chrome Cannot Read And Write To Its Data Directory


Solution 1


I solved this issue by editing the run file (platforms/browser/cordova/run) and removing the speech marks from around C:/Chromedevsession on line 33.

The line now reads:   spawn('C:/Program Files (x86)/Google/Chrome/Application/chrome.exe', ['--user-data-dir=C:/Chromedevsession', '--disable-web-security', project]);

Solution 2

Deleting Chrome -> Reinstalling Chrome - found this online
Deleting Windows registry key HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome - there's no Chrome folder or key inside the Google folder, only an Update folder
While uninstalled, using a different browser as my default browser - the command that runs the app (cordova run) didn't open another browser (I tried Firefox).

Solution 3


This is because the script that launches chrome, uses a folder location that typically can't be created with your permissions. That folder is used for history, bookmarks, cookies, etc (ie user data). This is beneficial for testing out features in Chrome (plugins, etc) and not affecting your normal instance. I don't consider it much of a concern here, more of a nuisance message. If you don't like it you could always just manually create that folder on your system as well.

You can see this here what causes the issue

switch (process.platform) {
  case 'darwin':
    spawn('open', ['-n', '-a', 'Google\ Chrome', '--args', '--disable-web-security', '--user-data-dir=/tmp/temp_chrome_user_data_dir_for_cordova_browser', project]);
    break;
  case 'win32':
    //TODO: Use regex to fix location of chrome.exe
    //TODO: Get --user-data-dir to work for windows
    spawn('C:/Program Files (x86)/Google/Chrome/Application/chrome.exe', ['--user-data-dir="C:/Chromedevsession"', '--disable-web-security', project]);
    break;
}

Since it can't use that folder, I believe it just reverts to the defaults which on Windows 10 would be

C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Default

0 comments:

Translate

Powered by Blogger.