[Catalyst] "Can't call method "user_is_restorable"

Devin Austin devin.austin at gmail.com
Tue Nov 25 18:32:21 GMT 2008


I've only just skimmed this email, but is this something that happens after
you've made code changes involving your session and you've restarted your
development server?

If I recall correctly, clearing your cookie associated with said session
will fix this error.

On Tue, Nov 25, 2008 at 11:22 AM, J. Shirley <jshirley at gmail.com> wrote:

> On Tue, Nov 25, 2008 at 9:35 AM, Mark Beihoffer <mbeihoffer at gmail.com>
> wrote:
> > Hello,
> >
> > I've encountered a problem with Catalyst::Plugin::Authentication
> > 0.10008 that I can't seem to resolve.
> >
> > When logging in or out now I get these error messages:
> >
> > Caught exception in TCLegal::Controller::Logout->index "Can't call
> > method "user_is_restorable" on an undefined value at
> > /usr/local/libdata/perl5/site_perl/Catalyst/Plugin/Authentication.pm
> > line 169."
> >
> > and
> >
> > An error has occurred. We're terribly sorry about that, but it's one
> > of those things that happens from time to time. Let's just hope the
> > developers test everything properly before release...
> >
> > Here's the error message, on the off-chance that it means something to
> > you: undef error - Can't call method "user_is_restorable" on an
> > undefined value at
> > /usr/local/libdata/perl5/site_perl/Catalyst/Plugin/Authentication.pm
> > line 169.
> >
> > What am I doing wrong? I've updated all the modules I can think of,
> > and nothing seems to fix this problem.
> >
> > It happens under mod_perl with an Apache Virtualhost configuration,
> > and also under the test server.
> >
> > >From myapp.conf
> >
> > use parent qw/Catalyst/;
> > use Catalyst qw/-Debug
> >                ConfigLoader
> >                Static::Simple
> >                StackTrace
> >
> >                Authentication
> >                Authorization::Roles
> >                Authorization::ACL
> >
> >                Session
> >                Session::Store::FastMmap
> >                Session::State::Cookie
> >
> >                /;
> >
> > and here's the code around my ->authenticate call:
> >
> > sub index :Path :Args(0) {
> >    my ($self, $c) =3D @_;
> >
> >    # Get the username and password from form
> >    my $username =3D $c->request->params->{username} || "";
> >    my $password =3D $c->request->params->{password} || "";
> >
> >    # If the username and password values were found in form
> >    if ($username && $password) {
> >        # Attempt to log the user in
> >        if ($c->authenticate({ username =3D> $username,
> >                               password =3D> $password} )) {
> >            # If successful, then let them use the application
> >            $c->response->redirect($c->uri_for('/'));
> >            return;
> >        } else {
> >            # Set an error message
> >            $c->stash->{error_msg} =3D "Bad username or password.";
> >        }
> >    }
> >
> >
> >
> > Thanks for any advice,
> >
> > - Mark Beihoffer
> >
>
> Hi Mark,
>
> Can you also send the related snippet from config (everything in the
> 'Plugin::Authentication' key)?
> That will tell us what store and credential you are using, so we don't
> have to guess :)
>
> The code to the authenticate call looks fine, so perhaps something in
> the config is the culprit.  Obviously we want the error messages to be
> more helpful, so I'd like to also solve why you aren't getting a
> helpful message, too.
>
> Thanks,
> -J
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>



-- =

Devin Austin
http://www.dreamhost.com/r.cgi?326568/hosting.html - Host with DreamHost!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20081125/e3fdc=
156/attachment.htm


More information about the Catalyst mailing list