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

Another Login issue - Error 500 #658

Closed
mystus opened this issue Jul 21, 2018 · 6 comments
Closed

Another Login issue - Error 500 #658

mystus opened this issue Jul 21, 2018 · 6 comments
Assignees
Milestone

Comments

@mystus
Copy link

mystus commented Jul 21, 2018

I'm encountering an issue on the live pathfinder-w.space site. When I log in with my main I get an error 500 on the ajax call to updateData coming back with the following error:

Argument 1 passed to Controller\Ccp\Universe::getSystemData() must be of the type integer, null given, called in /var/www/pathfinder-w.space/public_html/app/main/model/systemmodel.php on line 207 [/var/www/pathfinder-w.space/public_html/app/main/controller/ccp/universe.php:191]

I'm able to log in with my alt accounts, just not my main. I did try and delete my account and recreated it but with the same outcome as posted above.

Other than that - amazing work!

@colinpieper
Copy link

Yep, I broke my head for a while over this same issue. I finally found out it wasn't something in my server configuration after manually changing our main map to inactive, after which I was able to login. There was an SQL entry in my system table with systemId set to NULL. By removing this entry, the error was resolved.

I'm investigating how this could have happened, but I have yet to find anything. I'll update this post if I find anything more.

Not sure if it's of any help, but here's the Apache error code in full starting between each error:

[Wed Jul 25 07:16:43.040256 2018] [php7:notice] [pid 5092] [client x:x] Argument 1 passed to Controller\\Ccp\\Universe::getSystemData() must be of the type integer, null given, called in /var/www/pathfinder/app/main/model/systemmodel.php on line 207 [/var/www/pathfinder/app/main/controller/ccp/universe.php:191], referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040329 2018] [php7:notice] [pid 5092] [client x:x] [app/main/model/systemmodel.php:207] Controller\\Ccp\\Universe->getSystemData(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040338 2018] [php7:notice] [pid 5092] [client x:x] [app/main/model/systemmodel.php:223] Model\\SystemModel->getStaticSystemData(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040343 2018] [php7:notice] [pid 5092] [client x:x] [app/main/model/systemmodel.php:341] Model\\SystemModel->getStaticSystemValue(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040348 2018] [php7:notice] [pid 5092] [client x:x] [app/lib/db/cortex.php:1882] DB\\Cortex->emit(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040351 2018] [php7:notice] [pid 5092] [client x:x] [app/lib/magic.php:85] DB\\Cortex->get(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040354 2018] [php7:notice] [pid 5092] [client x:x] [app/lib/magic.php:126] Magic->offsetget(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040357 2018] [php7:notice] [pid 5092] [client x:x] [app/main/model/systemmodel.php:706] Magic->__get(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040359 2018] [php7:notice] [pid 5092] [client x:x] [app/main/model/systemmodel.php:450] Model\\SystemModel->getLogObjectData(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040362 2018] [php7:notice] [pid 5092] [client x:x] [app/main/model/abstractmaptrackingmodel.php:62] Model\\SystemModel->newLog(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040365 2018] [php7:notice] [pid 5092] [client x:x] [app/main/model/systemmodel.php:395] Model\\AbstractMapTrackingModel->logActivity(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040368 2018] [php7:notice] [pid 5092] [client x:x] [app/main/model/basicmodel.php:126] Model\\SystemModel->afterInsertEvent(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040371 2018] [php7:notice] [pid 5092] [client x:x] [app/lib/db/cortex.php:1581] Base->call(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040374 2018] [php7:notice] [pid 5092] [client x:x] [app/lib/db/cortex.php:1272] DB\\Cortex->emit(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040376 2018] [php7:notice] [pid 5092] [client x:x] [app/main/model/basicmodel.php:831] DB\\Cortex->save(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040379 2018] [php7:notice] [pid 5092] [client x:x] [app/main/model/abstractmaptrackingmodel.php:111] Model\\BasicModel->save(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040382 2018] [php7:notice] [pid 5092] [client x:x] [app/main/model/mapmodel.php:1267] Model\\AbstractMapTrackingModel->save(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040384 2018] [php7:notice] [pid 5092] [client x:x] [app/main/controller/api/map.php:1079] Model\\MapModel->saveSystem(), referer: https://x.com/map/Nw%3D%3D
[Wed Jul 25 07:16:43.040481 2018] [php7:notice] [pid 5092] [client x:x] [app/main/controller/api/map.php:893] Controller\\Api\\Map->updateMapData(), referer: https://x.com/map/Nw%3D%3D

@exodus4d
Copy link
Owner

I saw the same problem right after the 1.4.0 upgrade. I have already fixed this (develop branch). You should be able to replace app/main/model/mapmodel.php with this version:
https://github.com/exodus4d/pathfinder/blob/11e61d064eb40267eb8534d935151e79103f97e9/app/main/model/mapmodel.php
My public installation was also fixed a few hours after the update.
In addition. please manually delete all data from system table where systemId id empty or null

@Derjyn
Copy link

Derjyn commented Aug 7, 2018

Running into this same issue. Main (first character added on new install) gets booted after 3 seconds. Adding a new character? They are fine. Tried with your updated mapmodel.php, running a completely new install with 1.4.0 and 1.4.1 (which had other issues), without any success.

@mrurb
Copy link

mrurb commented Aug 11, 2018

This problem just occured on our pathfinder today running pathfinder 1.4.0, for some reason we had a system with systemid null.

@exodus4d
Copy link
Owner

@mrurb have you replaced the mapmodel.php (check my comment #658 (comment)) This will solve the problem. You can ignore all the other changed from my commit 11e61d0 but you need the changes made in mapmodel.php.
Those two lines are important:

Fore those who are interested in a more detailed bug description:

  • When a pilot jumps between systems which are not mapped in Pathfinder , Pathfinder internally creates those "source" and "target" System objects.
  • Then PF do some checks whether the new systems/connection should be added to that map or not (e.g. check map scope, check jump distance between systems,....)
  • At the end PF decides which system/connection get auto saved to the map or do nothing with those unsaved System objects (e.g. Stargate jumps will not get saved on WH maps, .....)

The method I used to get those fresh System object instances ->rel() (https://github.com/ikkez/f3-cortex#rel) always returns a reference to the same System object if it is called multiple times. As long as the System object is not saved to DB. Now we get problems when setting values zu SystemA (source system) because they are applied to SystemB as well. This leads to the bug.

This behavior is fine for most use cases but not when you have to juggle with multiple unsaved object instances at the same time.

@exodus4d exodus4d mentioned this issue Sep 17, 2018
@exodus4d
Copy link
Owner

✔️ Issue resolved

This issue was resolved by the commit(s) and/or the comments above.
It will be auto-closed with the upcoming release ( merge into master branch). Please check the attached Milestone information.

Many thanks to all participants/contributors for the helpful comments! 👍

ℹ️ Please reopen/comment this, if you have problems/questions about it.


Auto-generated response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants