Jump to content

Recommended Posts

Posted

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

 

 

Posted
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: 

 

  • Administrators
Posted

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.

Posted
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.

Posted

Also the error is simple (this is why I am suspecting the client and/or communications in between) 

 

image.png.c2bf22eb15d9c60ff7ff8cb54f2756d2.png

 

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 :)

 

Posted (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

 

image.png.55dc0456867dd90888f577da9d48692e.png

 

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 by DisposableHero
Posted (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

 

image.png.55dc0456867dd90888f577da9d48692e.png

 

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.

 image.png.b1fd7371a595ec292143ca9bd8fc7dc3.png

 

Thanks a lot for your time 

Edited by Aorly1
Posted (edited)

I saw it, thanks :)

 

image.png.35ffb2bf57bc103a042f5c9e31e0063c.png

 

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 by DisposableHero
Posted
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. 

Posted
2 minutes ago, DisposableHero said:

I saw it, thanks :)

 

image.png.35ffb2bf57bc103a042f5c9e31e0063c.png

 

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

Posted
3 minutes ago, DisposableHero said:

Ok, 

 

image.png.e052d77382f4e16a68697144a993129e.png

 

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 ?

Posted
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.

  • Thanks 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...