It is currently December 3rd, 2022, 3:51 pm

Weather Skins Not Working

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 4817
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

After some investigations, it turns out weather.com is not the only site having trouble providing its page source, it appears others are affected as well:

Code: Select all

[Variables]

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255

---Measures---

[WeatherPageSource]
Measure=WebParser
;URL=https://weather.com
;URL=https://weather.com/weather/today/l/8f5c8f0c5dd7699966caf7dcb4880c3847a86092521a187546b808f3023b9120
URL=https://www.google.com
;URL=https://www.geoiptool.com
;URL=https://edition.cnn.com
;URL=http://feeds.bbci.co.uk/news/rss.xml
;UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36
;UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36
RegExp=(?siU)"^(.*)$"
;StringIndex=1
;Flags=ForceReload | NoCookies
;Debug=2
UpdateRate=-1

---Meters---

[WeatherPageSourceResult]
Meter=String
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontSize=16
AntiAlias=1
MeasureName=WeatherPageSource
Text="Weather Page Source: %1"
DynamicVariables=1
All those sites give RegExp matching error (-1) (Test\Test.ini - [WeatherPageSource]) errors in the Log, though the Debug=2 option has no trouble downloading the webpage. The message from weather.com might just be an effect of the underlying issue with accessing webpage sources with WebParser. Please test the above code using whatever of those URLs to see if the issue can be reproduced.

CORRECTION: There was an error in my RegExp option above related to quotes, so all the above can be disregarded, but the permission issue on weather.com is still present for me and apparently for other folks as well:

Code: Select all

[Variables]

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255

---Measures---

[WeatherPageSource]
Measure=WebParser
URL=https://weather.com
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36
DecodeCharacterReference=1
DecodeCodePoints=1
RegExp=(?siU)^(.*)$
StringIndex=1
Flags=ForceReload | NoCookies
UpdateRate=-1

---Meters---

[WeatherPageSourceResult]
Meter=String
W=400
H=400
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontSize=16
AntiAlias=1
ClipString=1
MeasureName=WeatherPageSource
Text="Weather Page Source: %1"
This might not be related to weather.com according to this Microsoft page. If so, I can't understand why it works for some sites but not for others.
User avatar
Active Colors
Moderator
Posts: 1199
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Weather Skins Not Working

Post by Active Colors »

Yincognito wrote: February 10th, 2022, 10:20 am CORRECTION: There was an error in my RegExp option above related to quotes, so all the above can be disregarded, but the permission issue on weather.com is still present for me and apparently for other folks as well:
Time to clean up Internet Explorer:

1. Exit Rainmeter.
2. Clean Internet Explorer cache and cookies by following how-to video made by jsmorley https://www.youtube.com/watch?v=uVgcJwv7Ua4
(if you can't by any chance bestow that blissful video prepared by jsmorley for this special occasion then just simply:
press Win+R > type inetcpl.cpl > on the General tab find Browsing History and click "Delete..." > put checkmarks everywhere > press Delete > press OK.
3. Wait a bit. Start Rainmeter. It should work again.
4. Until next time!

I faced the same permission problem using your test skin so I cleaned IE and it started working.
User avatar
Yincognito
Rainmeter Sage
Posts: 4817
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

Active Colors wrote: February 10th, 2022, 12:18 pm Time to clean up Internet Explorer:

1. Exit Rainmeter.
2. Clean Internet Explorer cache and cookies by following how-to video made by jsmorley https://www.youtube.com/watch?v=uVgcJwv7Ua4
(if you can't by any chance bestow that blissful video prepared by jsmorley for this special occasion then just simply:
press Win+R > type inetcpl.cpl > on the General tab find Browsing History and click "Delete..." > put checkmarks everywhere > press Delete > press OK.
3. Wait a bit. Start Rainmeter. It should work again.

I faced the same permission problem using your test skin so I cleaned IE and it started working.
Thanks a bunch - problem solved. Checked another link with dozens of things to do in order to get rid of the permission issue, but didn't want to try them all, so narrowing down the solution to only Control Panel / Internet Options / Delete Browsing History saved some precious time. :rosegift:
User avatar
Active Colors
Moderator
Posts: 1199
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Weather Skins Not Working

Post by Active Colors »

I just found out you can clean IE cookies through command line. This could be an option you would want to add in your skins to let users clean IE in one click:

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess N

N stands for:
8 — Clear Temporary Internet Files
2 — Clear Cookies
1 — Clear History
16 — Clear Form Data
32 — Clear Saved Passwords
255 — Delete All
4351 — Delete All w/Clear Add-ons Settings

I would simply choose deleting everything, which is 255.
User avatar
Yincognito
Rainmeter Sage
Posts: 4817
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

Active Colors wrote: February 10th, 2022, 12:52 pm I just found out you can clean IE cookies through command line. This could be an option you would want to add in your skins to let users clean IE in one click:

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess N

N stands for:
8 — Clear Temporary Internet Files
2 — Clear Cookies
1 — Clear History
16 — Clear Form Data
32 — Clear Saved Passwords
255 — Delete All
4351 — Delete All w/Clear Add-ons Settings
Excellent find - this can easily be included in a RunCommand measure to fix things up, and it's good to know this possibility exist. Not sure it would be urgent though, since these things happen relatively rarely and I personally would not like to fix every issue that Microsoft left in limbo. It could however be included in some sort of related tutorial or even (and preferably, IMHO) included in the manual via some short note, the same way a similar procedure like rebuilding counters is included when it comes to "fixing" the result of UsageMonitor measures.
User avatar
Active Colors
Moderator
Posts: 1199
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Weather Skins Not Working

Post by Active Colors »

Yincognito wrote: February 10th, 2022, 1:09 pm Excellent find - this can easily be included in a RunCommand measure to fix things up, and it's good to know this possibility exist. Not sure it would be urgent though, since these things happen relatively rarely and I personally would not like to fix every issue that Microsoft left in limbo. It could however be included in some sort of related tutorial or even (and preferably, IMHO) included in the manual via some short note, the same way a similar procedure like rebuilding counters is included when it comes to "fixing" the result of UsageMonitor measures.
@jsmorley, @Brian, could you add a paragraph on WebParser page explaining the rare issue with IE and the instructions about what to do in such case?
User avatar
jsmorley
Developer
Posts: 22551
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather Skins Not Working

Post by jsmorley »

Active Colors wrote: February 10th, 2022, 1:18 pm @jsmorley, @Brian, could you add a paragraph on WebParser page explaining the rare issue with IE and the instructions about what to do in such case?
Not sure I know what the "rare issue" is.

I'd certainly be tempted to use Flags=Resync | NoCookie on each and every parent WebParser measure.
User avatar
Active Colors
Moderator
Posts: 1199
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Weather Skins Not Working

Post by Active Colors »

jsmorley wrote: February 10th, 2022, 2:18 pm Not sure I know what the "rare issue" is.
https://forum.rainmeter.net/viewtopic.php?t=35342#p177064
User avatar
Yincognito
Rainmeter Sage
Posts: 4817
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

Ah, yes, I thought I saw that somewhere, but since it's not pinned to the top... Anyway, maybe it's just me for not realizing what the last issue here was in the first place.
jsmorley wrote: February 10th, 2022, 2:18 pmI'd certainly be tempted to use Flags=Resync | NoCookie on each and every parent WebParser measure.
Isn't it NoCookies instead? I recently copy pasted the Flags=ForceReload | NoCookie example flag from the manual and got an error, which was gone after adding the -s at the end.
User avatar
jsmorley
Developer
Posts: 22551
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather Skins Not Working

Post by jsmorley »

Yincognito wrote: February 10th, 2022, 2:59 pm Ah, yes, I thought I saw that somewhere, but since it's not pinned to the top... Anyway, maybe it's just me for not realizing what the last issue here was in the first place.



Isn't it NoCookies instead? I recently copy pasted the Flags=ForceReload | NoCookie example flag from the manual and got an error, which was gone after adding the -s at the end.
Sorry, it is indeed NoCookies

I fixed the example in the docs.