Skip Menu |

This queue is for tickets about the Catalyst-Authentication-Credential-RPX CPAN distribution.

Report information
The Basics
Id: 58843
Status: resolved
Priority: 0/
Queue: Catalyst-Authentication-Credential-RPX

People
Owner: Nobody in particular
Requestors: stephan [...] stejau.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: 0.10038414



Subject: This error when using this Module
Restarting LinuxRulz: linuxrulzAttribute (_app) does not pass the type constraint because: Validation failed for 'Object' failed with value LinuxRulz at /usr/local/share/perl/5.10.0/Catalyst/Authentication/Realm.pm line 135 Catalyst::Authentication::Realm::new('Catalyst::Authentication::Realm', 'rpx', 'HASH(0x2461800)', 'LinuxRulz') called at /usr/local/share/perl/5.10.0/Catalyst/Plugin/Authentication.pm line 333 Catalyst::Plugin::Authentication::setup_auth_realm('LinuxRulz', 'rpx', 'HASH(0x2461800)') called at /usr/local/share/perl/5.10.0/Catalyst/Plugin/Authentication.pm line 267 Catalyst::Plugin::Authentication::_authentication_initialize('LinuxRulz') called at /usr/local/share/perl/5.10.0/Catalyst/Plugin/Authentication.pm line 202 Catalyst::Plugin::Authentication::setup('LinuxRulz') called at /usr/local/share/perl/5.10.0/Catalyst/Plugin/StackTrace.pm line 175 Catalyst::Plugin::StackTrace::setup('LinuxRulz') called at /usr/local/share/perl/5.10.0/Catalyst/Plugin/ConfigLoader.pm line 101 Catalyst::Plugin::ConfigLoader::setup('LinuxRulz') called at /usr/local/share/perl/5.10.0/Catalyst.pm line 1137 Catalyst::setup('LinuxRulz') called at lib/LinuxRulz.pm line 71 require LinuxRulz.pm called at -e line 0 main::BEGIN() called at lib/LinuxRulz.pm line 0 eval {...} called at lib/LinuxRulz.pm line 0 Compilation failed in require, <DATA> line 522. BEGIN failed--compilation aborted, <DATA> line 522. When i try to start my app i get this stacktrace+error. My Config is for this class(unrelated to this): <credential> class RPX api_key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx </credential>
I'm not intimately familiar with what's going on. Could you please provide code or a test that replicates the problem. This will allow me to work out the problem and solve it much quicker. In the mean time, could you try using in-code configuration like demonstrated in the synopsis instead of an external config file and see if this remedies your problem. ( This approach will also make it easier I think to produce example code that fails ). Otherwise, thanks for reporting the bug, I'm just sorry I can't be immediately helpful =).
My TestApp: https://linuxrulz.de/~linuxrulz/testapp.tar.gz Fails with: Couldn't load class (TestApp) because: Attribute (_app) does not pass the type constraint because: Validation failed for 'Object' with value TestApp at /usr/local/share/perl/5.10.0/Catalyst/Authentication/Realm.pm line 135 Catalyst::Authentication::Realm::new('Catalyst::Authentication::Realm', 'rpx', 'HASH(0x16a9f78)', 'TestApp') called at /usr/local/share/perl/5.10.0/Catalyst/Plugin/Authentication.pm line 335 Catalyst::Plugin::Authentication::setup_auth_realm('TestApp', 'rpx', 'HASH(0x16a9f78)') called at /usr/local/share/perl/5.10.0/Catalyst/Plugin/Authentication.pm line 269 Catalyst::Plugin::Authentication::_authentication_initialize('TestApp') called at /usr/local/share/perl/5.10.0/Catalyst/Plugin/Authentication.pm line 204 Catalyst::Plugin::Authentication::setup('TestApp') called at /usr/local/share/perl/5.10.0/Catalyst/Plugin/ConfigLoader.pm line 101 Catalyst::Plugin::ConfigLoader::setup('TestApp') called at /home/linuxrulz/perl5/lib/perl5/Catalyst.pm line 1136 Catalyst::setup('TestApp') called at /home/linuxrulz/TestApp/script/../lib/TestApp.pm line 57 require TestApp.pm called at /home/linuxrulz/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP.pm line 114 Class::MOP::__ANON__() called at /usr/local/share/perl/5.10.0/Try/Tiny.pm line 71 eval {...} called at /usr/local/share/perl/5.10.0/Try/Tiny.pm line 67 Try::Tiny::try('CODE(0x622d68)', 'Try::Tiny::Catch=REF(0x1bb7000)') called at /home/linuxrulz/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP.pm line 125 Class::MOP::load_first_existing_class('TestApp') called at /home/linuxrulz/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP.pm line 137 Class::MOP::load_class('TestApp') called at /home/linuxrulz/perl5/lib/perl5/Catalyst/ScriptRole.pm line 61 Catalyst::ScriptRole::_run_application('Catalyst::Script::Server=HASH(0x1be6a48)') called at /home/linuxrulz/perl5/lib/perl5/Catalyst/Script/Server.pm line 181 Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0x1be6a48)') called at /home/linuxrulz/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 48 Class::MOP::Method::Wrapped::__ANON__('Catalyst::Script::Server=HASH(0x1be6a48)') called at /home/linuxrulz/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 89 Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0x1be6a48)') called at /home/linuxrulz/perl5/lib/perl5/Catalyst/ScriptRunner.pm line 20 Catalyst::ScriptRunner::run('Catalyst::ScriptRunner', 'TestApp', 'Server') called at script/testapp_server.pl line 8 Compilation failed in require at /home/linuxrulz/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP.pm line 114. at /home/linuxrulz/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP.pm line 120 Class::MOP::__ANON__('Attribute (_app) does not pass the type constraint because: V...') called at /usr/local/share/perl/5.10.0/Try/Tiny.pm line 98 Try::Tiny::try('CODE(0x622d68)', 'Try::Tiny::Catch=REF(0x1bb7000)') called at /home/linuxrulz/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP.pm line 125 Class::MOP::load_first_existing_class('TestApp') called at /home/linuxrulz/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP.pm line 137 Class::MOP::load_class('TestApp') called at /home/linuxrulz/perl5/lib/perl5/Catalyst/ScriptRole.pm line 61 Catalyst::ScriptRole::_run_application('Catalyst::Script::Server=HASH(0x1be6a48)') called at /home/linuxrulz/perl5/lib/perl5/Catalyst/Script/Server.pm line 181 Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0x1be6a48)') called at /home/linuxrulz/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 48 Class::MOP::Method::Wrapped::__ANON__('Catalyst::Script::Server=HASH(0x1be6a48)') called at /home/linuxrulz/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 89 Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0x1be6a48)') called at /home/linuxrulz/perl5/lib/perl5/Catalyst/ScriptRunner.pm line 20 Catalyst::ScriptRunner::run('Catalyst::ScriptRunner', 'TestApp', 'Server') called at script/testapp_server.pl line 8 And btw in the POD Synopsis of the Module you have a Mistake: __PACKAGE__->config('Plugin::Authenticate' => { should be __PACKAGE__->config('Plugin::Authentication' => {
On Sun Jul 04 14:59:29 2010, stephan48 wrote: Show quoted text
Thanks for taking the time to produce a test =D However, it appears I can't access the linked file: wget --no-check-certificate http://linuxrulz.de/~linuxrulz/testapp.tar.gz --2010-07-05 08:55:51-- http://linuxrulz.de/~linuxrulz/testapp.tar.gz Resolving linuxrulz.de (linuxrulz.de)... 178.63.26.174 Connecting to linuxrulz.de (linuxrulz.de)|178.63.26.174|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://linuxrulz.de/~linuxrulz/testapp.tar.gz [following] --2010-07-05 08:55:53-- https://linuxrulz.de/~linuxrulz/testapp.tar.gz Connecting to linuxrulz.de (linuxrulz.de)|178.63.26.174|:443... connected. WARNING: cannot verify linuxrulz.de's certificate, issued by `/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=EssentialSSL CA': Unable to locally verify the issuer's authority. HTTP request sent, awaiting response... 302 Found Location: https://linuxrulz.de/maintenancepage.html [following] --2010-07-05 08:55:54-- https://linuxrulz.de/maintenancepage.html Reusing existing connection to linuxrulz.de:443. HTTP request sent, awaiting response... 200 OK Length: 122 [text/html] Saving to: `maintenancepage.html' 100%[==============================================================================================>] 122 --.-K/s in 0s 2010-07-05 08:55:54 (1.80 MB/s) - `maintenancepage.html' saved [122/122] Thanks again. -- Kent
oh yea sry :) fixed the redirect issue now should be able to access it
On Sun Jul 04 18:13:45 2010, stephan48 wrote: Show quoted text
> oh yea sry :) > > fixed the redirect issue now should be able to access it
Thanks, I appear to have found the culprit as a result of your test =). It appears I needlessly check that the passed App is an Object, when it can be a ClassName. I don't even need to do this as I don't even use that argument =). So, for a quick fix until I get the next release out, open up RPX.pm and do -has '_app' => ( isa => Object, rw, required, ); +has '_app' => ( isa => Object | ClassName, rw, required, ); And that should solve your issues. If you have any further issues, I think that will constitute a further bug ( unless you're certain its the same issue ).
http://search.cpan.org/~kentnl/Catalyst-Authentication-Credential-RPX-0.10038414/ Should be solved. Thanks Stephan. ( I got it right this time! )