ac2cz / KlaTrack

G0KLA Satellite Tracker
8 stars 5 forks source link

windows upgrade now KLA track is blank #14

Open rpbgit opened 3 years ago

rpbgit commented 3 years ago

havent used KLA Track in about a month, fired it up today and all i get is a blank dialog box, with no sats in it. when i navigate to the settings dialog, the screen is blank, no sats appear.

the URL is the same where to grab them, and when i manually use the browser to save the file in the URL, and then map KLA to use that local file, all is well. So it appears something has broken with Win10 and latest major upgrade that they recently did about a week ago with downloading the keps file.

-bob, w9zv

WillMarchant commented 3 years ago

Also broken with macOS Catalina 10.15.7 when using the URL. Saving as a local file also works on macOS.

There was a discussion of changes to the TLE distribution on the AMSAT site. Seems likely that is the issue.

rpbgit commented 3 years ago

very interesting Will... since the file works when downloaded outside of the KLA appl, its probably a security issue with the mechanism for downloading within KLA itself, not the format of the kep file. many website services have forced better and more secure protocols for downloading. Most browsers have adapted to this, which is why the browser download of the keps file works, and when KLA is pointed to the local keps file that was downloaded, function is re-established. I thought it was the WinBlows updates... your post suggests this... i now suspect the download simply fails in some way.

ac2cz commented 3 years ago

Thanks for the report. What is the URL that is giving an issue? I am using this URL and it seems to work fine still: https://www.amsat.org/amsat/ftp/keps/current/nasabare.txt

WillMarchant commented 3 years ago

That is the URL I'm using.  Works in a web browser and KlaTrack likes that page when saved locally.  But putting that URL into the settings shows no satellites in KlaTrack.     Best wishes,     Will

On 3/17/21 4:42 PM, Chris Thompson wrote:

Thanks for the report. What is the URL that is giving an issue? I am using this URL and it seems to work fine still: https://www.amsat.org/amsat/ftp/keps/current/nasabare.txt https://www.amsat.org/amsat/ftp/keps/current/nasabare.txt

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ac2cz/KlaTrack/issues/14#issuecomment-801429142, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE2KIK5CQPC2LYNN7VSKFNDTEEHZRANCNFSM4ZJLCX7Q.

-- Will Marchant, KW4WZ @. http://www.ssl.berkeley.edu/~marchant/ Campus: @. Home: @.***

ac2cz commented 3 years ago

In the situation when the program is unable to connect and download the file, can you take a look at what it does download? It puts the nasabare.txt file in your home directory, in a sub directory called KLATrack. If you open that file with a text editor then does it contain an error message rather than the TLEs?

WillMarchant commented 3 years ago

OK, that file was empty.  So I deleted it and then launched KlaTrak again.  It then downloaded correctly and now works!  So maybe a glitch at amsat.org caused a null file to be downloaded and that then blocked subsequent download efforts? Seems like it's fixed now...

On 3/17/21 5:14 PM, Chris Thompson wrote:

In the situation when the program is unable to connect and download the file, can you take a look at what it does download? It puts the nasabare.txt file in your home directory, in a sub directory called KLATrack. If you open that file with a text editor then does it contain an error message rather than the TLEs?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ac2cz/KlaTrack/issues/14#issuecomment-801447084, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE2KIK6ZHBNMDS4PJRDBBMDTEELR7ANCNFSM4ZJLCX7Q.

-- Will Marchant, KW4WZ @. http://www.ssl.berkeley.edu/~marchant/ Campus: @. Home: @.***

rpbgit commented 3 years ago

Same here, zero length keps .txt file. deleted it, restarted KLA, all is well. On Win10 here.

should be simple logic fix in code. number of ways to solve it, but maybe at least notifying user that zero length file was "downloaded" showing the path to it (may be diff depending on os versions) and then take some other action. i can postulate a few options here... but at least the root cause is known, simply need to handle the error better. At least im running again !! 72 es tnx, -bob w9zv

ac2cz commented 3 years ago

It downloads the lastest nasabare.txt file at startup and overwrites the old one. So there is no reason a zero length file would block it. So there is (or was) something else going on. If the date on the file was in the future, then that could have blocked it. It does not download the file unless there is a newer one on the website.

I agree that downloading a zero length file should probably be an error and that should be handled appropriately. But I don't know why it was not fixed the next time it was run.

rpbgit commented 3 years ago

i'll take a peek at the code as well... must be within the SatMgr object/instance... creation of the file occurred, but content wasnt downloaded for some reason, so no size, leaving it created but zero len ?? just spitballin' without looking at source...

rpbgit commented 3 years ago

single stepped thru the code. yes, it will download the new keps file... BUT... the problem is that IF the current keps file modify time is <= 24 hours old, SatMgr will NOT download the keps file and uses the current (bogus) zero length file, with results indicated above. It probably WILL correct itself 24 hours after the zero length file was last modified, so, I guess it will be broken for no longer than 24 hours. But for that period it will be totally useless (since nothing comes up to be displayed) no matter how many times its run.

WHY the zero length file got created in the first place is unknown, but its easy to test... just create the zero length keps file and run it. unhandled exception fetching the keps file? again, spitballin... I know when it failed the first time after restarting the appl to no avail, I immediately then proceeded to download the keps file to my local box via the browser, and then pointed KLA to the local file and it worked. So whatever "transient" failure occurred at the keps site (if that was where the problem lied), corrected itself quickly as it was only a matter of a few minutes before did this.

After having played with sats for years, i find this little widget you created has become my primary sat software, as for almost all cases, i simply dont need an atomic powered swiss army knife solution (Nova/Sattpc32 etc) to know when to go look for a pass and its "quality". great idea and a diff way/approach to visualizing upcoming birds. Its all i really need to see whats coming up...

rpbgit commented 3 years ago

fyi - a local friend who i turned onto KLA also uses it regularly, and he too had the same problem... deleted the zero length file and poof, all is well. cant 'splain why since the time he tried it and the time i tried it were hours apart. both of us on Win10

ac2cz commented 3 years ago

Thanks for the investigation. I seem to remember fixing a similar error for FoxTelem. I don't think it is as simple as checking for a zero length file. If the file is missing on the server or something then the returned file contains some text. Something like "Error 404 please contact the system administrator" which of course is not helpful to an automatic process.

I think the solution is to make sure that the download parses correctly and results in a valid collection of TLEs. If the TLE list is zero length then there is an error. We need to do that check before we blat over the old file of course!

And thanks for the compliments. I like this simple tool too. Definitely easy to use.

On Thu, Mar 18, 2021, 10:29 rpbgit @.***> wrote:

fyi - a local friend who i turned onto KLA also uses it regularly, and he too had the same problem... deleted the zero length file and poof, all is well. cant 'splain why since the time he tried it and the time i tried it were hours apart. both of us on Win10

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ac2cz/KlaTrack/issues/14#issuecomment-801975216, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRDKWOBPNQDHD3SNMASFV3TEIE5BANCNFSM4ZJLCX7Q .

rpbgit commented 3 years ago

like always, probably multiple was to approach a fix. yes, other possibilities exist such as any 4xx response (or others i presume) i assume you will be committing a fix of some kind Chris??

for now, i'll just have to look for the zero length file and manually delete it if found when the appl comes up with a null plot.

ac2cz commented 3 years ago

Yes, I will fix at some point. I'm working on a decoder for another Sat in my spare cycles at the moment. When I get a chance I will do some work on KLA Track again. For now the manual work around is the only way.

On Fri, Mar 26, 2021 at 12:34 AM rpbgit @.***> wrote:

like always, probably multiple was to approach a fix. yes, other possibilities exist such as any 4xx response (or others i presume) i assume you will be committing a fix of some kind Chris??

for now, i'll just have to look for the zero length file and manually delete it if found when the appl comes up with a null plot.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ac2cz/KlaTrack/issues/14#issuecomment-807928511, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRDKWMEN7KMLTHFVPZUTULTFQFELANCNFSM4ZJLCX7Q .

-- Chris E. Thompson @. @.

Grigs007 commented 2 years ago

I am glad I was not the only one...I appreciate the discussion @rpbgit and @ac2cz. I was having the same issue, deleted the 0kb kep txt file, and all is working now. I was really confused, I thought maybe a java update had broken it at first. Thank you both. I love the app btw, I leave it up running 24x7.