[Bug] [Issue #400] Error - Command Line does not work (..."It seems you have to enable File Access" message)


i got an html which should run by a script.
But i always get the Error “It seems you have to enable File Access…”.
The problem is that I have granted this.

It seems that this doesnt work on Ubuntu 17.10 with Chrome Version 56.0.2924.87 (64-bit).
So i try Firefox, same here but in Firefox I do not even have the opportunity to grant the file access. The about:addons page shows no seperate settings.

Hope that someone can help me.



Is this a Kantu problem? Kantu does not require and does not ask for file access. => a screenshot of the error would be helpful.

So here are two Screenshots from the issue.

Thanks for the screenshots (and ignore my first answer). By default Chrome blocks extensions from getting access to file:// URLs (loaded local web pages). You need to allow this file (URL) access in the extension settings:

  • On the Chrome extension page chrome://extensions/ find Kantu and click on “Details”
  • Then switch on file access:

Access to file URLs is needed for the command line feature of Kantu (run macros via command line) to work (like in this case) or if you want Kantu to automate web pages that are loaded as files.

PS: We will update the somewhat confusing error message in the next release. It should then say “…allow access to file URLs” instead of file access.


for me the error message was understandable.

My issues is that i granted the file access and get the error anyway.
So i tested it on Firefox. Result was that i get the same error message.
But in Firefox i didn’t even find the possibility to granted the file access.

Oh… that is different story then. And to clarify: The message appears and the command line does not work? I ask, because it could also be that the message just shows up shortly and everything works fine.

=> Let us test this and get back to you. From the screenshots, you are using Kantu on Linux?

Yes, and in Chrome happens Nothing until i manually click the error message away. Then Kantu starts to work.
Now i find out, that Firefox ignores the error after 10-15 Seconds and continues with the script.
So it works for me now (when i use Firefox for that).

I have the same issue here.

Hey guys for everyone who have this issue try this:
Open your generated html file in text editor.
Find 2000 value and replace it with 5000. Save.
So far this works for me.

Looks like chrome (in my case) is not fully loaded before launching kantu script.
Hope that helps.
Please comment!
If this resolves the issue for everyone might be developers will hardcode it to default.

Thank you, commensal.

Unfortunately, adding additional timeout does not seem to solve the problem for me. I upped the timeout to 5000 and then to 10000. I tried on both Chrome and Firefox.

Additionally, unlike matt, for me…

  1. In Chrome, Kantu does NOT start to work after manually clicking the error message away.
  2. In Firefox, Kantu does NOT continue to run after 10-15 seconds

Any additional ideas would be greatly appreciated.

@matt_k Is this on Windows, Mac or Linux? Also, can you please post the command line that you are using to start Chrome or Firefox?

@commensal You are right, the default timeout of 2 seconds is too short sometimes. We think of changing it - or removing it. The side effect of removing it is that users that forget to allow file access for Kantu will get no error message when they use the command line - it would just not work. That is why we added this check in the first place.

Ok guys, I’m trying another workaround for this annoying issue since the timeout didn’t work for me in the long run.
I figured if I let Chrome open a window before opening Kantu script I might have a shot for clearing.
So I followed my own redirection solution here.

So you need to create an html file with content:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="refresh" content="5; url=file:///C:/Path/To/Your/Actual/file.html?direct=1">

If you need to close the browser after test suite is done place close=1 here in file path as well.
I’m not solving any issues with Kantu I just try to trick Chrome to get around a mysterious bug I don’t know of.
And as before this works me. At least so far. As usual please comment. Thanks.