Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flight Import Causes Exception (Failed Airport Lookup) #1414

Closed
FatihKoz opened this issue Feb 23, 2022 · 3 comments
Closed

Flight Import Causes Exception (Failed Airport Lookup) #1414

FatihKoz opened this issue Feb 23, 2022 · 3 comments
Labels
Milestone

Comments

@FatihKoz
Copy link
Contributor

When importing flights via csv, if the airport code used in the file is wrong or it is not found by lookup below exception is returned

[ Side Issue: VA Central database needs to be updated, it misses some latest changes and new airports ]

[2022-02-23 19:48:16] prod.ERROR: VaCentral\Exceptions\HttpException: Client error: `GET https://api.vacentral.net/api/airports/UAIT` resulted in a `404 Not Found` response:
{"error":{"message":"Airport not found"}}
 in /vendor/nabeel/vacentral/src/VaCentral.php:180
[2022-02-23 19:48:16] prod.ERROR: App\Services\ImportExport\FlightImporter::processAirport(): Return value must be of type App\Models\Airport, null returned {"userId":3,"exception":"[object] (TypeError(code: 0): App\\Services\\ImportExport\\FlightImporter::processAirport(): Return value must be of type App\\Models\\Airport, null returned at /app/Services/ImportExport/FlightImporter.php:203)

Version
Version 7.0.0-dev+220222.219a7c

To Reproduce

  1. Export your current flights
  2. Edit the csv, make a mistake in one of the airports
  3. Or use a newly opened airport code (like UAIT or ZMCK)
  4. Start the import with that file
  5. Check your error logs to see error details

Expected behavior
If the airport is not found or the code is really wrong, import should continue without errors and inform the admin about skipped lines with something like Imported 127 flights, skipped 3 due to errors

@nabeelio nabeelio added the bug label Feb 24, 2022
@nabeelio nabeelio added this to the 7.0.0 milestone Feb 24, 2022
@cristianocasella
Copy link

Hello everyone, just to let you know that we are experiencing this problem really often in our VA.

From some tests that I performed, comparing the same version of Flight Simulator, without any 3rd parties addition, the number of airports reported is quite different, and sometimes really "unreal".

The only workaround that is always working that I found is to use MakeRwys from FSUIPC to generate the files containing all the airport data and let the ACARS reading that file.

Being this setup not supported for MSFS2020 I have to select MSFSX first, when the ACARS return the error at that time I select MSFS2020, the airport list is not refreshed and it works.

A short fix could be also to allow the usage of MakeRwys for any simulator so that in case of failure we can use this path.

Let me know if I can help with additional information

@FatihKoz
Copy link
Contributor Author

FatihKoz commented Jun 13, 2022 via email

@cristianocasella
Copy link

my apologies for the noise, thanks for the feedback

YashGovekar added a commit to YashGovekar/phpvms that referenced this issue Oct 24, 2022
YashGovekar added a commit to YashGovekar/phpvms that referenced this issue Oct 26, 2022
* Update module migrate command to avoid errors.

* Fixed issue nabeelio#1414
nabeelio added a commit that referenced this issue Oct 31, 2022
This reverts commit b4311b8.
nabeelio added a commit that referenced this issue Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants