Bug - Fixed Timeout in valhalla tries to run login scripts

taltamir

Member
When you timeout in valhalla (such as due to minimizing the page for half an hour because the preascension script takes 5 minutes to do everything you want it to do). when you come back it performs a login, after which it determines that you are in a new ascension so it runs the post ascension script and login script. trying to do a bunch of actions that cannot be done while in valhalla

I think that when doing the login refresh it should try to identify valhalla and if it determines you are in it then do not run the login and post ascension scripts
 

Veracity

Developer
I am confused.

You are running your preAscensionScript, but when you login again after a timeout, you are in a "new ascension"?

Looking at LoginManager.timein, I see the following:

Code:
	public static final void timein( final String username )
	{
		// See if we are timing in across rollover.
		// api.php has rollover time in it
		RequestThread.postRequest( new ApiRequest( "status" ) );

		// Assume if rollover has changed by an hour, it is a new rollover.
		// Time varies slightly between servers by a few seconds.
		long lastRollover = Preferences.getLong( "lastCounterDay" );
		long newRollover = KoLCharacter.getRollover();
		if ( ( newRollover - lastRollover  ) > 3600 )
		{
			// This is the first login after rollover.
			// Treat it as a full login
			LoginManager.login( username );
			return;
		}

		// Save the current user settings to disk
		Preferences.reset( null );

		// Reload the current user's preferences
		Preferences.reset( username );

		// Close existing session log and reopen it
		RequestLogger.closeSessionLog();
		RequestLogger.openSessionLog();

		// The password hash changes for each session
		PasswordHashRequest request = new PasswordHashRequest( "lchat.php" );
		RequestThread.postRequest( request );

		// Some things aren't properly set by KoL until main.php is loaded
		RequestThread.postRequest( new GenericRequest( "main.php" ) );
	}
Which is to say, it goes to api.php (which we have just learned doesn't work in Valhalla), lchat.php (to get your new password hash) and main.php (to make KoL finish updating certain things, but probably doesn't work in Valhalla.)

There is nothing here to "run your post ascension script" or "login script", since you are not logging in.

What do you mean by "when you come back"? When you come back and do WHAT, exactly? Perhaps you are not timing in? Perhaps you logout and try to log in again?

Except, looking at LoginManager.doLogin:

Code:
	private static void doLogin( String username )
	{
		LoginRequest.isLoggingIn( true );

		try
		{
			ConcoctionDatabase.deferRefresh( true );
			LoginManager.initialize( username );
		}
		finally
		{
			ConcoctionDatabase.deferRefresh( false );
			LoginRequest.isLoggingIn( false );
		}

		// Abort further processing in Valhalla.
		if ( CharPaneRequest.inValhalla() )
		{
			return;
		}
If it is going to run your loginScript, you are NOT in Valhalla.

Are you really in Valhalla? Or did your "preAscensionScript" then proceed to jump the gash into Valhalla, automate ascending, whatever?

What did you do?
 

taltamir

Member
I am confused.

You are running your preAscensionScript, but when you login again after a timeout, you are in a "new ascension"?
I will try to be clearler.

1. I click to enter valhalla
2. I minimize it while it is working (since it does preascension first)
3. when i come back some time later i am in valhalla and timed out.
4. I click on the pearly gates, this causes mafia to do a quick login and immediately try to run login script. which naturally fails because i am in valhalla

I got a log. although it is not showing all the error messages.

here is me going into valhalla
Code:
Preference lastBreakfast changed from 9 to 0
Preference lastIslandUnlock changed from 51 to 0
Preference knownAscensions changed from 51 to 52
Preference lastBreakfast changed from 0 to -1
Preference lastCounterDay changed from 1602041399 to 1602041398
Preference breakfastCompleted changed from true to false
Preference cocktailSummons changed from 1 to 0
Preference currentPvpVictories changed from scorpionxx,talt3,hrdahl,Zanthia,MrKol,atratus,Lymea, to 
Preference noodleSummons changed from 1 to 0
Preference reagentSummons changed from 1 to 0
Preference _dailySpecial changed from Taco Dan's Taco Stand Taco to 
Preference _dailySpecialPrice changed from 45 to 0
Preference _eldritchTentacleFought changed from true to false
Preference _lastCombatStarted changed from 20201006064952 to 
Preference _timeSpinnerFoodAvailable changed from 575 to 
Preference eldritchTentaclesFought changed from 2 to 0
Preference singleFamiliarRun changed from -1 to 0
Preference spookyPuttyMonster changed from something <i>totally</i> unrecognizable to 
Preference lastCouncilVisit changed from 8 to 0
Preference hasRange changed from true to false
Preference hasShaker changed from true to false
Preference questL02Larva changed from finished to unstarted
Preference questL03Rat changed from step1 to unstarted
Preference questL06Friar changed from started to unstarted
Preference questL08Trapper changed from started to unstarted
Preference questG07Myst changed from finished to unstarted
Preference questM02Artist changed from started to unstarted
Preference questM05Toot changed from started to unstarted
Preference questM19Hippy changed from finished to unstarted
Preference questM20Necklace changed from started to unstarted
Preference questM23Meatsmith changed from started to unstarted
Preference questM24Doc changed from finished to unstarted
Preference questM25Armorer changed from finished to unstarted
Preference relayCounters changed from 275:Fortune Cookie:fortune.gif to 


Welcome to Valhalla!
Which is about where i time out. when i come back and click the pearly gates it does that timein quick login thing and shows me
Code:
Preference nextAdventure changed from None to The Old Landfill
Preference hpAutoRecovery changed from 0.7 to -0.05
Preference mpAutoRecovery changed from 0.2 to -0.05




=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       Beginning New Ascension         
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Ascension #0:
Softcore No-Path Astral Spirit
None








=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=




Preference relayCounters changed from  to 70:Semirare window begin:lparen.gif
Preference relayCounters changed from 70:Semirare window begin:lparen.gif to 70:Semirare window begin:lparen.gif:80:Semirare window end loc=*:rparen.gif
> Violet Fog is great place to get the munchies.
Preference violetFogGoal changed from 0 to 8
> Your Dog Found Something Again: Get food or booze
Preference choiceAdventure1108 changed from 2 to 1
> At the Poop Deck: take the Wheel and Sail to Muscle stats
Preference oceanDestination changed from mysticality to muscle
> Setting choice adventures for Muscle class.
> Whitey's Grove: Get Muscle stats
Preference choiceAdventure73 changed from 3 to 1
> Whitey's Grove: Get white lightning
Preference choiceAdventure75 changed from 1 to 2
> That Explains all the Eyepatches in Barrrney's Barrr: fight a pirate
Preference choiceAdventure184 changed from 2 to 1
> F'c'le, Chatterboxing: get Muscle stats
Preference choiceAdventure191 changed from 4 to 3
> Bathroom, Don't Hold a Grudge: Get Muscle stats
Preference choiceAdventure402 changed from 2 to 1
> Hippies on the Verge of War, Blockin' Out the Scenery: Get rations
Preference choiceAdventure141 changed from 1 to 2
> Frats on the Verge of War, Fratacombs: Get Muscle stats
Preference choiceAdventure145 changed from 2 to 1
> Take Muscle vacation.
Preference choiceAdventure793 changed from 2 to 1
> Bedroom, White Nightstand: Get Muscle stats
Preference choiceAdventure876 changed from 1 to 2
> Bathroom, Having a Medicine Ball: Skip adventure
Preference choiceAdventure105 changed from 1 to 2
> Optimal ascension choices set.
> The Oriole welcomes you back at Mt. Noob.


tutorial.php?action=toot&pwd
> Resetting HP/MP restoration settings to minimal
Preference hpAutoRecovery changed from -0.05 to 0.30
Preference mpAutoRecovery changed from -0.05 to 0.0
Preference mpAutoRecoveryTarget changed from 0.3 to 0.0
Preference manaBurningTrigger changed from -1.0 to -0.05
Preference manaBurningThreshold changed from -1.0 to 0.80
> Put on your best gear.
Maximizer: 0.2 mainstat, 0.2 hp, 0.2 dr, 0.1 spell damage, +effective 4 Muscle experience, mp regen, 0.2 familiar weight
Preference maximizerMRUList changed from food drop;-tie,adv,0.3fites;5item,meat,0.5initiative,0.1da 1000max,dr,0.5all res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,0.25spell damage,1.75spell damage percent,2familiar weight,5familiar exp,10exp,5Mysticality experience percent,ml 0max;5item,meat,0.5initiative,0.1da 1000max,dr,0.5all res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,0.25spell damage,1.75spell damage percent,2familiar weight,5familiar exp,10exp,5Mysticality experience percent,50item 84.0max,ml 0max;5item,meat,0.5initiative,0.1da 1000max,dr,0.5all res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,0.25spell damage,1.75spell damage percent,2familiar weight,5familiar exp,10exp,5Mysticality experience percent,50item 84.0max to 0.2 mainstat, 0.2 hp, 0.2 dr, 0.1 spell damage, +effective 4 Muscle experience, mp regen, 0.2 familiar weight;food drop;-tie,adv,0.3fites;5item,meat,0.5initiative,0.1da 1000max,dr,0.5all res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,0.25spell damage,1.75spell damage percent,2familiar weight,5familiar exp,10exp,5Mysticality experience percent,ml 0max;5item,meat,0.5initiative,0.1da 1000max,dr,0.5all res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,0.25spell damage,1.75spell damage percent,2familiar weight,5familiar exp,10exp,5Mysticality experience percent,50item 84.0max,ml 0max
> Time for breakfast.
Created an empty checkpoint.
Created an empty checkpoint.


Visiting the Ruined House
Preference breakfastCompleted changed from false to true


peevpee.php?action=smashstone&pwd&confirm=on&shatter=Smash%2Bthat%2BHippy%2BCrap%2521


Visiting the pretentious artist


Visiting the pretentious artist


Visiting the pretentious artist


Talking to the Old Man
Created an empty checkpoint.
Created an empty checkpoint.


Visiting the Ruined House
> Current settings for tt_login:
> tt_login_pvp = true
> tt_login_chocolateEat = true
> tt_login_chocolateMaxPricePerAdv = 100
> tt_login_startQuestLTT = false
> tt_login_startQuestLTTDifficulty = 3
>     ^1 = easy. 2 = moderate. 3 = hard
> You can make changes to these settings by typing:
> set [setting_name] = [target]
> login script finished
> Welcome to your new life as a Astral Spirit!
Preference hpAutoRecovery changed from 0.3 to 0.70
Preference mpAutoRecovery changed from 0.0 to 0.2
Preference mpAutoRecoveryTarget changed from 0.0 to 0.30
Preference manaBurningTrigger changed from -0.05 to -1
Preference manaBurningThreshold changed from 0.8 to -1
Created an empty checkpoint.
Note the amusing "welcome to your new life as an astral spirit"
I then re-login because it broke. and this time i get
Code:
Welcome to Valhalla!
You have 56 banked Karma.
You gain 261 Karma
Your new Karma balance is 317
Preference bankedKarma changed from 56 to 317
followed by massive amount of settings changes. i then start a new life as ed and this time login script creates a much bigger log because it is successfully doing things
 

taltamir

Member
At least, I think that is the right log. I will try to replicate it next time i get to valhalla specifically so i can grab a proper log
 

taltamir

Member
Try revision 20464.
I just tested it and it did not work. also, I got clearer understanding on the log

I clicked the gash. it ran the pre-ascension script. then my log showed
Code:
pre-ascension script finished
Preference lastIslandUnlock changed from 95 to 0
Preference     knownAscensions changed from 95 to 96
Preference lastBreakfast changed     from 0 to -1
Preference lastCounterDay changed from 1602646199 to     1602646197
Preference breakfastCompleted changed from true to false
Preference     cocktailSummons changed from 1 to 0
Preference currentPvpVictories     changed from BerryDinpoon,Vycos,MrKol,Joker,KoL_Orphan, to
Preference     noodleSummons changed from 1 to 0
Preference reagentSummons changed     from 1 to 0
Preference _dailySpecial changed from linguini of the sea to
Preference     _dailySpecialPrice changed from 195 to 0
Preference     _eldritchTentacleFought changed from true to false
Preference     _lastCombatStarted changed from 20201013115828 to
Preference     _timeSpinnerFoodAvailable changed from 61,8174,8195 to
Preference     eldritchTentaclesFought changed from 3 to 0
Preference     singleFamiliarRun changed from 15 to 0
Preference lastCouncilVisit     changed from 8 to 0
Preference hasRange changed from true to false
Preference     hasShaker changed from true to false
Preference questL02Larva changed     from finished to unstarted
Preference questL03Rat changed from step1 to     unstarted
Preference questL06Friar changed from started to unstarted
Preference     questL08Trapper changed from started to unstarted
Preference     questG07Myst changed from finished to unstarted
Preference     questM02Artist changed from started to unstarted
Preference     questM05Toot changed from started to unstarted
Preference questM19Hippy     changed from finished to unstarted
Preference questM20Necklace changed     from started to unstarted
Preference questM23Meatsmith changed from     started to unstarted
Preference questM24Doc changed from finished to     unstarted
Preference questM25Armorer changed from finished to unstarted
Preference     relayCounters changed from 242:Fortune Cookie:fortune.gif:264:Fortune     Cookie:fortune.gif:267:Fortune Cookie:fortune.gif:433:Fortune     Cookie:fortune.gif:318:Fortune Cookie:fortune.gif to
this is the point at which i left it for an hour.

when i came back and clicked the pearly gates
Code:
Welcome to Valhalla!
Installing default certificate validation...
Sending     login request...
Preference nextAdventure changed from None to Noob Cave
Preference     nextAdventure changed from Noob Cave to The Hidden Apartment Building
Preference     nextAdventure changed from The Hidden Apartment Building to The Old     Landfill
Welcome to Valhalla!
Preference hpAutoRecovery changed from     0.7 to -0.05
Preference mpAutoRecovery changed from 0.2 to -0.05
Preference     relayCounters changed from to 70:Semirare window begin:lparen.gif
Preference     relayCounters changed from 70:Semirare window begin:lparen.gif to     70:Semirare window begin:lparen.gif:80:Semirare window end loc=*:rparen.gif
[COLOR=olive]Violet     Fog is great place to get the munchies.[/COLOR]
violetFogGoal => 8
Preference     violetFogGoal changed from 0 to 8
[COLOR=olive]Your Dog Found     Something Again: Get food or booze[/COLOR]
choiceAdventure1108 => 1
Preference     choiceAdventure1108 changed from 2 to 1
[COLOR=olive]At the Poop     Deck: take the Wheel and Sail to Muscle stats[/COLOR]
oceanDestination     => muscle
Preference oceanDestination changed from mysticality to     muscle
[COLOR=black]Setting choice adventures for Muscle class.[/COLOR]
[COLOR=olive]Whitey's     Grove: Get Muscle stats[/COLOR]
choiceAdventure73 => 1
Preference     choiceAdventure73 changed from 3 to 1
[COLOR=olive]Whitey's     Grove: Get white lightning[/COLOR]
choiceAdventure75 => 2
Preference     choiceAdventure75 changed from 1 to 2
[COLOR=olive]That Explains     all the Eyepatches in Barrrney's Barrr: fight a pirate[/COLOR]
choiceAdventure184     => 1
Preference choiceAdventure184 changed from 2 to 1
[COLOR=olive]F'c'le,     Chatterboxing: get Muscle stats[/COLOR]
choiceAdventure191 => 3
Preference     choiceAdventure191 changed from 4 to 3
[COLOR=olive]Bathroom,     Don't Hold a Grudge: Get Muscle stats[/COLOR]
choiceAdventure402 => 1
Preference     choiceAdventure402 changed from 2 to 1
[COLOR=olive]Hippies on     the Verge of War, Blockin' Out the Scenery: Get rations[/COLOR]
choiceAdventure141     => 2
Preference choiceAdventure141 changed from 1 to 2
[COLOR=olive]Frats     on the Verge of War, Fratacombs: Get Muscle stats[/COLOR]
choiceAdventure145     => 1
Preference choiceAdventure145 changed from 2 to 1
[COLOR=olive]Take     Muscle vacation.[/COLOR]
choiceAdventure793 => 1
Preference     choiceAdventure793 changed from 2 to 1
[COLOR=olive]Bedroom,     White Nightstand: Get Muscle stats[/COLOR]
Preference choiceAdventure876     changed from 1 to 2
[COLOR=olive]Bathroom, Having a Medicine     Ball: Skip adventure[/COLOR]
choiceAdventure105 => 2
Preference     choiceAdventure105 changed from 1 to 2
[COLOR=blue]Optimal     ascension choices set.[/COLOR]
[COLOR=olive]The Oriole welcomes     you back at Mt. Noob.[/COLOR]
[COLOR=olive]Resetting HP/MP     restoration settings to minimal[/COLOR]
hpAutoRecovery => 0.30
Preference     hpAutoRecovery changed from -0.05 to 0.30
mpAutoRecovery => 0.0
Preference     mpAutoRecovery changed from -0.05 to 0.0
mpAutoRecoveryTarget => 0.0
Preference     mpAutoRecoveryTarget changed from 0.3 to 0.0
manaBurningTrigger => -0.05
Preference     manaBurningTrigger changed from -1.0 to -0.05
manaBurningThreshold =>     0.80
Preference manaBurningThreshold changed from -1.0 to 0.80
[COLOR=olive]Put     on your best gear.[/COLOR]
Maximizer: 0.2 mainstat, 0.2 hp, 0.2 dr, 0.1     spell damage, +effective 4 Muscle experience, mp regen, 0.2 familiar weight
Preference     maximizerMRUList changed from food     drop;-tie,adv,0.3fites;5item,meat,0.5initiative,0.1da 1000max,dr,0.5all     res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,0.25spell     damage,1.75spell damage percent,2familiar weight,5familiar     exp,10exp,5Mysticality experience percent,ml     0max;5item,meat,0.5initiative,0.1da 1000max,dr,0.5all     res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,0.25spell     damage,1.75spell damage percent,2familiar weight,5familiar     exp,10exp,5Mysticality experience percent,50item 125.0max,ml     0max;5item,meat,0.5initiative,0.1da 1000max,dr,0.5all     res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,0.25spell     damage,1.75spell damage percent,2familiar weight,5familiar     exp,10exp,5Mysticality experience percent,50item 125.0max to 0.2 mainstat,     0.2 hp, 0.2 dr, 0.1 spell damage, +effective 4 Muscle experience, mp     regen, 0.2 familiar weight;food     drop;-tie,adv,0.3fites;5item,meat,0.5initiative,0.1da 1000max,dr,0.5all     res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,0.25spell     damage,1.75spell damage percent,2familiar weight,5familiar     exp,10exp,5Mysticality experience percent,ml     0max;5item,meat,0.5initiative,0.1da 1000max,dr,0.5all     res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,0.25spell     damage,1.75spell damage percent,2familiar weight,5familiar     exp,10exp,5Mysticality experience percent,50item 125.0max,ml 0max
Maximizing...
42     combinations checked, best score 0.60
[COLOR=blue]Time for     breakfast.[/COLOR]
Created an empty checkpoint.
Created an empty     checkpoint.
Visiting Hermit...
Unhandled redirect to     afterlife.php?realworld=1
Visiting the Ruined House
Unhandled     redirect to afterlife.php?realworld=1
Preference breakfastCompleted     changed from false to true

Visiting the pretentious artist

Visiting     the pretentious artist

Visiting the pretentious artist
[COLOR=red]KoLmafia     declares world peace.[/COLOR]
[COLOR=red]You need 1 more telegram     from Lady Spookyraven to continue.[/COLOR]
The last two lines are a result of me hitting esc to abort the login script.

Incidnetally the relay browser navigates me to http://127.0.0.1:60083/login.php?
which shows the KoL login page. the one with the option to login, signup, subscribe for newsletter. etc
what you would get if you just opened a browser and went to https://www.kingdomofloathing.com/

I notice a lot of "Unhandled redirect to afterlife.php?realworld=1"

clicking on "load in web browser" button in mafia does open valhalla without a need to re-login (I did it last time but i was wrong to do so). so i am logged in apparently... maybe there is an issue with the password hash?
Code:
    Welcome to Valhalla!
Preference bankedKarma changed from 59 to 320
this is what i got after clicking "load in web browser" and then clicking the pearly gates
 
Last edited:

taltamir

Member
Not sure if it is related or not... but my latest standard run did not identify non_valid items causing scripts to crash until i manually visited the char sheet.

after ascending
Code:
[B][COLOR=olive]> tt_login[/COLOR]

Visiting Spacegate R&D
Creating     1 geological sample kit...

Visiting Spacegate Equipment Requisition
[COLOR=red]Creation     failed, no results detected.[/COLOR]
Stack trace:
  at main     (tt_login.ash:557)

[COLOR=olive]> ash     is_unrestricted($item[Spacegate access badge])[/COLOR]

Returned: true
[/B]
When I visited the character sheet it did
Code:
[B]Seeing what's still unrestricted today...
Done checking allowed     items.[/B]
after which I was able to run scripts and also do
Code:
[COLOR=olive]> ash is_unrestricted($item[Spacegate access badge])[/COLOR]

Returned:     false

I am wondering if maybe whacking the api.php caused this?
 

Veracity

Developer
Your DEBUG log is interesting.

Code:
Starting relay script: afterlife.ash
class net.sourceforge.kolmafia.request.RelayRequest

Welcome to Valhalla!
Connecting to afterlife.php...

Requesting: https://www.kingdomofloathing.com/afterlife.php?action=pearlygates
Retrieved: https://www.kingdomofloathing.com/afterlife.php?action=pearlygates
Field: Location = [login.php?notloggedin=1]

==> You clicked on the Pearly Gates and it redirected to login.php
==> Therefore, the url to resubmit after timein is afterlife.php?action=pearlygates

class net.sourceforge.kolmafia.request.GenericRequest
Connecting to desc_item.php...

Requesting: https://www.kingdomofloathing.com/desc_item.php?whichitem=806203565
Retrieved: https://www.kingdomofloathing.com/desc_item.php?whichitem=806203565
This script is not available unless you're logged in.

==> What the heck is this? trying to look at the the item description of
==> the Staff of the Standalone Cheese? 

Requesting: https://www.kingdomofloathing.com/charpane.php
Retrieved: https://www.kingdomofloathing.com/charpane.php
Field: Location = [login.php?notloggedin=1]

==> And now we attempt to look at the charpane, and that redirects since
==> you are not logged in.

Installing default certificate validation...
Sending login request...
class net.sourceforge.kolmafia.request.LoginRequest
Connecting to login.php...

Requesting: https://www.kingdomofloathing.com/login.php
Retrieved: https://www.kingdomofloathing.com/login.php

==> It logs in

----- Start of timein -----

class net.sourceforge.kolmafia.request.PasswordHashRequest
Connecting to lchat.php...

Requesting: https://www.kingdomofloathing.com/lchat.php
Retrieved: https://www.kingdomofloathing.com/lchat.php

==> It learns your new password hash

Requesting: https://www.kingdomofloathing.com/charpane.php
Retrieved: https://www.kingdomofloathing.com/charpane.php

==> It looks at the charpane

----- End of timein -----

Requesting: https://www.kingdomofloathing.com/charpane.php
Retrieved: https://www.kingdomofloathing.com/charpane.php

==> And why did it do this? Was it because charpane.php tried to
==> redirect to Valhalla? What happened to the previous call to the
==> Pearly Gates which also tried to redirect to Valhalla?

Welcome to Valhalla!
Preference hpAutoRecovery changed from 0.7 to -0.05
Preference mpAutoRecovery changed from 0.2 to -0.05
Preference relayCounters changed from  to 70:Semirare window begin:lparen.gif
Preference relayCounters changed from 70:Semirare window begin:lparen.gif to 70:Semirare window begin:lparen.gif:80:Semirare window end loc=*:rparen.gif
Starting ASH script: newLifeMod.ash
I wish I knew why it did the desc_item.php and the charpane.php after the first afterlife.php request redirected but before it started the timein.
 

Veracity

Developer
OK, I think I figured it out,

We look for redirects from afterlife.php before we look for redirects to login.php.
We think a redirect from afterlife is ascending into a new life - but redirecting to login is a timein.
The solution is to do timein before looking for other kinds of redirect.

Try revision 20465.
 

taltamir

Member
Try revision 20465.
Can confirm valhalla is fixed now.
Code:
        Welcome to Valhalla!
Installing default certificate validation...
Sending     login request...
Requests complete.

Preference bankedKarma     changed from 24018 to 24179

But standard is still broken. When starting a new standard run it does not update restricted items before running the login scripts.
On first manual visit to charsheet.php it does
Code:
Seeing what's still unrestricted today...
Done checking allowed items.
after which scripts work

I am not sure if it is because of
Code:
Whack usage of api.php (which doesn't work in Valhalla) to avoid issues in Valhalla
Or a coincidence and something else broke standard recently
 
Last edited:

Veracity

Developer
When you visit the charsheet, if you are now restricted but were not before, it marks that standard restrictions need to be reread.
I'm not sure why that is, since it looks like the code reads standard restrictions when you log in and when you ascend.
The charsheet is, literally, the only place that tells us if you are actually under standard restrictions.
But, the charsheet is also read when you log in and when you ascend.
That is done BEFORE your postAscensionScript is called - by the same method that had just refreshed your session, including reading the charsheet and standard.php.

The api.php change had nothing to do with running code after you ascend.

Revision 20468 should make reading the standard restrictions more robust.
Next time you ascend, turn on DEBUG logging before leaving Valhalla.
If it still doesn't work for you, post it here.
 

taltamir

Member
Try revision 20469.
Thank you, I tested 20471 and can confirm the standard restriction issue is fixed now.

Is 20469 supposed to improve the robustness of the timeout issue or the standard issue? It sounds like it is meant to address the timeout in valhalla issue. Should I retest it? (that bit was working as of 20465, but if 20469 changed how it is done I should retest it)
 
Last edited:
Top