Author Topic: Update to stream player scripts  (Read 1325 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Update to stream player scripts
« on: July 07, 2023, 10:52:04 AM »
I've done an update to the NOAA/EC stream player script set to fix the display for alerting area on the map (and display of SAME codes).  The main NWR website had an update and had removed the single ESRI shapefile with the alerting areas for each radio callsign and replaced it with a set of SAME-code shapefiles instead.

All good now.. the github distribution was also updated.

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline chappelledpc

  • Moderator
  • Senior Contributor
  • *****
  • Posts: 187
    • Stonybrook South
Re: Update to stream player scripts
« Reply #1 on: July 07, 2023, 11:47:18 AM »
Ken,

I believe the Propagation check box on the map doesn't seem to be working (for me at least).  Nothing shows up on the map.

Thanks,
Doug

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Update to stream player scripts
« Reply #2 on: July 07, 2023, 12:02:17 PM »
Hi Doug,
http://chappelleweather.com/saratoga/wxradio.php works fine for me.. you may need to shift-reload to clear your browser cache of the javascripts and get the updated NWR-radio.js script loaded in the browser.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline chappelledpc

  • Moderator
  • Senior Contributor
  • *****
  • Posts: 187
    • Stonybrook South
Re: Update to stream player scripts
« Reply #3 on: July 07, 2023, 12:29:07 PM »
Yep....  That did the trick.

Thanks again Ken.
Doug

Offline tmabell

  • Forecaster
  • *****
  • Posts: 394
    • Mishawaka Weather
Re: Update to stream player scripts
« Reply #4 on: July 11, 2023, 09:09:44 AM »
Not working here so far.  The browser caches have been cleared, all files in the set were replaced and tried on all three major browsers.  Neither the Propagation nor Alerting Area selections work.  Everything works on Your site Ken, but not on mine.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Update to stream player scripts
« Reply #5 on: July 11, 2023, 09:46:10 AM »
Looks like the updated NWR-coverage.php script is missing on your site -- I get a 404-Not Found for the script on your site.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline tmabell

  • Forecaster
  • *****
  • Posts: 394
    • Mishawaka Weather
Re: Update to stream player scripts
« Reply #6 on: July 11, 2023, 09:51:26 AM »
It is there.  I just copied it over again. https://mymishawakaweather.com/nwr-coverage.php?sce=view

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Update to stream player scripts
« Reply #7 on: July 11, 2023, 09:58:43 AM »
You need NWR-coverage.php, not nwr-coverage.php -- on *nix systems, the upper/lower case matters in filenames.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Update to stream player scripts
« Reply #8 on: July 11, 2023, 10:02:46 AM »
Now your page is getting a 500-Server Error on NWR-radios-data.php -- the page won't work without the data :)
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline tmabell

  • Forecaster
  • *****
  • Posts: 394
    • Mishawaka Weather
Re: Update to stream player scripts
« Reply #9 on: July 11, 2023, 10:06:11 AM »
Sorry for the issue.  I did a server update at the worst possible time  ](*,) ](*,)

Please try once more  :oops:

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Update to stream player scripts
« Reply #10 on: July 11, 2023, 10:48:41 AM »
So, this may be related to an issue I see with your site.
Each page has a
Code: [Select]
<meta name="referrer" content="always">
directive in the <head> section of the page.  According to this, the value "always" is not one of the 5 options, so the browser defaults to 'unsafe-url' and casts a bunch of messages about "unsafe url" being ignored.

Can you remove that meta tag from the page?
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline tmabell

  • Forecaster
  • *****
  • Posts: 394
    • Mishawaka Weather
Re: Update to stream player scripts
« Reply #11 on: July 11, 2023, 10:53:41 AM »
It has been removed.  FYI I added that to allow the validator access to my pages after switching to https.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Update to stream player scripts
« Reply #12 on: July 11, 2023, 11:16:19 AM »
There's also a
Code: [Select]
<script>"ajxmenu.js"</script> part in the <head>.. that's confusing JavaScript a bit.. please remove.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline tmabell

  • Forecaster
  • *****
  • Posts: 394
    • Mishawaka Weather
Re: Update to stream player scripts
« Reply #13 on: July 11, 2023, 11:20:58 AM »
Done, but no improvement.  The ajxmenu entries are to support my drop-down menu.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Update to stream player scripts
« Reply #14 on: July 11, 2023, 11:35:39 AM »
To eliminate any issues that may be caused by inclusions/markup on your page, I've switched debugging to the default page
https://mymishawakaweather.com/radios.php

Unfortunately, that page shows the same issues with JavaScript warning messages
Quote
Content-Security-Policy: The report URI (about:blank) should be an HTTP or HTTPS URI. radios.php
Content-Security-Policy: The page’s settings observed the loading of a resource at blob:https://mymishawakaweather.com/29da0e39-7feb-4891-bec8-2c20d489a1ea (“worker-src”). A CSP report is being sent. radios.php
Content-Security-Policy: The report URI (about:blank) should be an HTTP or HTTPS URI. radios.php
Content-Security-Policy: The page’s settings observed the loading of a resource at blob:https://mymishawakaweather.com/418a7c04-834e-4ea2-a92c-912ecc4a7a01 (“worker-src”). A CSP report is being sent. radios.php
Content-Security-Policy: The report URI (about:blank) should be an HTTP or HTTPS URI. radios.php
Content-Security-Policy: The page’s settings observed the loading of a resource at blob:https://mymishawakaweather.com/723d7eab-9bcb-4b09-b75f-d4eeed5e9ff3 (“worker-src”). A CSP report is being sent. radios.php
Content-Security-Policy: The report URI (about:blank) should be an HTTP or HTTPS URI. radios.php
Content-Security-Policy: The page’s settings observed the loading of a resource at blob:https://mymishawakaweather.com/be76ad25-3062-4781-87f7-173d45c07375 (“worker-src”). A CSP report is being sent. radios.php
Content-Security-Policy: The report URI (about:blank) should be an HTTP or HTTPS URI. radios.php
Content-Security-Policy: The page’s settings observed the loading of a resource at blob:https://mymishawakaweather.com/de8aa96c-dfcf-44e3-b63c-54874248e11a (“worker-src”). A CSP report is being sent. radios.php
Content-Security-Policy: The report URI (about:blank) should be an HTTP or HTTPS URI. radios.php
Content-Security-Policy: The page’s settings observed the loading of a resource at blob:https://mymishawakaweather.com/7f96150c-d82b-4312-a1ad-09ac3802cc7e (“worker-src”). A CSP report is being sent. radios.php
Content-Security-Policy: The report URI (about:blank) should be an HTTP or HTTPS URI. radios.php
Content-Security-Policy: The page’s settings observed the loading of a resource at blob:https://mymishawakaweather.com/1ca38fa8-b546-4c63-8649-5db70cd0fb9a (“worker-src”). A CSP report is being sent. radios.php
Content-Security-Policy: The report URI (about:blank) should be an HTTP or HTTPS URI. radios.php
Content-Security-Policy: The page’s settings observed the loading of a resource at blob:https://mymishawakaweather.com/b8ab03bc-82ba-4d5d-b5da-c1686fec0fd5 (“worker-src”). A CSP report is being sent. radios.php
Content-Security-Policy: The report URI (about:blank) should be an HTTP or HTTPS URI. radios.php
Content-Security-Policy: The page’s settings observed the loading of a resource at blob:https://mymishawakaweather.com/f86f6f0e-df02-44a2-b4a5-ed62bd4aede4 (“worker-src”). A CSP report is being sent. radios.php
Content-Security-Policy: The report URI (about:blank) should be an HTTP or HTTPS URI. radios.php
Content-Security-Policy: The page’s settings observed the loading of a resource at blob:https://mymishawakaweather.com/044e308d-023a-4664-8500-a456a27cfa10 (“worker-src”). A CSP report is being sent. radios.php

It does succeed in loading the shape files for my KEC49 (Monterey), but not displaying them.  Your shapefiles for KXI41 (Crystal Lake) still return 404s, likely reflected from the weather.gov site based on the IP address of your webserver (maybe marked as somewhat naughty?)

Do you have any customization to .htaccess beyond the usual file/ip blocks?
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline tmabell

  • Forecaster
  • *****
  • Posts: 394
    • Mishawaka Weather
Re: Update to stream player scripts
« Reply #15 on: July 11, 2023, 11:41:30 AM »
I don't use htacess.   Instead, I put everything in httpd.conf.  I'll send that file to you off-board in hopes that something makes sense.  Check your email.  I'm not sure if my ip is flagged anywhere but I am certain that no other NWS scripts are affected this way and I use a lot of them.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Update to stream player scripts
« Reply #16 on: July 11, 2023, 11:51:52 AM »
thanks Tom, I took a look at your httpd.conf file and nothing pops out about why this is happening.  I do wonder about the mod_evasive Apache module.  Can you comment that one out and restart the Apache server.

I'm not sure a personal weather website needs a DDoS preventer and it may be causing the issues.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline tmabell

  • Forecaster
  • *****
  • Posts: 394
    • Mishawaka Weather
Re: Update to stream player scripts
« Reply #17 on: July 11, 2023, 12:02:03 PM »
Ken, I commented that module out but still no luck.  I'm not sure what to do next. 

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Update to stream player scripts
« Reply #18 on: July 13, 2023, 10:00:59 AM »
Tom and I worked offline and found the issue.  It was a trailing space/blank line after the closing ?> in Settings.php -- that caused the webserver to emit a space before the expected binary output of the shapefile .zip files retrieved by the NWS-coverage.php script and so the Leaflet JavaScript was unable to decode the malformed .zip of the shapefile.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline tmabell

  • Forecaster
  • *****
  • Posts: 394
    • Mishawaka Weather
Re: Update to stream player scripts
« Reply #19 on: July 13, 2023, 10:04:21 AM »
I can't thank Ken enough for sticking with me on this rather uncommon problem and helping me find the culprit! 

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Update to stream player scripts
« Reply #20 on: July 13, 2023, 12:56:31 PM »
You're welcome, Tom.  In the process of fixing an issue (County names the same in different states not displaying the Alerting overlays), I've broken the displays for all now.. sigh.  Working through the issue and will have another update of the NWS-radios.js script later today.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9332
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Update to stream player scripts
« Reply #21 on: July 13, 2023, 01:46:36 PM »
Ok, fixed the issue with the stream player.  The update for NWR-radios.js is available here .. it does include the 07-Jul-2023 update to NWR-coverage.php.

After updating your site, you'll need to force reload of your radio page to get the updated NWR-radios.js.

If it doesn't work, then refresh your cache using NWR-radios-data.php?cache=1 on your site to get the recent radio definitions.  After that, the propagation areas should display along with the SAME codes under the map on the radios.php page.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP