Sarjuuk / aowow

Database viewer for TrinityCore based on aowow by @LordJZ, based on the JS-Engine of Wowhead
204 stars 217 forks source link

Unable to finish installation of aowow - Exception - Game::worldPosToZonePos(): Argument #4 ($areaId) must be of type int, string given, called in /var/www/html/aowow/setup/tools/sqlgen/spawns.func.php on line 123 /var/www/html/aowow/includes/game.php(326) #350

Closed 33mirra33 closed 6 months ago

33mirra33 commented 2 years ago

Hello,

firstly I want to thank you for, what you did on this project. You are working on amazing project and even through I am unable in my free time to make it work properly and try to finish the installation, I fully accept, that you are doing something really awesome. Thank you very much.

Describe the bug and how to reproduce it I am installing on php 7.4.26/8.0.x/8.1.6 debian 11 aowow and I am unable to finish installation.

23:44:07          SqlGen::generate() - filling aowow_spawns with data
23:44:07           - reading and merging map.dbc for locales 0
23:44:07           - reading taxipathnode.dbc
23:44:07           - reading soundemitters.dbc
23:44:07           - reading and merging areatable.dbc for locales 0
23:44:07           - assembling creature spawns
23:44:08           * sets 1 - 1000
Exception - Game::worldPosToZonePos(): Argument #4 ($areaId) must be of type int, string given, called in /var/www/html/aowow/setup/tools/sqlgen/spawns.func.php on line 123
   /var/www/html/aowow/includes/game.php(326)
#0 /var/www/html/aowow/setup/tools/sqlgen/spawns.func.php(123): Game::worldPosToZonePos()
#1 /var/www/html/aowow/setup/tools/sqlGen.class.php(239): SetupScript@anonymous->generate()
#2 /var/www/html/aowow/setup/tools/clisetup/setup.func.php(292): SqlGen::generate()
#3 /var/www/html/aowow/setup/setup.php(40): setup()
#4 /var/www/html/aowow/aowow(10): require('...')
#5 {main}

When I try to run setup and continue where it ended it will show this:

# php aowow --setup
23:48:44          FileGen::init() - creating required directories
23:48:44          created 8 extra paths

23:48:44  [INFO]  Found firstrun progression info. (Halted on subscript spawns)

continue setup? (y/n):
23:48:46          Resuming setup from step 43...
23:48:47          SqlGen::generate() - filling aowow_spawns with data
23:48:47           - assembling creature spawns
23:48:47           * sets 1 - 1000
Exception - Game::worldPosToZonePos(): Argument #4 ($areaId) must be of type int, string given, called in /var/www/html/aowow/setup/tools/sqlgen/spawns.func.php on line 123
   /var/www/html/aowow/includes/game.php(326)
#0 /var/www/html/aowow/setup/tools/sqlgen/spawns.func.php(123): Game::worldPosToZonePos()
#1 /var/www/html/aowow/setup/tools/sqlGen.class.php(239): SetupScript@anonymous->generate()
#2 /var/www/html/aowow/setup/tools/clisetup/setup.func.php(292): SqlGen::generate()
#3 /var/www/html/aowow/setup/setup.php(40): setup()
#4 /var/www/html/aowow/aowow(10): require('...')
#5 {main}

At this point I am unable to continue installation, it just crash like this back to shell.


**Screenshots**
# php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
pspell
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules] Zend OPcache

System:

TQPS commented 10 months ago

I am also getting this after upgrading my server to MySql v8.x

Pages work from previous version but depreciation warning messages are constantly popping up; Icons don't display and cant regenerate or run setup due to the errors described above.

Krutok commented 10 months ago

I am also getting this after upgrading my server to MySql v8.x

Pages work from previous version but depreciation warning messages are constantly popping up; Icons don't display and cant regenerate or run setup due to the errors described above.

is the same problem as mine https://github.com/Sarjuuk/aowow/issues/352, only with the zones.

But I think the project here is dead anyway, the author hasn't been in touch for ages

33mirra33 commented 10 months ago

@Krutok + @TQPS My best advice is to run it under a docker with old MySQL, PHP 5.6 or PHP 7.1 or maybe PHP 7.2 with all possible modules and route the traffic only to this container. Security will still be bad, but docker has its own separate namespaces. The other option is to rewrite and refactor all the code written in the Aowow project, and nobody probably wants to do that kind of hard work, and I understand they won't.

Krutok commented 10 months ago

My best advice is to run it under a docker with old MySQL, PHP 5.6 or PHP 7.1 or maybe PHP 7.2 with all possible modules and route the traffic only to this container. Security will still be bad, but docker has its own separate namespaces. The other option is to rewrite and refactor all the code written in the Aowow project, and nobody probably wants to do that kind of hard work, and I understand they won't.

Docker is out of the question for me. Either it works as intended or I just don't use it. It's just a shame that the developer doesn't get in touch anymore, so I assume after more than a year that the project is dead and nothing more will come.

33mirra33 commented 10 months ago

If you find an alternative to aowow, could you please let us know? Thank you.

Krutok commented 10 months ago

If you find an alternative to aowow, could you please let us know? Thank you.

Unfortunately there is no alternative at the moment.

Sarjuuk commented 7 months ago

I am installing on php 7.4.26/8.0.x/8.1.6

so, what version was it actually...?

In any case. I could not reproduce that. The quick and dirty solution would be to add a typecast to int here: https://github.com/Sarjuuk/aowow/blob/master/setup/tools/sqlgen/spawns.func.php#L131 like

                $points = Game::worldPosToZonePos($spawn['map'], $spawn['posX'], $spawn['posY'], intVal($area), $floor);