unknown error: failed to write prefs file
Asked Answered
D

7

15

I keep getting the error while running functional tests using runner with following:

  • selenium 2.44
  • Chrome Driver
  • Windows Server 2008 R2 Enterprise

Error:

Error Description: Listening on 0.0.0.0:7000
Starting tunnel...
UnknownError: [POST http://test.com/wd/hub/session / {"de
siredCapabilities":{"browserName":"chrome","name":"tests/intern","idle-timeout":
60,"selenium-version":"2.44.0"}}] unknown error: failed to write prefs file
(Driver info: chromedriver=2.12.301325 (962dea43ddd90e7e4224a03fa3c36a421281ab
b7),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any
stacktrace information)
Command duration or timeout: 1.06 seconds

Anyone have ever come across such issue? How do i fix this?

Dank answered 3/3, 2015 at 0:18 Comment(1)
I am using Intern 2.2.1Dank
V
27

I've recently had the same issue. The problem was caused by full C drive. Apparently chromedriver needs some space in C drive (or the drive where chrome binary file is located) to create temporary profile files and so on.

One of the solutions could be to move chrome installation to some other drive. You could use mklink command in command line window.

Veil answered 9/4, 2015 at 7:15 Comment(0)
P
7

It can be caused by executing ChromeDriver in parallel. Other errors as "failed to write first run file" or "cannot create default profile directory" may happen in that case.

My solution was to specify option user-data-dir. Two concurrent Chromedriver should not use same user data directory.

chromeOptions.AddArgument("--user-data-dir=C:\\tmp\\chromeprofiles\\profile" + someKindOfIdOrIndex);

You can of course change the path for whatever you want :)

Phonation answered 14/11, 2017 at 16:56 Comment(0)
G
3

This issue occurs if C drive disk runs out of space.The best solution to clear temp files.This solution worked for me.

Open Run command

2.Type % tmp%

3.Click on OK

4.Select all files.Delete all the files permanently.

Giaimo answered 17/2, 2018 at 12:1 Comment(1)
Worked for me ! ThanksPic
C
1

In my case, it was a consol application which should run as Administrator to gain access to the HDD

Cornerstone answered 29/9, 2021 at 5:17 Comment(0)
R
0

you have different versions of chrome on server and on node

Roma answered 10/3, 2015 at 10:20 Comment(0)
C
0

Follow These Steps

  1. Press Window key+R

  2. Type RUN

  3. Type %temp%

  4. Click Ok

  5. Press Ctrl+A

  6. Press Shift Delete

Credo answered 16/7, 2022 at 14:37 Comment(0)
L
0

If someone using Windows 10 or 11 experiences this issue while Google Drive synchronization is active, they should try turning off the synchronization of Selenium files (or just stop Google Drive). It helped me.

Leighton answered 19/8 at 20:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.