Aorly1 Posted September 2 Report Posted September 2 Hey gents I have been having issues with the live map page whenever someone is flying. Debug: https://flareapp.io/share/v5p0Kbl5 Answering some questions in advance... Phpvms version : 7.0.0-dev+240715.424380 VMS Acars: Module updated with the one provided I have disposable installed as well but it does not seem related as I have disabled the module and the issue still persisted. Thank you in advance Quote
Administrators ProAvia Posted September 3 Administrators Report Posted September 3 @Aorly1 Going to this link https://beta.jetsgoportugal.pt/livemap The map seems to be working Is you issue solved? If so, what did you do to fix it? If fixed, please state so here. Quote
Aorly1 Posted September 3 Author Report Posted September 3 15 hours ago, ProAvia said: @Aorly1 Going to this link https://beta.jetsgoportugal.pt/livemap The map seems to be working Is you issue solved? If so, what did you do to fix it? If fixed, please state so here. @ProAvia like I said the error only shows up when someone is flying or using the acars, if no one is connected it will work just fine. I can provide you with more details upon request, I have also seen the same error reported on this thread: Quote
Administrators ProAvia Posted September 3 Administrators Report Posted September 3 Does it work with the default theme when someone is flying? Try updating to the latest dev build (last was on 8/30/24) and latest Dispo Theme. Have you edited any core phpVMS files or Dispo Theme files? Do you have any Dispo or other modules installed? What version of vmsACARS are you using? Open vmsACARS, click gear icon on lower left. Version will be just to the right of the gear icon. Quote
DisposableHero Posted September 3 Report Posted September 3 55 minutes ago, ProAvia said: Does it work with the default theme when someone is flying? Try updating to the latest dev build (last was on 8/30/24) and latest Dispo Theme. Have you edited any core phpVMS files or Dispo Theme files? Do you have any Dispo or other modules installed? What version of vmsACARS are you using? Open vmsACARS, click gear icon on lower left. Version will be just to the right of the gear icon. As the error is related with a core feature (direct communication between acars client and phpvms v7 itself), it can not be related with any Dispo addon as my addons do not alter core/communication files. Dispo Theme only displays the map created by phpvms, only the look of the page is different. In the other topic same/similar error was reported, and the admin did not provided any details for debugging What I can assume from the error is, somehow the coordinates are not being recorded at all or not being recorded properly (faulty9, by the acars software being used (either vmsAcars or any other solution) thus the map is failing to create a geographic location properly. To better understand this error, we need to re-create or live debug during a flight (while the error is happening) @Aorly1, the data transferred by acars client and the data recorded to the database needs to be checked live (by some debug lines added to some files and then then inspecting the log to spot the differences). Additionally we can suspect the server dropping/altering http post data during a forced redirect (imagine like the server uses https, server has a forced redirection from http to https, client is configured to use http by the pilot). This needs to be checked too. Hope this helps. Quote
DisposableHero Posted September 3 Report Posted September 3 Also the error is simple (this is why I am suspecting the client and/or communications in between) GeoJson expects a value like "12345" (which is an integer) or "12345.67" (which is a float). So a value like "N 12345" (notice the N and space which is a string) or "12345,67" (notice the comma, which makes this a string too) or the value is just an empty string "" (thus can not considered as null in some cases) will create the above error We saw in some European servers, comma is being used as the decimal separator instead of a point, which was creating a problem in monetary values, same can be happening here too (a server forcing comma can mess up internal easily) Good luck Quote
DisposableHero Posted September 3 Report Posted September 3 (edited) A simple way to debug this error can be done by adding below text to line 44 of the mentioned file (app/Models/GeoJson.php) and saving it dd($point, $attrs); With this, instead of erroring out code will dump the data (contents) of $point and $attrs and stop there (die), hence the helper is called dump and die "dd". Good luck again Edited September 3 by DisposableHero Quote
Aorly1 Posted September 3 Author Report Posted September 3 (edited) this 5 minutes ago, DisposableHero said: A simple way to debug this error can be done by adding below text to line 44 of the mentioned file and saving it dd($point, $attrs); With this, instead of erroring out code will dump the data (contents) of $point and $attrs and stop there (die), hence the helper is called dump and die "dd". Good luck again By adding that piece of code it does show that it's outputting a float without comma. Thanks a lot for your time Edited September 3 by Aorly1 Quote
DisposableHero Posted September 3 Report Posted September 3 (edited) I saw it, thanks Here 0 and 1 is ok, they are floats but 2 is a string (notice the double quotes and display difference) and it is the altitude. So line 42 is causing trouble. Would you please change it as below and save the file (keep the dd for now) $point[] = floatval($attrs['alt']); Edited September 3 by DisposableHero Quote
Aorly1 Posted September 3 Author Report Posted September 3 1 hour ago, ProAvia said: Does it work with the default theme when someone is flying? Try updating to the latest dev build (last was on 8/30/24) and latest Dispo Theme. Have you edited any core phpVMS files or Dispo Theme files? Do you have any Dispo or other modules installed? What version of vmsACARS are you using? Open vmsACARS, click gear icon on lower left. Version will be just to the right of the gear icon. I did not have any update pending. However I've downloaded the dev brunch and it still shows that I am using version - 7.0.0-dev+240715.424380 I did not edit and core file. vmsAcars seems to be the last available 1.2.0.2449 Thank you for your time. Quote
DisposableHero Posted September 3 Report Posted September 3 Ok, Now disable (dash out) the dump by adding two dashes before it followed by a space as below. // dd($point, $attrs); Map should be working now 1 Quote
Aorly1 Posted September 3 Author Report Posted September 3 2 minutes ago, DisposableHero said: I saw it, thanks Here 0 and 1 is ok, they are floats but 2 is a string (notice the double quotes and display difference) and it is the altitude. So line 42 is causing trouble. Would you please change it as below and save the file (keep the dd for now) $point[] = floatval($attrs['alt']); Did not notice that one... I've updated as per request and it seems like it worked, the string got converted into a float Quote
Aorly1 Posted September 3 Author Report Posted September 3 3 minutes ago, DisposableHero said: Ok, Now disable (dash out) the dump by adding two dashes before it followed by a space as below. // dd($point, $attrs); Map should be working now Thanks a lot for your time, it is indeed working. I assume this is something that should not be only happening to me, if so will it be "?fixed?" in a future version ? Quote
DisposableHero Posted September 3 Report Posted September 3 6 minutes ago, Aorly1 said: Thanks a lot for your time, it is indeed working. I assume this is something that should not be only happening to me, if so will it be "?fixed?" in a future version ? Already did as we speak Issue Link : https://github.com/nabeelio/phpvms/issues/1873 Solution Link (Pull Request) : https://github.com/nabeelio/phpvms/pull/1874 So when this gets merged, a new dev build will be released and this will not be problem anymore for anyone I hope Have a nice night. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.