[Seaside] Always getting WARequestContextNotFound while debugging

Thomas Brodt thomas.brodt.lists at porabo.ch
Thu Apr 11 07:11:18 UTC 2019


Hi Tim,

access to the current request context is handled through signalling a 
request notification and getting the request context as the notification 
resume value. See class WACurrentRequestContext which is a notification. 
If you are running requests regularly in the normal control flow, some 
outer methods establish a handler which catches the notification and 
returns the current context. See implementers of #push:during: and 
#use:during: which do that. This allows to get e.g. the request (or 
other so called dynamic variables) without having to pass it along the 
call chain as parameter or have it as instance variable.

If you are executing arbitrary code in the debugger through 
print/inspect/do it, this outer notification handler is missing and the 
request notification is then unhandled, which results in another "real" 
exception WARequestContextNotFound because the context is not found.

HTH

Thomas

Am 11.04.2019 um 06:27 schrieb Tim Johnson:
> Hi,
>
> Since moving to Seaside 3.x in Squeak 5.x, it seems like I haven't been able to debug as well as I used to.  This has been happening for a while but I just thought I'd ask about it now.  It seems worse lately...?
>
> It seems like after I hit "Debug" on a Seaside Walkback, I go back to my image and enter the debugger.  Then when I try to evaluate / print / inspect various statements maybe three items down the stack, I always end up with something like a WARequestContextNotFound window.
>
> Basically, it seems like I can't interact with anything but the topmost item in a debugger anymore, but I could be totally wrong about that.
>
> I don't suppose this would have anything to do with proxying through Apache or nginx...?
>
> I'm also having trouble clicking on individual stack items in the Seaside Walkback, but that might be unrelated, or related to the proxy.
>
> Here is a sample stack when trying to inspect/print something three items down in the stack after hitting "Debug" on a Seaside Walkback.  I am wondering if something is up with WADynamicVariable in Squeak lately:
>
> WACurrentRequestContext class>>defaultValue
> WACurrentRequestContext(WADynamicVariable)>>defaultAction
> UndefinedObject>>handleSignal:
> Context>>handleSignal:
> WACurrentRequestContext(Exception)>>signal
> WACurrentRequestContext class(Exception class)>>signal
> WACurrentRequestContext class(WADynamicVariable class)>>value
> PCardLoggedInComponent(WAObject)>>requestContext
> PCardLoggedInComponent(WAObject)>>session
> PCardLoggedInComponent>>DoItIn:
> Compiler>>evaluateCue:ifFail:
> Compiler>>evaluateCue:ifFail:logged:
> Compiler>>evaluate:in:to:environment:notifying:ifFail:logged:
> [] in SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo:
> BlockClosure>>on:do:
> SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo:
> SmalltalkEditor(TextEditor)>>printIt
> SmalltalkEditor(TextEditor)>>printIt:
> SmalltalkEditor(TextEditor)>>dispatchOnKeyboardEvent:
> SmalltalkEditor(TextEditor)>>keyStroke:
>
>
> Thanks,
> Tim J
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the seaside mailing list