dgtlmoon / changedetection.io

The best and simplest free open source web page change detection, website watcher, restock monitor and notification service. Restock Monitor, change detection. Designed for simplicity - Simply monitor which websites had a text change for free. Free Open source web page change detection, Website defacement monitoring, Price change notification
https://changedetection.io
Apache License 2.0
17.3k stars 965 forks source link

SyntaxError: Unexpected identifier at eval (<anonymous>) at UtilityScript.evaluate #629

Closed freddieleeman closed 2 years ago

freddieleeman commented 2 years ago

Running the latest docker container, I'm seeing the following error on some watches:

SyntaxError: Unexpected identifier at eval (<anonymous>) at UtilityScript.evaluate (<anonymous>:178:30) at UtilityScript.<anonymous> (<anonymous>:1:44)

I have not been able to find the cause. Is anyone else seeing this error?

dgtlmoon commented 2 years ago

You failed to follow the bug issue template

please include, on a new bug report

I cannot help you

freddieleeman commented 2 years ago

The latest version (v0.39.14.1) using both playwright and direct. Reverted to v0.39.14 and restored the data from backup resolved the issue. I will look into it when I have more time on my hands.

dgtlmoon commented 2 years ago

@freddieleeman I'll ask once more, example URL?

It's not possible that it comes from html_requests because this error comes from the xpath extractor for the Visual Selector

maybe from here

https://github.com/dgtlmoon/changedetection.io/blob/6de4027c27326c0fe001a15f2f53aacffca57fed/changedetectionio/content_fetcher.py#L304

or a few lines above

do you have any filters? please supply

freddieleeman commented 2 years ago

The problem is caused by xpath. After a recent update some fail:

URL: https://twitter.com/search?q=changedetection.io&src=typed_query&f=live xpath:(//div[@data-testid='tweetText'])[1]

URL: https://support.hpe.com/connect/s/product?language=en_US&tab=driversAndSoftware&kmpmoid=1009143853 //div[contains(@class, 'slds-scrollable_y')]

The following error appears in the main screen: SyntaxError: Unexpected identifier at eval () at UtilityScript.evaluate (:178:30) at UtilityScript. (:1:44)

freddieleeman commented 2 years ago

This issue is now resolved in dgtlmoon/changedetection.io:latest Digest:sha256:5a7a7cbe218090b670436c43319e05a7affcb4103d6ec3b4de468003d3c3a117

Thank you!

dgtlmoon commented 2 years ago

Thanks!