Sarjuuk / aowow

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

Encountered error message while executing installation script. #415

Closed luyingwei80 closed 1 month ago

luyingwei80 commented 1 month ago

I encountered the following warning prompt while executing "PHP aowow -- setup":

07:06:53 [INFO] leaving site configuration... 07:06:53 SqlGen::generate() - filling aowow_areatrigger with data 07:06:53 indexing game data from setup/mpqdata/ for first time use... 07:06:53 done 07:06:53 - reading areatrigger.dbc 07:06:53 - reading worldmaparea.dbc 07:06:53 - reading dungeonmap.dbc 07:06:53 - fetching taverns 07:06:54 - calculation teleporter coordinates 07:06:54 [WARN] AT 45 teleporter endpoint Scarlet Monastery - Graveyard (Entrance) could not be matched to displayable area [M:189; X:1688.99; Y:1053.48] 07:06:54 [WARN] AT 78 teleporter endpoint DeadMines Entrance could not be matched to displayable area [M:36; X:-16.4; Y:-383.07] 07:06:54 [WARN] AT 101 teleporter endpoint Stormwind Stockades Entrance could not be matched to displayable area [M:34; X:54.23; Y:0.28] 07:06:54 [WARN] AT 107 teleporter endpoint Stormwind Vault Entrance could not be matched to displayable area [M:35; X:-0.91; Y:40.57] 07:06:54 [WARN] AT 145 teleporter endpoint Shadowfang Keep Entrance could not be matched to displayable area [M:33; X:-229.135; Y:2109.18] ........ ........ 07:06:55 [WARN] AT 5447 teleporter endpoint Arena - Orgrimmar - Teleport Target 3 could not be matched to displayable area [M:618; X:763.365; Y:-284.29] 07:06:55 - satisfying quest objectives 07:06:55 - assigning scripts 07:06:56 SqlGen::generate() - filling aowow_achievementcriteria with data 07:06:56 SqlGen::generate() - copying achievement_criteria.dbc into aowow_achievementcriteria 07:06:56 - reading and merging achievement_criteria.dbc for locales 0 07:06:57 SqlGen::generate() - filling aowow_glyphproperties with data 07:06:57 - reading glyphproperties.dbc 07:06:57 - reading spellicon.dbc 07:06:57 SqlGen::generate() - filling aowow_itemenchantment with data 07:06:57 - reading and merging spellitemenchantment.dbc for locales 0 07:06:57 [WARN] E_WARNING - mysqli_query(): (42S22/1054): Unknown column 'EnchantID' in 'field list' @ /var/www/html/includes/libs/DbSimple/Mysqli.php:165 07:06:57 [WARN] E_WARNING - foreach() argument must be of type array|object, false given @ /var/www/html/setup/tools/sqlgen/itemenchantment.func.php:30 07:06:57 SqlGen::generate() - filling aowow_itemenchantmentcondition with data 07:06:57 SqlGen::generate() - copying spellitemenchantmentcondition.dbc into aowow_itemenchantmentcondition 07:06:57 - reading spellitemenchantmentcondition.dbc 07:06:57 SqlGen::generate() - filling aowow_itemextendedcost with data 07:06:57 SqlGen::generate() - copying itemextendedcost.dbc into aowow_itemextendedcost 07:06:57 - reading itemextendedcost.dbc 07:06:57 SqlGen::generate() - filling aowow_itemlimitcategory with data 07:06:57 SqlGen::generate() - copying itemlimitcategory.dbc into aowow_itemlimitcategory 07:06:57 - reading and merging itemlimitcategory.dbc for locales 0 07:06:57 SqlGen::generate() - filling aowow_itemrandomproppoints with data 07:06:57 SqlGen::generate() - copying randproppoints.dbc into aowow_itemrandomproppoints 07:06:57 - reading randproppoints.dbc 07:06:57 SqlGen::generate() - filling aowow_lock with data 07:06:57 SqlGen::generate() - copying lock.dbc into aowow_lock 07:06:57 - reading lock.dbc 07:06:57 SqlGen::generate() - filling aowow_mails with data 07:06:57 - reading and merging mailtemplate.dbc for locales 0 07:06:57 SqlGen::generate() - merging achievement_reward into aowow_mails 07:06:57 [WARN] E_WARNING - mysqli_query(): (42S22/1054): Unknown column 'arl2.Body' in 'field list' @ /var/www/html/includes/libs/DbSimple/Mysqli.php:165 Exception - array_values(): Argument #1 ($array) must be of type array, false given /var/www/html/setup/tools/sqlgen/mailtemplate.func.php(55)

0 /var/www/html/setup/tools/sqlgen/mailtemplate.func.php(55): array_values()

1 /var/www/html/setup/tools/sqlGen.class.php(239): SetupScript@anonymous->generate()

2 /var/www/html/setup/tools/clisetup/setup.func.php(300): SqlGen::generate()

3 /var/www/html/setup/setup.php(40): setup()

4 /var/www/html/aowow(10): require('...')

5 {main}

I am uncertain about how to tackle these issues. I would appreciate your guidance on the best course of action when you have some time. Thank you!

OS:ubuntu 24.04 MYSQL:8.0 PHP:8.3

Sarjuuk commented 1 month ago
07:06:57 [WARN] E_WARNING - mysqli_query(): (42S22/1054): Unknown column 'EnchantID' in 'field list' @ /var/www/html/includes/libs/DbSimple/Mysqli.php:165
07:06:57 [WARN] E_WARNING - foreach() argument must be of type array|object, false given @ /var/www/html/setup/tools/sqlgen/itemenchantment.func.php:30
SELECT EnchantID AS ARRAY_KEY, Chance AS procChance, ProcsPerMinute AS ppmRate FROM spell_enchant_proc_data

https://trinitycore.info/database/335/world/spell_enchant_proc_data

Your server DB is mismatching. Are you using AzerothCore or is the wiki out of date?

07:06:57 [WARN] E_WARNING - mysqli_query(): (42S22/1054): Unknown column 'arl2.Body' in 'field list' @ /var/www/html/includes/libs/DbSimple/Mysqli.php:165
Exception - array_values(): Argument https://github.com/Sarjuuk/aowow/issues/1 ($array) must be of type array, false given
/var/www/html/setup/tools/sqlgen/mailtemplate.func.php(55)
#0 /var/www/html/setup/tools/sqlgen/mailtemplate.func.php(55): array_values()
https://github.com/Sarjuuk/aowow/issues/1 /var/www/html/setup/tools/sqlGen.class.php(239): SetupScript@anonymous->generate()
https://github.com/Sarjuuk/aowow/issues/2 /var/www/html/setup/tools/clisetup/setup.func.php(300): SqlGen::generate()
https://github.com/Sarjuuk/aowow/issues/3 /var/www/html/setup/setup.php(40): setup()
https://github.com/Sarjuuk/aowow/issues/4 /var/www/html/aowow(10): require('...')
https://github.com/Sarjuuk/aowow/issues/5 {main}

https://trinitycore.info/database/335/world/achievement_reward_locale

same thing as above

also PLEASE put your logs in triple backticks to make them manageable, like: ``` log stuff ```

Sarjuuk commented 1 month ago
07:06:54 [WARN] * AT <ID> teleporter endpoint <AT NAME> could not be matched to displayable area [<COORDINATES>]

expected. The client doesn't have maps for most instanced areas, so display map positions can't be calculated. This will reoccur later when calculating spawn points for npcs/objects and waypoints.

You could manually add map boundaries to worldmaparea and dungeonmap but i don't recommend that. It's a lot of work.

luyingwei80 commented 1 month ago

Thank you very much for your reply.

I did use Azerothcore, and after reading your suggestions, I recompiled a Trinity core with the latest date (335.24041), but the problem still persists. Based on the previous situation where db_structure.SQL imported incorrectly in MySQL but had no issues importing in MariaDB, I tried to replace the database with MariaDB, and sure enough, the installation program can start working. But after about a few tens of minutes, errors started to occur again.

I am almost completely clueless about databases and PHP programming, so I cannot find out where the problem lies. I hope you can give me some advice again when you have free time. Thank you very much.

04:06:08  [WARN]  GUID 208753 on path/point -2087530/4 could not be matched to displayable area [A:0; X:56.4421; Y:-360.755]
04:06:08           * 137483 / 138266 (99.4%) [creature spawns, gameobject spawns, sound emitter
04:06:08  [WARN]  GUID 208753 on path/point -2087530/5 could not be matched to displayable area [A:0; X:39.5831; Y:-371.754]
04:06:08           * 137484 / 138266 (99.4%) [creature spawns, gameobject spawns, sound emitter
04:06:08  [WARN]  GUID 208753 on path/point -2087530/6 could not be matched to displayable area [A:0; X:28.6212; Y:-384.736]
04:06:08           * 137485 / 138266 (99.4%) [creature spawns, gameobject spawns, sound emitter
04:06:08  [WARN]  60 accessories could not be fitted onto a spawned vehicle.
04:06:08          SqlGen::generate() - filling aowow_zones with data
04:06:08          indexing game data from setup/mpqdata/ for first time use...
04:06:10          done
04:06:10           - reading mapdifficulty.dbc
04:06:10           - reading and merging lfgdungeons.dbc for locales 0
04:06:10           - reading battlemasterlist.dbc
04:06:40  [WARN]  E_WARNING - mysqli_query(): (08S01/1153): Got a packet bigger than 'max_allowed_packet' bytes @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:165
04:06:40  [WARN]  E_WARNING - mysqli_ping(): (HY000/2006): MySQL server has gone away @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:164
04:06:40  [WARN]  E_WARNING - mysqli_query(): (HY000/2006): MySQL server has gone away @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:165
04:06:40  [WARN]  E_WARNING - mysqli_ping(): (HY000/2006): MySQL server has gone away @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:164
04:06:40  [WARN]  E_WARNING - mysqli_query(): (HY000/2006): MySQL server has gone away @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:165
04:06:40  [WARN]  E_WARNING - mysqli_ping(): (HY000/2006): MySQL server has gone away @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:164
04:06:40  [WARN]  E_WARNING - mysqli_query(): (HY000/2006): MySQL server has gone away @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:165
...
...
...
04:06:40  [WARN]  E_WARNING - mysqli_ping(): (HY000/2006): MySQL server has gone away @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:164
04:06:40  [WARN]  E_WARNING - mysqli_query(): (HY000/2006): MySQL server has gone away @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:165
Exception - in_array(): Argument #2 ($haystack) must be of type array, bool given
   /var/www/wow/setup/tools/sqlgen/zones.func.php(163)
#0 /var/www/wow/setup/tools/sqlgen/zones.func.php(163): in_array()
#1 /var/www/wow/setup/tools/sqlGen.class.php(239): SetupScript@anonymous->generate()
#2 /var/www/wow/setup/tools/clisetup/setup.func.php(300): SqlGen::generate()
#3 /var/www/wow/setup/setup.php(40): setup()
#4 /var/www/wow/aowow(10): require('...')
#5 {main}
Sarjuuk commented 1 month ago
SHOW VARIABLES LIKE 'max_allowed_packet';

can you check your max_allowed_packet? It's 16M (or 16777216) for me.

when i run the query in question i get about 500kb of data back, which gets slightly modified, then reinserted here https://github.com/Sarjuuk/aowow/blob/f6565ea924d3d899f9fc8a5b0fd8cc88e92dfed1/setup/tools/sqlgen/zones.func.php#L134

i don't think the process itself failed or it would have thrown some kind of error earlier.

luyingwei80 commented 1 month ago

This is the result of my system query, which should also be 16M:

MariaDB [(none)]> show VARIABLES like '%max_allowed_packet%';
+--------------------------+------------+
| Variable_name            | Value      |
+--------------------------+------------+
| max_allowed_packet       | 16777216   |
| slave_max_allowed_packet | 1073741824 |
+--------------------------+------------+
2 rows in set (0.000 sec)

I just updated your source code and rerun the installation program, but the problem still persists:

02:42:03  [WARN]  GUID 208753 on path/point -2087530/6 could not be matched to displayable area [A:0; X:28.6212; Y:-384.736]
02:42:03           * 137485 / 138266 (99.4%) [creature spawns, gameobject spawns, sound emitter
02:42:03  [WARN]  60 accessories could not be fitted onto a spawned vehicle.
02:42:04          SqlGen::generate() - filling aowow_zones with data
02:42:33  [WARN]  E_WARNING - mysqli_query(): (08S01/1153): Got a packet bigger than 'max_allowed_packet' bytes @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:165
02:42:33  [WARN]  E_WARNING - mysqli_ping(): (HY000/2006): MySQL server has gone away @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:164
02:42:33  [WARN]  E_WARNING - mysqli_query(): (HY000/2006): MySQL server has gone away @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:165
...
...
02:42:33  [WARN]  E_WARNING - mysqli_ping(): (HY000/2006): MySQL server has gone away @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:164
02:42:33  [WARN]  E_WARNING - mysqli_query(): (HY000/2006): MySQL server has gone away @ /var/www/wow/includes/libs/DbSimple/Mysqli.php:165
Exception - in_array(): Argument #2 ($haystack) must be of type array, bool given
   /var/www/wow/setup/tools/sqlgen/zones.func.php(163)
#0 /var/www/wow/setup/tools/sqlgen/zones.func.php(163): in_array()
#1 /var/www/wow/setup/tools/sqlGen.class.php(239): SetupScript@anonymous->generate()
#2 /var/www/wow/setup/tools/clisetup/setup.func.php(300): SqlGen::generate()
#3 /var/www/wow/setup/setup.php(40): setup()
#4 /var/www/wow/aowow(10): require('...')
#5 {main}
luyingwei80 commented 1 month ago

Thank you for your reply. Your suggestion is correct. Although I am not sure about the specific function of this variable, I have tried to adjust it from the original 16M to 1GB, and the installation program can finally be completed smoothly. However, there may seem to be some errors on the website, but anyway it can start working. Thank you very much.

I will try to install it again in the MYSQL database later to confirm if the previous issue will reappear.

Also, I have another question to consult with you: Do all the files obtained from releasing MPQ need to be placed in the/setup/mpqdata directory? Or is it enough to simply explain what is mentioned in the document? Like:

/DBFilesClient/ /Interface/WorldMap/ /Interface/FrameXML/GlobalStrings.lua /Interface/TalentFrame/ /Interface/Glues/Credits/ /Interface/Icons/ /Interface/Spellbook/ /Interface/PaperDoll/ /Interface/GLUES/CHARACTERCREATE/ /Interface/Pictures /Interface/PvPRankBadges /Interface/FlavorImages /Interface/Calendar/Holidays/ /Sound/ Do these files still need to be retained after the website can run? Can I delete them? ![image](https://github.com/Sarjuuk/aowow/assets/67801546/deff4e97-9ac1-4742-bda6-6fabb43a801b)
Sarjuuk commented 1 month ago

/setup/mpqdata/ is not required to use the site itself. BUT should you ever run parts of the setup again, because of an update to either aowow or you game they'll be needed again.

If disk space is of concern you should at least keep /DBFilesClient/: as those are almost guaranteed to be needed later on. /Interface/: probably not. I'm not touching image generation anytime soon. *The Monkey's paw curls a finger*^ /Sound/: Even more unlikely i'll be touching this again.

< Image > The cache direcotry need to be writeable by aowow (chmod 0777). See Readme #3

Out of morbid curiosity: How many zones do you see in your DB /?zones. Should be about 2.3k when you are logged in as admin and about 172 for regular users (they do not see the individual subzones)

luyingwei80 commented 1 month ago

You are right, it is indeed as much as 2.3K. The World of Warcraft database you created is very impressive. Haha~~~ Also, the caching issue has been resolved. Thank you very much. image

Sarjuuk commented 1 month ago

But the zones are unnamed, so something is still off.

can you check in the db directly, what name_locX fields are populated? Table is aowow_zones.

luyingwei80 commented 1 month ago

Because I am using the Simplified Chinese client, if the website is selected in Simplified Chinese, the name of the region will be displayed correctly. image

Sarjuuk commented 1 month ago

Fair enough. As english is the fallback for everything, there is no fallback if english itself is missing.^^

This should be all. :]

luyingwei80 commented 1 month ago

Another small idea is that it would be even better if the account registration function of the AC/TC server could be integrated into the website.

luyingwei80 commented 1 month ago

Fair enough. As english is the fallback for everything, there is no fallback if english itself is missing.^^

This should be all. :]

I think if want to fully display information in different language versions, we need to export MPQ files from different versions of the client.^_^

luyingwei80 commented 1 month ago

I have just successfully reinstalled the project on MYSQL, and the website is now running smoothly. It is gratifying to have the World of Warcraft database running. Thank you very much for your help and guidance!

Sarjuuk commented 1 month ago

Another small idea is that it would be even better if the account registration function of the AC/TC server could be integrated into the website.

Yes that would be great, i don't think i'll ever have the time for this luxury.