UnicodeDecodeError raised by driver.page_source

I managed to recreate the testing environment (Python, Appium, UIAutomator …) on the other computer, and it is working there (the same test code). Now I am completely confused, because it seems like the environmental is the same, but in one the decoding works, in the other it is not. Is there any Appium default configuration which could differs on the two computers?

I haven’t (yet) encountered the issue when running Appium server locally, and accessing it directly.

(I also haven’t (yet) encountered it on Android - even though I run the same tests on both platforms every day)

It so far has only happened when accessing Appium via a Selenium 4 grid. I wonder if that is relevant?

All my machines (local, appium grid & selenium grid) are Macs

Well, now I found out, that error doesn’t occur when I start the Appium server manually. When i let Python start the appium service, then the UnicodeDecodeError happens. I don’t get it, the Python worked all the time before and on the second computer it also works.

Maybe this issue has to do with bug: Element not found if using a character like ° or accents · Issue #20503 · appium/appium · GitHub

Try to update Node.js to the recent version

1 Like

Thanks @mykola-mokhnach, that appears to have been the issue alright.

The machine I was experiencing the problem on was indeed running node 22.7.0
I’ve upgraded node, and so far the issue has not reoccurred

It is also working for me! Thank you.