-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using api steps in sub-scripts results in error - XMLHttpRequest Exception 101 #228
Comments
Thanks for raising this! Can you email me some super-basic scripts without sensitive info which can replicate this issue? We haven't come across this, if you are referring to main scripts and sub-scripts as files which you invoke using tagui step, the way tagui step works is it expands the contents of the sub-scripts to fill into the main script and run it just like a single script. I suspect it might be related to web security protection settings used by TagUI. Inside tagui\src\tagui_config.txt, try changing the following lines to
Also, if you have information when your scripts start to stop working, or if they have not worked before, that will be helpful. |
reference - likely the line where issue happens # check if api call is made in automation flow file to set appropriate setting for phantomjs to work
api=""; if [ -f "$1" ]; then if grep -iq "api http" "$1"; then api=" --web-security=false"; fi; fi |
reply from user Here are the sample scripts that would replicate the issue. We tried changing the web security settings as per your suggestion but it did not resolve the issue. |
solution works by doing a keyword (api http) check in the generated js file instead of the source script. because a source script can call other sub-scripts and the detection of the keyword will not be found.
Above commit works now in cutting edge version - https://github.com/kelaberetiv/TagUI#set-up solution works by doing a keyword (api http) check in the generated js file instead of the source script. because a source script can call other sub-scripts and the detection of the keyword will not be found. but by checking the generated js file, all sub-scripts would already been factored into consideration. |
!! is needed for delayed variable expansion instead of %% for the variable api as it is in a for loop
Above commit makes it work for Windows - !! is needed for delayed variable expansion instead of %% for the variable api as it is in a for loop |
Hi Ken, We are also facing similar error when invoking an API. I didn'y understand the solution that you have given above. Can you please elaborate on the above solution that you have given Thanks, |
Hi Ramu, this change has already been committed and already be in current version (download from zip and overwrite with cutting edge version). How TagUI does this is search if you use |
raising from user email
Not sure whether you have encountered this before so was hoping you or your colleagues have some possible solutions -
In our sub-scripts, we tried to perform an API call but got the following error message:
After much troubleshooting, we realise that the API call will only work on a main script. However it is not feasible to move the chunks of codes (> 1000 lines of codes!) from the sub-scripts to the main script for future maintenance purposes.
Appreciate any input on this.
The text was updated successfully, but these errors were encountered: