nabeelio / phpvms

virtual airline management
http://www.phpvms.net
Other
170 stars 139 forks source link

Admin PirepFiled Notification Fails #1882

Open FatihKoz opened 3 days ago

FatihKoz commented 3 days ago

When a pirep is filed, admins do get mails/notifications but somehow it fails while serializing the SimBriefXML (relationship of a pirep)

[2024-09-17 00:17:37] production.EMERGENCY: Error emailing admin (hello@kitty.com.mr). Error=Serialization of 'App\Models\SimBriefXML' is not allowed

Version Version 7.0.25-dev.g14cc6ceb55 (newer builds should have this problem too as nothing changed in notifications recently)

To Reproduce Steps to reproduce the behavior:

  1. Enable admin notifications via mail
  2. Create a simbrief plan for a flight
  3. Send the pirep
  4. Check logs

Expected behavior Notifications should be sent to admins as it does not need the SimBrief and/or any other relationships to proceed.

Possible related spots https://github.com/nabeelio/phpvms/blob/dev/app/Notifications/Messages/PirepFiled.php#L27

https://github.com/nabeelio/phpvms/blob/dev/app/Notifications/NotificationEventsHandler.php#L71

ProAviaAZ commented 3 days ago

Dispo was kind enough to open this issue for me. Additional info...

phpVMS 7.0.25 from 09/11 updated on 09/15 Previous phpVMS 7.0.12 from 07/17

vmsACARS 1.2.0.2449

Emails stopped being received by admins around 09/11/2024 for vmsACARS pireps.

Submitting a manual pirep with and without using SimBrief results in an email being sent.

Manual no SimBrief
[2024-09-17 20:08:32] production.INFO: PIREP Custom Fields  
[2024-09-17 20:08:32] production.INFO: Finance: PIREP: J4l6A9eWrO1PzpMN, flight fares:  [{"fare_id":1,"count":0},{"fare_id":2,"count":0}] 
[2024-09-17 20:08:32] production.INFO: Finance: PIREP: J4l6A9eWrO1PzpMN, fare count: {"fare_id":1,"count":0}  
[2024-09-17 20:08:32] production.INFO: Finance: PIREP: J4l6A9eWrO1PzpMN, fare count: {"fare_id":2,"count":0}  
[2024-09-17 20:08:33] production.DEBUG: Looking for RSK  
[2024-09-17 20:08:33] production.DEBUG: name: RSK - 36.7484x-108.0989  
[2024-09-17 20:08:33] production.INFO: New PIREP filed, pirep_id: J4l6A9eWrO1PzpMN  
[2024-09-17 20:08:33] production.INFO: Bid for user: FA003 on flight FA742  
[2024-09-17 20:08:33] production.INFO: NotificationEvents::onPirepFile: J4l6A9eWrO1PzpMN filed  
[2024-09-17 20:08:33] production.INFO: Disposable Basic | Pirep:J4l6A9eWrO1PzpMN FILED, Change STATE of N738FA to PARKED  
[2024-09-17 20:08:33] production.INFO: Disposable Special | Maintenance Records for N738FA (ID:5) increased Pirep ID:J4l6A9eWrO1PzpMN FILED  

Manual with SimBrief
[2024-09-17 21:28:40] production.INFO: PIREP Custom Fields  
[2024-09-17 21:28:40] production.INFO: Finance: PIREP: RBJeLydD6ebz4VK8, flight fares:  [{"fare_id":1,"count":152},{"fare_id":2,"count":8941}] 
[2024-09-17 21:28:40] production.INFO: Finance: PIREP: RBJeLydD6ebz4VK8, fare count: {"fare_id":1,"count":152}  
[2024-09-17 21:28:40] production.INFO: Finance: PIREP: RBJeLydD6ebz4VK8, fare count: {"fare_id":2,"count":8941}  
[2024-09-17 21:28:40] production.DEBUG: Looking for DCT  
[2024-09-17 21:28:40] production.DEBUG: Looking for RSK  
[2024-09-17 21:28:40] production.DEBUG: name: RSK - 36.7484x-108.0989  
[2024-09-17 21:28:40] production.DEBUG: Looking for LARKS2  
[2024-09-17 21:28:40] production.INFO: New PIREP filed, pirep_id: RBJeLydD6ebz4VK8  
[2024-09-17 21:28:40] production.INFO: Bid for user: FA003 on flight FA742  
[2024-09-17 21:28:40] production.INFO: NotificationEvents::onPirepFile: RBJeLydD6ebz4VK8 filed  
[2024-09-17 21:28:41] production.INFO: Disposable Basic | Pirep:RBJeLydD6ebz4VK8 FILED, Change STATE of N738FA to PARKED  
[2024-09-17 21:28:41] production.INFO: Disposable Special | Maintenance Records for N738FA (ID:5) increased Pirep ID:RBJeLydD6ebz4VK8 FILED