a week ago
Hello, we are currently getting an Error with one of are Edge browser process's when it tries to invoke JavaScript. We are getting the error:
| ERROR: Internal : Failed to perform step 2 in Navigate Stage 'Inject and run cookie javascript' on page 'Login' - JavaScript invoker returned the following error message: Attempted to Invoke JavaScript without Web Driver |
The Web Driver, and Edge version appear to be the same version (150).
The navigation stage throwing the error itself is made up of 2 parts.
The first action is a insert JavaScript function which sets up the script we run, the second stage is a invoke JavaScript function which executes the function set in stage 1 (the script is stored in the data item [JS-MODSESSION]). They both run against the root of the website.
The Script it uses is the following (for context this script is used to grab the current session token, so we can use the website's API to carry some tasks where the website interface itself is unsuitable for spying):
function createAndPopulateMODSESSIONTextBox() {
// 1. Get the MODSESSION value
const modSessionValue = document.cookie;
// 2. Create the text box element
const modSessionTextBox = document.createElement('input');
// 3. Set attributes for the text box
modSessionTextBox.type = 'text';
modSessionTextBox.id = 'MODSESSION'; // Assign an ID for easy reference
modSessionTextBox.readOnly = true; // Make it read-only if you just want to display the value
modSessionTextBox.value = modSessionValue; // Set the retrieved value
const label = document.createElement('label');
label.htmlFor = 'MODSESSION';
label.textContent = 'MODSESSION: ';
document.body.appendChild(label);
document.body.appendChild(modSessionTextBox);
}Any help would be appreciated.
a week ago
There have been historic problems with Invoke Javascript on different versions of Blue Prism what version are you using this may be a factor to check.
There is a new function in the navigate stage called 'Invoke Javascript Event' which might work better? It seems to require less code than the traditional route. Check out the link to an article which might apply to you.
https://support.blueprism.com/en/support/solutions/articles/7000078862
Hope this helps but more detail on some of the things in the table would hopefully get you closer to a working solution.
a week ago
Hello @greggoodrem , we have a go using Invoke JavaScript event see if that helps.
We are currently using Blueprism 7.3.2, and is was working fine on that version before so I not 100% sure it would be the Manifest V3 changes, as we should of already had those changes for a while now (I could be wrong).
a week ago
@greggoodrem Hello again.
Had a go but I don't think Invoke JavaScript Event is going to work for are use case, as we are trying to run a JavaScript function and event seems to be limited to interacting with the web page as a user would.
Friday
Hello, everyone just wanted to let you know, we have found a temporary fix.
The issue seems to be Blueprism for some reason has lost the ability to start edge with the remote debugging port enabled, even with the argument for it provided in the launch command.
Are temporary fix for now is to use Utility - Environment, to launch edge via a command line command (start msedge.exe --remote-debugging-port=9222 --user-data-dir="%TEMP%\edge-debug-profile" URL of target site), and then attach and use that intense of edge. Everything seems to work fine after that.
Friday
Sounds good, if you have it sorted by group policy then no drama however I always add the following on a launch action
"https://website.com --hide-crash-restore-bubble --force-renderer-accessibility --start-maximized"
Stops the Restore Pages popup, maximizes the window and the force-renderer-accessibility helps UIA mode if you have to resort to that method.