[opensuse-buildservice] undefined method `name'
Maybe if somebody solves this ... some time :p. After you login, you click at "Home Project" and it gives this error: ------------------------------------------------------------------------------- OpenSUSE Webclient Error: Error Details: Errorcode: 500 Message: undefined method `name' for #Project:0xb6cbdda4 Exception from Webclient: NoMethodError: undefined method `name' for #Project:0xb6cbdda4 Stack Trace: /srv/www/obs/common/lib/activexml/node.rb:265:in `method_missing' /srv/www/obs/common/lib/activexml/base.rb:82:in `name' /srv/www/obs/webclient/public/../config/../app/controllers/project_controller.rb:90:in `show' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `perform_action_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in `process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in `process!' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:117:in `session' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:104:in `each_request' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:36:in `each' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in `process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in `process!' /srv/www/obs/webclient/public/dispatch.fcgi:24 ------------------------------------------------------------------------------- and /srv/www/obs/webclient/log/development.log says this ------------------------------------------------------------------------------- Processing ProjectController#show (for 192.168.2.38 at 2007-03-20 10:19:43) [GET] [I|#32051] Session ID: dfad9906c39e232e11867749a0cc89b4 [I|#32051] Parameters: {"project"=>"home:admin", "action"=>"show", "controller"=>"project"} [D|#32051] Person.find( "admin" ) [D|#32051] prepared find args: ["admin", {:login=>"admin"}] [D|#32051] [REST] find( Person, ["admin", {:login=>"admin"}] ) [D|#32051] retrieving target_uri for model ':person' [D|#32051] retrieving option hash for model ':person' [D|#32051] Transport.find: using string [D|#32051] uri is: rest://192.168.253.76:80/person/:login [D|#32051] http_do: url: http://192.168.253.76:80/person/admin [D|#32051] http_do: path: /person/admin [D|#32051] Project.find( "home:admin" ) [D|#32051] prepared find args: ["home:admin", {:name=>"home:admin"}] [D|#32051] [REST] find( Project, ["home:admin", {:name=>"home:admin"}] ) [D|#32051] retrieving target_uri for model ':project' [D|#32051] retrieving option hash for model ':project' [D|#32051] Transport.find: using string [D|#32051] uri is: rest://192.168.253.76:80/source/:name/_meta [D|#32051] http_do: url: http://192.168.253.76:80/source/home:admin/_meta [D|#32051] http_do: path: /source/home:admin/_meta [D|#32051] Package.find( :all, {:project=>"home:admin"} ) [D|#32051] prepared find args: [:all, {:project=>"home:admin"}] [D|#32051] [REST] find( Package, [:all, {:project=>"home:admin"}] ) [D|#32051] retrieving target_uri for model ':package' [D|#32051] retrieving option hash for model ':package' [D|#32051] Transport.find: using symbol [D|#32051] uri is: rest://192.168.253.76:80/source/:project [D|#32051] http_do: url: http://192.168.253.76:80/source/home:admin [D|#32051] http_do: path: /source/home:admin [F|#32051] NoMethodError (undefined method `name' for #Project:0xb6cbdda4): /srv/www/obs/common/lib/activexml/node.rb:265:in `method_missing' /srv/www/obs/common/lib/activexml/base.rb:82:in `name' /app/controllers/project_controller.rb:90:in `show' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `perform_action_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in `process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in `process!' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:117:in `session' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:104:in `each_request' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:36:in `each' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in `process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in `process!' /srv/www/obs/webclient/public/dispatch.fcgi:24 [D|#32051] rescue_action_in_public: caught NoMethodError: undefined method `name' for #Project:0xb6cbdda4 [D|#32051] default exception handling [D|#32051] ERROR: 500 [I|#32051] Rendering status500templateerrorlayoutfalse within layouts/application [I|#32051] Rendering error (500) [D|#32051] Rendered main/_search_form (0.00318) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Tuesday, 20. March 2007 10:28, Jochen Hebbrecht wrote:
Maybe if somebody solves this ... some time :p. After you login, you click at "Home Project" and it gives this error:
-------->8---------
[D|#32051] uri is: rest://192.168.253.76:80/source/:project [D|#32051] http_do: url: http://192.168.253.76:80/source/home:admin [D|#32051] http_do: path: /source/home:admin [F|#32051]
NoMethodError (undefined method `name' for #Project:0xb6cbdda4): /srv/www/obs/common/lib/activexml/node.rb:265:in `method_missing' /srv/www/obs/common/lib/activexml/base.rb:82:in `name' /app/controllers/project_controller.rb:90:in `show'
--------8<--------- could you please post the output of curl -v http://192.168.253.76:80/source/home:admin -- Andreas Bauer - Novell - SUSE Internal Tools --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
2007/3/20, Andreas Bauer
On Tuesday, 20. March 2007 10:28, Jochen Hebbrecht wrote:
Maybe if somebody solves this ... some time :p. After you login, you click at "Home Project" and it gives this error:
-------->8---------
[D|#32051] uri is: rest://192.168.253.76:80/source/:project [D|#32051] http_do: url: http://192.168.253.76:80/source/home:admin [D|#32051] http_do: path: /source/home:admin [F|#32051]
NoMethodError (undefined method `name' for #Project:0xb6cbdda4): /srv/www/obs/common/lib/activexml/node.rb:265:in `method_missing' /srv/www/obs/common/lib/activexml/base.rb:82:in `name' /app/controllers/project_controller.rb:90:in `show'
--------8<---------
could you please post the output of
For the others (because I only said it on IRC): you have to fill in your DB by yourself. Do an INSERT like this one: mysql> select * from db_projects; +----+------------+--------------+-------------+---------------------+---------------------+ | id | name | title | description | created_at | updated_at | +----+------------+--------------+-------------+---------------------+---------------------+ | 2 | home:admin | Home project | for testing | 2007-03-20 13:11:17 | 2007-03-20 13:11:17 | +----+------------+--------------+-------------+---------------------+---------------------+ @Andreas: curl gives me this: $ curl -v http://admin:opensuse@192.168.253.76:80/source/home:admin * About to connect() to 192.168.253.76 port 80 * Trying 192.168.253.76... connected * Connected to 192.168.253.76 (192.168.253.76) port 80 * Server auth using Basic with user 'admin'
GET /source/home:admin HTTP/1.1 Authorization: Basic YWRtaW46b3BlbnN1c2U= User-Agent: curl/7.15.1 (i486-pc-linux-gnu) libcurl/7.15.1 OpenSSL/0.9.8a zlib/1.2.3 libidn/0.5.18 Host: 192.168.253.76 Accept: */*
< HTTP/1.1 200 OK < Transfer-Encoding: chunked < Content-Type: text/xml < Set-Cookie: opensuse_frontend_session=4163bfbe3302bf971a4ca9f9666d0a85; path=/ < X-Opensuse-APIVersion: 0.1.1 < Cache-Control: no-cache < Date: Tue, 20 Mar 2007 18:30:33 GMT < Server: lighttpd/1.4.13 <directory count="2"> <entry name="test"/> <entry name="tetsfsf"/> </directory> * Connection #0 to host 192.168.253.76 left intact * Closing connection #0 --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Tuesday, 20. March 2007 14:30, Jochen Hebbrecht wrote:
2007/3/20, Andreas Bauer
: On Tuesday, 20. March 2007 10:28, Jochen Hebbrecht wrote:
Maybe if somebody solves this ... some time :p. After you login, you click at "Home Project" and it gives this error:
-------->8---------
[D|#32051] uri is: rest://192.168.253.76:80/source/:project [D|#32051] http_do: url: http://192.168.253.76:80/source/home:admin [D|#32051] http_do: path: /source/home:admin [F|#32051]
NoMethodError (undefined method `name' for #Project:0xb6cbdda4): /srv/www/obs/common/lib/activexml/node.rb:265:in `method_missing' /srv/www/obs/common/lib/activexml/base.rb:82:in `name' /app/controllers/project_controller.rb:90:in `show'
--------8<---------
could you please post the output of
For the others (because I only said it on IRC): you have to fill in your DB by yourself. Do an INSERT like this one:
Wrong. You should never have to touch the DB yourself. The problem is a 200 response from the API instead of a 404 response when a project doesn't exist. Normal case: 1. Client sends GET request for home project metafile. 2. Frontend doesn't find project data in DB, responds with an 404 3. Client recognizes 404 and offers to create the project. 4. User enters data. 5. Client sends PUT request for home project metafile. 6. Frontend creates project. Your case: 1. Client sends GET request for home project metafile. 2. Frontend doesn't find project data in DB, responds with an -->200<-- 3. Client thinks the response contains a metafile and tries to access it. 4. Client is confused because the xml doesn't look like expected, and bails. I wasn't able to reproduce this locally, so I can't really tell you how to fix it properly. But fiddling around with the database directly is definitely not the correct way. It may cause more problems than solving. Bye, Andreas -- Andreas Bauer - Novell - SUSE Internal Tools --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
2007/3/20, Andreas Bauer
On Tuesday, 20. March 2007 14:30, Jochen Hebbrecht wrote:
2007/3/20, Andreas Bauer
: On Tuesday, 20. March 2007 10:28, Jochen Hebbrecht wrote:
Maybe if somebody solves this ... some time :p. After you login, you click at "Home Project" and it gives this error:
-------->8---------
[D|#32051] uri is: rest://192.168.253.76:80/source/:project [D|#32051] http_do: url: http://192.168.253.76:80/source/home:admin [D|#32051] http_do: path: /source/home:admin [F|#32051]
NoMethodError (undefined method `name' for #Project:0xb6cbdda4): /srv/www/obs/common/lib/activexml/node.rb:265:in `method_missing' /srv/www/obs/common/lib/activexml/base.rb:82:in `name' /app/controllers/project_controller.rb:90:in `show'
--------8<---------
could you please post the output of
For the others (because I only said it on IRC): you have to fill in your DB by yourself. Do an INSERT like this one:
Wrong. You should never have to touch the DB yourself.
The problem is a 200 response from the API instead of a 404 response when a project doesn't exist.
Normal case:
1. Client sends GET request for home project metafile. 2. Frontend doesn't find project data in DB, responds with an 404 3. Client recognizes 404 and offers to create the project. 4. User enters data. 5. Client sends PUT request for home project metafile. 6. Frontend creates project.
Your case:
1. Client sends GET request for home project metafile. 2. Frontend doesn't find project data in DB, responds with an -->200<-- 3. Client thinks the response contains a metafile and tries to access it. 4. Client is confused because the xml doesn't look like expected, and bails.
I wasn't able to reproduce this locally, so I can't really tell you how to fix it properly. But fiddling around with the database directly is definitely not the correct way. It may cause more problems than solving.
I understand what you mean and I agree ... but afaik, there's no other possibility to solve it :-) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (2)
-
Andreas Bauer
-
Jochen Hebbrecht