Closed lach3v closed 3 years ago
Do I have to enable the "Profiler" somewhere -> "CFG_PROFILER_ENABLE" ?
of course you do. Either on the page itself -> Tab: Staff > Development > Site configuration
or from the CLI -> php aowow --siteconfig
and check the Profiler group.
/e: also i have no idea if it works with Azerothcore.
I had no idea that there is an admin panel in the site. Thank you for your response! It's supposedly compatible with AzerothCore, since it's listed in their github, and I've seen recommendations to use it.
So I tried to enable it both ways. From the page when I clicked "enable", I got a yellow triangle and a message "failed to start queue". Then I ran php aowow --siteconfig
as you suggested, and realized that the problem was with the write permissions.
So I fixed them and the profiler is running now. Thank you very much for the help!
Just one more thing. Now, when I click on a character for the first time, I get:
An Armory resync has been requested.
Data is ready! Reload to view.
And the character page is loading fine.
If I reload the same page, or go back to the list and click on the same character - the page is blank.
Is this intended, like some sort of anti-flood function or it's not supposed to work this way? Is there a setting for it? Or do you think it could be again a write permission issue?
I ran sudo chmod -R a+rwx /var/www/html/aowow
last time. Will that be enough?
Edit: Everytime when I load a character for the first time, and I get a new logfile in Cache
folder, named profiler.log
And this is the content in all of them:
02:04:29 [OK] profiler queue started
02:04:29 sleeping 3.00s..
02:04:32 fetching char #19 from realm #1
02:04:32 writing...
02:04:32 ..inventory
02:04:32 ..basic info
02:04:32 ..quests
02:04:32 ..professions
02:04:32 ..reputation
02:04:32 ..titles
02:04:32 ..achievements
02:04:32 ..raid progression
02:04:32 ..known spells (vanity pets & mounts)
02:04:32 ..associated arena teams
02:04:32 sleeping 3.00s..
02:04:35 [INFO] profiler queue empty - process halted!
aw shux .. i have Ruffle bookmarked to test at some point. Too bad its not yet working for this swf.
anyway
I ran
sudo chmod -R a+rwx /var/www/html/aowow
last time. Will that be enough?
You went nuclear and now everybody can access everything. Yes that will be enough.
Seeing a blank page is not normal. Please check the dev console of your browser for javascript errors. Also check if you can find a similar looking html block on the page
<div id="profilah-generic"></div>
<script type="text/javascript">//<![CDATA[
var profilah = new Profiler();
profilah.initialize('profilah-generic', { id: 123456 });
pr_setRegionRealm($WH.gE($WH.ge('topbar'), 'form')[0], 'eu', 'SomeRealmName');
//]]></script>
The log looks fine. Chars only get imported initially and refreshed when a configurable age has expired. Or when manually requested to do so.
When I load a character page for the first time, I get this in the dev console:
Warning (yellow):
DevTools failed to load SourceMap: Could not load content for chrome-extension://kjacjjdnoddnpbbcjilcajfhhbdhkpgk/js/browser-polyfill.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
VM87:3 New Ruffle instance created.
VM87:3 Loading SWF file http://www.website.com/aowow/static/modelviewer/ZAMviewerfp11.swf
The character page is loading okay. When I click on the reload button and get a blank page, the output is this:
Error (red):
Profiler.js?28:568 Uncaught ReferenceError: g_gems is not defined
at _initData (Profiler.js?28:568)
at Profiler.initialize (Profiler.js?28:164)
at ?profile=us.testrealm.albus:80
_initData @ Profiler.js?28:568
Profiler.initialize @ Profiler.js?28:164
(anonymous) @ ?profile=us.testrealm.albus:80
Warning (yellow):
DevTools failed to load SourceMap: Could not load content for chrome-extension://kjacjjdnoddnpbbcjilcajfhhbdhkpgk/js/browser-polyfill.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
That happens every time I reload a character page.
I opened the source code as you suggested and found this:
<div id="profilah-generic"></div>
--
| <script type="text/javascript">//<![CDATA[
| var profilah = new Profiler();
| profilah.initialize('profilah-generic', { id: 9 });
| pr_setRegionRealm($WH.gE($WH.ge('topbar'), 'form')[0], 'us', 'testrealm');
| //]]></script>
Any ideas?
g_gems is not defined
two possibilities. Either the datasets haven't been generated or they are not included in the html.
a) check aowow/datasets/<yourLocaleString>/gems
. It should contain a couple hundred items of
var g_gems = {
"49110": {
"name": "Nightmare Tear",
"quality": 4,
"icon": "inv_misc_gem_pearl_12",
"enchantment": "+10 All Stats",
"jsonequip": {
"agi": 10,
"str": 10,
"int": 10,
"spi": 10,
"sta": 10
},
"colors": 14,
"expansion": 2,
"gearscore": 20
},
[...]
}
if it doesn't run php aowow --build=gems
b) the include is bugging out. check the pages source for this line
<script src="?data=enchants.gems.glyphs.itemsets.pets.pet-talents.quick-excludes.realms.statistics.weight-presets.achievements&locale=<localeId>&t=<someHash>&<revisionNr>" type="text/javascript"></script>
Try to open it manually and search for g_gems
. it should contain the file from a)
So this is the content of my gems file: https://pastebin.com/FuHBXRUZ
This line does not exists in the source code of the blank page:
<script src="?data=enchants.gems.glyphs.itemsets.pets.pet-talents.quick-excludes.realms.statistics.weight-presets.achievements&locale=<localeId>&t=<someHash>&<revisionNr>" type="text/javascript"></script>
Try to open it manually and search for g_gems. it should contain the file from a)
Sorry, are you talking about profiler.class.php
?
If it's this file, the only "gems" that it has is:
if ($gemItems)
{
$gemScores = new ItemList(array(['id', array_column($gemItems, 0)]));
foreach ($gemItems as [$itemId, $mult])
if (isset($gemScores->json[$itemId]['gearscore']))
$data['gearscore'] += $gemScores->json[$itemId]['gearscore'] * $mult;
}
Again, not sure if that was the file you meant.
Edit: This is the source code of my blank character page: https://pastebin.com/7WYk7D0d
oh boy.. From here on out you are mostly on your own as i can't reproduce this. The missing js gets added here: https://github.com/Sarjuuk/aowow/blob/f5701e79796c5d22cb04ad8a304dcbcbb143cbec/pages/profile.php#L134-L141
since you have the jscript to create a new profiler in the html the correct template got chose, so it's probably not trying to resync
This means ProfilePage::generateContent
got skipped whole.
So i guess it's loading a cached version of the page that is missing the added line of jscript? https://github.com/Sarjuuk/aowow/blob/f5701e79796c5d22cb04ad8a304dcbcbb143cbec/pages/genericPage.class.php#L355-L368 Try disabling caching and if it starts working, please try to find out why the cache is incomplete.
/e: maybe try cherry-pick 583f8658d7f043643db51ab754495d4baf49614c
/e²: sounds familiar #215 ... you should really cherry-pick this commit.
I disabled the Cache and now it's working like a charm. It reloads immediately, no matter how many times I reload. I will test that fix you proposed later or tomorrow morning and will report back the result.
Thank you for your help!
I've applied the above fix and now it works with enabled Cache.
Thanks a million, I really appreciate your help!
Hello there,
I have installed "aowow", following all steps described in the readme and as a result the website mostly loads fine, except the Profiler section.
These are the links that does not work:
Tools - Profiler -> Characters Tools - Profiler -> Guilds Tools - Profiler -> Arena Teams Tools - Profiler -> New
And this is the Error Page I'm getting:
My aowow/config.cfg looks like that:
My database names are:
acore_auth = Login Database acore_characters = Character Database acore_world = World Database aowow = Aowow Database
My Realm ID is 1 in the database. And I'm using AzerothCore BTW.
It seem like everything is set, but I don't understand why the character armory section is not showing. Am I missing something? If you have any idea what I'm doing wrong, please let me know.
Any help appreciated!
Thank you.
Edit: I was digging in the code and found this fragment:
Do I have to enable the "Profiler" somewhere -> "CFG_PROFILER_ENABLE" ?