wiedehopf / tar1090

Provides an improved webinterface for use with ADS-B decoders readsb / dump1090-fa
Other
1.25k stars 235 forks source link

Commit c9610f1a72025ce647184b6b9f0ded30333592e7 broke photos #125

Closed rparenton closed 3 years ago

rparenton commented 3 years ago

https://github.com/wiedehopf/tar1090/commit/c9610f1a72025ce647184b6b9f0ded30333592e7 appears to have broken photos. I set a breakpoint and found that the root cause is that selected.regLoaded is always false, even if the registration is loaded.

regLoaded: false registration: "N348DN"

I'm seeing the same behavior in both Firefox and Chrome Edge. I'm current with https://github.com/wiedehopf/tar1090/commit/c601a36f9ba100c640b3119a7fc6a23f076594c5, and reverting https://github.com/wiedehopf/tar1090/commit/c9610f1a72025ce647184b6b9f0ded30333592e7 makes photos work again since it reorders the conditional block.

wiedehopf commented 3 years ago

That registration is not in the database.

I suppose it should work regardless how the registration is derived. But you make it sound like no photos are loading.

wiedehopf commented 3 years ago

Try the current version.

But if you had no pictures before then your database loading isn't working ... usually means webserver issues not setting the content-encoding gzip correctly.

rparenton commented 3 years ago

That fixed it. Thanks for the quick response.

I was indeed getting no photos after that commit, so I'll dig deeper into the DB loading and content-encoding. Since the aircraft types were being populated, I incorrectly assumed that the DB was loading properly.

wiedehopf commented 3 years ago

Yeah if the type loads the DB should be working.

Really not sure why you would have no photos then. So regloaded will be true for you now for all N registered aircraft as it can be derived from the hexid.

That specific plane you mentioned isn't in the DB ...

Anyhow .. i didn't notice the issue you mention because for all aircraft in the DB the photo loading worked fine for me.

wiedehopf commented 3 years ago

So i'm reverting the change as actually the change broke db loading. Thus we'll have to check what your actual issue is .... instead of changing "regLoaded" because that just checks if database data has been loaded. It's also set to true if there is not database entry, it just isn't set if it fails, i suppose i could change that.

You really should have "Database load error:" in your F12 console .... If you don't please describe your setup further.