11 second delay between clicking bookmark shortcut and start execution of script

As the title says, I click the shortcut created with the fuction “Add shortcut to bookmarks bar” and then the UI.Vision dialog pops up. Then it waits for about 11 seconds before starting execution.

Is there a way to remove this delay?

To demonstrate I extracted this script:

  "Name": "prompt test speed",
  "CreationDate": "2023-2-9",
  "Commands": [
      "Command": "store",
      "Target": "!REPLAYSPEED",
      "Value": "FAST",
      "Description": ""
      "Command": "prompt",
      "Target": "Enter opportunity number",
      "Value": "opportunity",
      "Description": ""
      "Command": "open",
      "Target": "https://www.google.com/search?q=${opportunity}",
      "Value": "",
      "Description": ""

Bookmark doesn’t work for me, so I cant test.

Specify the version of ui vision you use and the browser and operating system.

I use version 6.2.6 with firefox and this problem doesn’t exist, everything works perfectly

1 Like

I’m using version 8.2.7 of UI.Vision and Chrome version 110.0.5481.78 (Official build) (64-bits). Operating system is Windows 10 Home 21H2 19044.2486.

Hi, can you please add a video? For me all works fine (Win 10):

PS: Minor issue: in your macro you write

  "Command": "store",
  "Target": "!REPLAYSPEED",
  "Value": "FAST",

but it should be

  "Command": "store",
  "Target": "fast",
  "Value": "!REPLAYSPEED",

but that is not the issue here.

1 Like

Thanks for your reply!

Since I cannot upload video’s as a new user here’s a wetransfer with the video: https://we.tl/t-hST2eD4Ygf

I removed the replayspeed command so it’s only the bare functionality that is being tested.

I see it now, strange. To test this further, can you please post the bookmarklet code here? You find it when you select the bookmark and click “Edit”:

Here it is:

javascript:(function() {try {var evt = new CustomEvent('kantuRunMacro', {detail: {name: "prompt test speed",from: 'bookmark',storageMode: 'browser',closeRPA: 1}});window.dispatchEvent(evt);} catch (e) {alert('UI.Vision RPA Bookmarklet error: ' + e.toString());}})();

I reported this issue in Oct 2022. It’s a bug introduced in UI Vision Version 8…

No fix yet, you have to use UI Vision 6.2.8 (before the bug was introduced). Search the forum for;

10 second delay before

To see my Oct 2022 post with a link to ver 6.2.8

1 Like

@CFB_IT_Support Thanks for the hint to your 10 seconds delay post.

Everyone: The challenge for us is to recreate the issue. All works fine on our test systems, as shown in the video above. Once we find a way to recreate the issue, we can debug and fix it. So any hints on why and when this bug happens are welcome.

I’ve tested some more. In firefox everything works fine, however for my work it needs to work on Chrome.

When I test on another pc (win10 EN) with chrome it also has the delay. So that’s two devices where the same issue is happening in chrome

I’ve profiled in the developer tools and although I can’t profile from the start (it takes some time to press F12 and Ctrl+e) I do have a chrome profile log which might help: WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free In that profile the script is started around 8000ms

Furthermore you can see below in the profiler screenshot that every 1 second some task gets executed and then waits for a second again. So I’m guessing that there’s some code that checks something every second, and if it’s not ok yet it waits for a second. This 10 times it seems.

If I can be of help tell me :wink:

Thanks for the details. Do you have any special extensions (etc) installed on both machines?

I’ve tested without any extensions active and the problem persists.

Here are my (otherwise all activated) extensions:

Another question: Does the delay always happen, or only when a certain website is loaded?

For example, if you have e. g. https://ui.vision loaded in the browser and then click the bookmarklet, does it start with delay, too?

The delay always happen no matter what site is open. Except in a new tab it does nothing.

I’ve tested with other commands as well, same delay.

Another observation was made as I was testing with two bookmark shortcuts. When I alternate the shortcuts, then I see that the wait period is before loading the requested makro.
I play Makro A from bookmarks forlder
Next I play Makro B from bookmarks folder → Gui pops us and during the first 10 seconds I still see Makro A and only then Makro B is loaded.

Delay sux, I’m getting it too

This seems to happen when you don’t have XModules installed. The easiest way to fix this is to simply install them.

However, if you can’t install this or don’t want to then you can bypass it by editing src\services\filesystem\index.ts

    prev[camel] = (() => {
      const fn = (params: any) => pReady.then(() => {
        pendingRequestCount += 1
        return nativeHost.invokeAsync(method, params)
        (data) => {
          pendingRequestCount -= 1
          return data
        e => {
          // *** Change this line here ***
          pendingRequestCount = 0
          // Note: Looks like for now whenever there is an error, you have to reconnect native host
          // otherwise, all commands return "Disconnected" afterwards
          const typeSafeAPI = <NativeFileAPI>(<any>api)
          typeSafeAPI.reconnect().catch(() => {})
          throw e

      return fn

@admin Hopefully this gives you a place to debug from. When it fails with XModules not installed, it returns this error:

Error: Specified native messaging host not found.
    at index.ts:134:1
    at KantuFileAccessHost.processResponse (index.ts:60:1)
    at KantuFileAccessHost.disconnect (index.ts:105:1)
    at KantuFileAccessHost.handleDisconnect (index.ts:75:1)

Depending on how you want to handle these errors, I would have it return straight away if it doesn’t find the native messaging host. Other errors could continue making requests as it is now.


This issue is fixed meanwhile. Thanks for all the useful hints!