PPRuNe Forums

PPRuNe Forums (https://www.pprune.org/)
-   Computer/Internet Issues & Troubleshooting (https://www.pprune.org/computer-internet-issues-troubleshooting-46/)
-   -   Javascript issue. (https://www.pprune.org/computer-internet-issues-troubleshooting/662597-javascript-issue.html)

Ant 18th November 2024 19:14

Javascript issue.
 
I'd be very grateful if any Javascript gurus here can assist!

The problem I have is that just 1 of 3 devices I use daily (1 Android and 2 Windows) is unable to process a Google map page embedded in a website which displays real-time locations of passenger trains around the UK.
So, rather than a map of the UK being displayed when I try to load

https://www.raildar.co.uk/radar.html

I instead get a screen message suggesting the Javascript console should be checked. Opening the console (usually Shift+Ctrl+J) shows various lines of script presumably relating to the error. An intensive internet search seems to indicate the code is relevant to website developers debugging problems on their website, rather than the end user trying to sort problems their end.

Happens on all 3 browsers on the affected machine, and for reference a fresh download of Java had been done, and Java is enabled.

A fine Cuban cigar will be emailed to anyone able to solve this for me!

Edited to acknowledge Abrahn's wise distinction between Java and Javascript, which I thought were the same. They're not !
Further edit to point out that since 2 of my 3 devices correctly display the map means the website itself is not the source of the fault.

Abrahn 18th November 2024 19:19

I get the same message, but I haven't checked the console (yet). It is probably an error with the site, not your side.

However... Java has nothing to do with JavaScript. From a pure Internet security perspective you're better off disabling and removing Java. Almost nothing depends on it these days.

Saab Dastard 19th November 2024 12:15

If you open the Javascript console (Ctrl + Shift + K), you will see the error in red:

Google Maps JavaScript API error: RefererNotAllowedMapError

This is a server-side error.

It may be that the 2 devices that are working have cached the necessary information. A way to test this would be to clear the cache on one of them.

Ant 20th November 2024 17:05

After a lot of tinkering around with this, I've come to the astonishing and earth shattering conclusion that the Raildar map, well... sometimes works, and sometimes doesn't!!

Have attempted dozens of times using 4 different browsers, both with and without deleting cookies and browser data using CCleaner Pro to find a cause.
There is absolutely no pattern, for example a failed attempt using Chrome will be immediately followed by a successful one with Firefox etc etc, but as I say there's no pattern.

By the way, a purely non scientific observation I made is that the Arc browser which I downloaded yesterday seems to have a far higher hit rate than all the other browsers.

netstruggler 21st November 2024 07:19


Originally Posted by Ant (Post 11772022)
After a lot of tinkering around with this, I've come to the astonishing and earth shattering conclusion that the Raildar map, well... sometimes works, and sometimes doesn't!!

Have attempted dozens of times using 4 different browsers, both with and without deleting cookies and browser data using CCleaner Pro to find a cause.
There is absolutely no pattern, for example a failed attempt using Chrome will be immediately followed by a successful one with Firefox etc etc, but as I say there's no pattern.

By the way, a purely non scientific observation I made is that the Arc browser with I downloaded yesterday seems to have a far higher hit rate than all the other browsers.

One of the causes of the error you quoted is described as:


Why is this error appearing in the first place? In the past, the "This Page Can't Load Google Maps Correctly" error didn’t constitute an issue because Google ran other procedures.

Later, Google changed their procedures and they are now requiring a Google API key and a Google Cloud Platform billing account to use Google Maps. This change was applied on June 11, 2018. Since then, the "This Page Can't Load Google Maps Correctly" error seems to be encountered more and more often by those who are not aware of the change.

Thus, the main cause behind this error is the API key requirement. Because Google Maps is embedded on important websites that get a lot of monthly views (over 100,000), the company thought of a method to make money by adding a fee for high-volume users.

The API is still free for smaller websites that don’t get a lot of hits, but bigger websites are now charged for using the API.
So it's possible that the raildar website is now receiving significantly more hits that the its API licence will allow and it's almost always fully subscribed?

So for you to get in you need to be the first user to try after someone else has left the site.

Ant 22nd November 2024 07:55

Well, I would never have thought of the possibility that the poor old Raildar site was being maxed out in terms of users trying to get on. Entirely plausible, so thank you netstruggler!

figaloprepod 30th November 2024 15:22

Surprisingly, some niche sites like Raildar can experience unexpected spikes in traffic. This is a testament to their usefulness and the dedicated user base they serve. As for angularjs to angular migration, things may be more complicated than at first glance. Server bandwidth and scalability are issues that even seemingly small platforms can face when demand spikes.

cyberjoi 27th March 2025 14:49

Some tips
 
It seems like a frustrating issue you're experiencing, and it's great you've already pinpointed that the fault lies with the one specific device rather than the website itself. Based on what you've described, here are a few steps you could try to address the problem:
  1. Clear Cache and Cookies: Sometimes, browser cache or cookies can interfere with proper functionality. Clear them and try reloading the page.
  2. Check for Javascript Errors: While you’ve already accessed the Javascript console, identifying the exact errors might require a deeper dive. You might consider seeking guidance from a Javascript developer.
  3. Disable Browser Extensions: Extensions or add-ons can conflict with embedded Javascript. Try disabling all extensions and reloading the page.
  4. Update Browsers and OS: Ensure the affected device's browsers and operating system are fully up-to-date.
  5. Consult Experts: Since you've hit a roadblock, connecting with a professional Javascript developer might be the best option.
I hope one of these solutions resolves your issue. Best of luck, and enjoy that fine Cuban cigar once this is sorted!

netstruggler 28th March 2025 08:56


Originally Posted by cyberjoi (Post 11855280)
It seems like a frustrating issue you're experiencing, and it's great you've already pinpointed that the fault lies with the one specific device rather than the website itself. Based on what you've described, here are a few steps you could try to address the problem:
  1. Clear Cache and Cookies: Sometimes, browser cache or cookies can interfere with proper functionality. Clear them and try reloading the page.
  2. Check for Javascript Errors: While you’ve already accessed the Javascript console, identifying the exact errors might require a deeper dive. You might consider seeking guidance from a Javascript developer.
  3. Disable Browser Extensions: Extensions or add-ons can conflict with embedded Javascript. Try disabling all extensions and reloading the page.
  4. Update Browsers and OS: Ensure the affected device's browsers and operating system are fully up-to-date.
  5. Consult Experts: Since you've hit a roadblock, connecting with a professional Javascript developer might be the best option.
I hope one of these solutions resolves your issue. Best of luck, and enjoy that fine Cuban cigar once this is sorted!

I think it is a problem with the website. The link that the OP posted still produces that error for me.

There are working maps on the site: eg https://www.raildar.co.uk/map/EUS

They're not overlaid on Google maps though.


All times are GMT. The time now is 10:31.


Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.