RPA.Browser.execute_javascript throws error

I use RPA.Browser to fetch some json data with GET.
I execute it like this:
self.BROWSER.execute_javascript(f’return $.get("{url}")’)

It throws error as:
error:Message: javascript error:
(Session info: headless chrome=99.0.4844.51)

We have used this same method in many other places without problems but it suddendly stopped working with few spesific endpoint.

I can fetch data with chrome from this same endpoint successfully.
I also checked json is valid.
Is there any way to get better error-log?
What could cause this?

Not much info to go with, but here are few ideas:

  • check side by side of working code and non-working code that there are no minor differences (syntax errors or different characters used)
  • if you are using same code in multiple places, create function to do it, so that you have exactly one code you are using
  • what is value of url and does it differ in these broken cases vs. those that actually work
  • give more information and more code around that failure
  • what version of browser are you using, and have you pinned down the version and if not, have you read changelogs from browser library updates

There is no difference in working code and not working because all go through this same method. Only url changes.
All our GET calls use this method but somehow two started throwing error few days ago.
Endpoints that throw error still return valid json when tested with chrome, so i was thinking if there is some kind of problem in execute_javascript handling of json?
Thats why i asked about improved logging.

Robot used chome and chromedriver 97* before, updated it to 99.0.4844.51 but it did not help.

Last successfull log mention is before this line

 r = self.BROWSER.execute_javascript(f’return $.get("{url}")’)

used from selenium execute javascript
and printed error mentions javascript but does not tell anything useful about error.

error:Message: javascript error:
(Session info: headless chrome=99.0.4844.51)

This code is in production so i can’t be too spesific about details.