eusonlito / GPS-Tracker

GPS Tracker platform for Sinotrack, Coban, Teltonika, Concox, Jimilab, OsmAnd and Queclink devices built with Laravel 11 + PHP 8.2 and MySQL 8. Plataforma GPS Tracker para dispositivos Sinotrack Sinotrack, Coban, Teltonika, Concox, Jimilab, OsmAnd y Queclink creada con Laravel 11 + PHP 8.2 y MySQL 8.
https://tracker-demo.lito.com.es/
MIT License
137 stars 62 forks source link

ERROR: SQLSTATE[22S03]: <>: 3617 Latitude 122.232690 is out of range in function st_pointfromtext. #12

Closed mojxznhek closed 1 year ago

mojxznhek commented 1 year ago

[2023-04-26 09:01:41] production.ERROR: SQLSTATE[22S03]: <>: 3617 Latitude 122.232690 is out of range in function st_pointfromtext. It must be within [-90.000000, 90.000000]. (Connection: mysql, SQL: insert into position (point, speed, direction, signal, date_at, date_utc_at, device_id, timezone_id, trip_id, user_id, vehicle_id) values (ST_PointFromText("POINT(122.232690 10.647180)", 4326), 0, 0, 1, 2023-04-26 17:01:38, 2023-04-26 09:01:38, 1, 259, 1, 1, 1)) {"exception":"[object] (Illuminate\Database\QueryException(code: 22S03): SQLSTATE[22S03]: <>: 3617 Latitude 122.232690 is out of range in function st_pointfromtext. It must be within [-90.000000, 90.000000]. (Connection: mysql, SQL: insert into position (point, speed, direction, signal, date_at, date_utc_at, device_id, timezone_id, trip_id, user_id, vehicle_id) values (ST_PointFromText(\"POINT(122.232690 10.647180)\", 4326), 0, 0, 1, 2023-04-26 17:01:38, 2023-04-26 09:01:38, 1, 259, 1, 1, 1)) at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:793)

eusonlito commented 1 year ago

What GPT tracking device are you using? And MySQL version?

eusonlito commented 1 year ago

I think is related with MySQL version: https://dba.stackexchange.com/a/242004/23729

Anyway I have sent a patch to force always same parameters order: https://dba.stackexchange.com/a/313905/23729

mojxznhek commented 1 year ago

Im using ST-901M Sinotrack GPS Tracker image

eusonlito commented 1 year ago

Ok, update the code and test it again :)

mojxznhek commented 1 year ago

Hi, here's the update. Data are now saving. here's another issue. see the image attached. image coordinates are not working on map. image

mojxznhek commented 1 year ago

I think it should be Lat-Long order.

image

eusonlito commented 1 year ago

Can you send me the socket log stored in Server > Logs > server / 2023-04-27 / 8091.log

Please, send the trace to lito at eordes.com to avoid expose your device IDs.

mojxznhek commented 1 year ago

Hi, I just sent the 8091.log on your email. Thanks

eusonlito commented 1 year ago

I have found the error, but to be fixed the trips outside valid latitude range (>90) will be automatically deleted.

You can import the trips again from logs using the command:

php artisan server:log:read --file storage/logs/server/2023-04-XX/8091.log --protocol h02

If it's ok, you can execute the command to upgrade your project:

composer deploy
mojxznhek commented 1 year ago

Hi, here's the update. it's now working. image

I think this is now resolved. thanks a lot.

eusonlito commented 1 year ago

Thank you very much for your collaboration!

Closing :)