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

attempting to edit an airport yields an internal server error #1314

Open
Tracked by #1463
mlc opened this issue Jul 12, 2023 · 17 comments
Open
Tracked by #1463

attempting to edit an airport yields an internal server error #1314

mlc opened this issue Jul 12, 2023 · 17 comments
Labels
server Things that likely require server access for deployment

Comments

@mlc
Copy link

mlc commented Jul 12, 2023

hi, thanks for this great project!

I noticed that VQS airport is in the wrong place on OpenFlights (wikipedia has the right coordinates on the north side of the island) and so tried to submit an update using the form on the site.

However, when I pressed the "save changes" button, I got text reading "internal server error" on my screen. No further information was available in the network trace that I could find, and no issue for the edit was posted here, as far as I can tell.

Thanks for having a look!

@reedy reedy added the server Things that likely require server access for deployment label Jul 12, 2023
@reedy
Copy link
Collaborator

reedy commented Jul 12, 2023

Guess we should test this in dev... But don't have acces to the server logs...

@reedy
Copy link
Collaborator

reedy commented Jul 12, 2023

Seems to work fine in my dev environtment...

Can you upload a screenshot of what you were trying to save?

Thanks

@dicorynia
Copy link

Trying to edit CDG2 Digby, wrongly located in France instead of Canada (coords are fine though), I also get "Internal Server Error":
image

@reedy
Copy link
Collaborator

reedy commented Jul 15, 2023

I guess you changing the name as well?

I can't save it if I just change the country due to #1351

If I change it to remove the () in my dev install, I can save to the database...

Let me now try if not an admin

@reedy
Copy link
Collaborator

reedy commented Jul 15, 2023

Without GitHub setup, I seem to get that error...

2023/07/15 14:49:11 [error] 938#938: *696 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Github\Exception\RuntimeException: Bad credentials in /var/www/openflights/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/GithubExceptionThrower.php:138
Stack trace:
#0 /var/www/openflights/vendor/php-http/httplug/src/Promise/HttpFulfilledPromise.php(31): Github\HttpClient\Plugin\GithubExceptionThrower->Github\HttpClient\Plugin\{closure}()
#1 /var/www/openflights/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/GithubExceptionThrower.php(28): Http\Client\Promise\HttpFulfilledPromise->then()
#2 /var/www/openflights/vendor/php-http/client-common/src/PluginChain.php(44): Github\HttpClient\Plugin\GithubExceptionThrower->handleRequest()
#3 /var/www/openflights/vendor/php-http/client-common/src/PluginChain.php(59): Http\Client\Common\PluginChain->Http\Client\Common\{closure}()
#4 /var/www/openflights/vendor/php-http/client-common/src/PluginClient.php(87): Http\Client\Common\PluginChain->__invoke()
#5 /var/www/openflights/vendor/php-http/client-common"

Seems a good time to resolve https://github.com/jpatokal/openflights/blob/83ab24a/php/apsearch.php#L181

reedy added a commit to reedy/openflights that referenced this issue Jul 15, 2023
Leave comment about token expiring...

Display errors from apsearch in red

Helps towards jpatokal#1314

Probably broken in jpatokal@c03f720
@reedy
Copy link
Collaborator

reedy commented Jul 15, 2023

I probably broke this in c03f720...

Tested working now, as seen at reedy#1

@jpatokal this will need deploying at some point... Code is obviously undergoing quite a bit of change atm.

Also, worth checking the token you're using has not expired...

And whether we want to do #1171 at the same time...

Then see if the submission is still broken on the live site

reedy added a commit to reedy/openflights that referenced this issue Jul 15, 2023
Leave comment about token expiring...

Display errors from apsearch in red

Helps towards jpatokal#1314

Probably broken in jpatokal@c03f720
reedy added a commit that referenced this issue Jul 15, 2023
Leave comment about token expiring...

Display errors from apsearch in red

Helps towards #1314

Probably broken in c03f720
@dicorynia
Copy link

dicorynia commented Jul 17, 2023

I guess you changing the name as well?

I can't save it if I just change the country due to #1351

If I change it to remove the () in my dev install, I can save to the database...

Let me now try if not an admin

Yes I tried without the () after getting the message about special characters; then I got what I screenshot.

@jpatokal
Copy link
Owner

FWIW, I checked the token on Github and it's a "classic" token that has no expiration date, so not quite sure what the issue is.

@reedy
Copy link
Collaborator

reedy commented Oct 19, 2023

I'll test it later on the live site...

@reedy
Copy link
Collaborator

reedy commented Oct 19, 2023

Yeah.. Still doesn't work. I see it pop up trying to save, but then no error or succeed message...

@wafliron
Copy link

Same when adding as new - no more error, and it actually does show a message suggesting it was successful, but there's no sign after that of the newly-added airport via search.

@reedy
Copy link
Collaborator

reedy commented Oct 19, 2023

I'll have more of a play with my developer setup again and confirm that that is still all working (now that updated code is deployed).

It should be creating GitHub issues or leaving comments on existing ones, not actually creating or editing airports for most users

@wafliron
Copy link

wafliron commented Oct 19, 2023

My bad, I didn't realise it wasn't a direct edit / add.

That said, I don't see any sign of an issue / comment re the airport I just tried to edit, and then tried add as new (after edit appeared to fail) - Ol Kiombo Airstrip (OLX / HKOK). So maybe the functionality to create an issue / comment isn't working.

Although I do see a four year old report (#990) for the same airport with what appears to be correct data (there's three entries for it on OpenFlights now, all of which are either incorrect or incomplete). Just mentioning in case some sort of dupe-report detection blocked an issue / comment being added when I just tried to edit / add.

@reedy
Copy link
Collaborator

reedy commented Oct 19, 2023

It should leave a comment on existing tasks, as per reedy#1 and reedy#2

@wafliron
Copy link

Yep, no sign of an issue or comment being created for either my edit or add. See https://github.com/jpatokal/openflights/issues?q=olx - only references to the airport code I used is this issue, and the four-year-old issue I mentioned above.

@reedy
Copy link
Collaborator

reedy commented Oct 19, 2023

"Unfortunately", it works fine on my dev install

Screenshot 2023-10-19 at 13 12 44

Screenshot 2023-10-19 at 13 14 10

reedy#3

I then closed the issue...

Screenshot 2023-10-19 at 13 14 46

reedy#4

So definitely feels to be something local to "production"

@reedy
Copy link
Collaborator

reedy commented Oct 19, 2023

@jpatokal Are you seeing any fatal/exceptions in the logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Things that likely require server access for deployment
Projects
None yet
Development

No branches or pull requests

5 participants