Very First login or signup errors on database record.

Bug #581982 reported by Chris Tusa on 2010-05-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Telegard
High
Chris Tusa

Bug Description

During the very first login into the system, the program exits with a Sequel:Error, probably due to CallHistory being empty.

The console output is:

Enter your login name or 'NEW' to signup.

Username: SYSOP
Password: %%%%%%%%
/opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/model/base.rb:877:in `_refresh': Record not found (Sequel::Error)
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/model/associations.rb:1022:in `_refresh'
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/model/base.rb:898:in `_save'
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/model/base.rb:745:in `save'
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/model/base.rb:950:in `checked_transaction'
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/database.rb:647:in `_transaction'
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/database.rb:593:in `transaction'
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/connection_pool/threaded.rb:84:in `hold'
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/database.rb:553:in `synchronize'
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/database.rb:591:in `transaction'
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/model/base.rb:950:in `checked_transaction'
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/model/base.rb:745:in `save'
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/model/base.rb:938:in `checked_save_failure'
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/model/base.rb:745:in `save'
 from /opt/devel/java/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.11.0/lib/sequel/model/base.rb:108:in `create'
 from ./lib/tglogin.rb:153:in `auth'
 from ./tg.rb:167

Chris Tusa (chris-tusa) on 2010-05-17
Changed in telegard:
assignee: nobody → Chris Tusa (chris-tusa)
importance: Undecided → Medium
Chris Tusa (chris-tusa) wrote :

Issue also occurs on NEW user signup after account is created and user is prompted to login for the first time using their password. In this case, an actual SQL statement was returned by 'sequel':

Account Created [OK].
Enter your password to continue login
Password: %%%%%%%
/data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:980:in `_update': Attempt to update object did not result in a single row modification (SQL: UPDATE "SESSIONS" SET "USER_ID" = 2, "GROUP_ID" = 3, "CREATED" = TIMESTAMP '2010-06-02 19:47:02.609000', "EXPIRES" = TIMESTAMP '2010-06-02 20:47:02.626000', "CALLER_ID" = 1 WHERE ("ID" IS NULL)) (Sequel::NoExistingObject)
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:948:in `_save'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:761:in `save'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:1006:in `checked_transaction'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/database/query.rb:167:in `_transaction'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/database/query.rb:153:in `transaction'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/connection_pool/threaded.rb:84:in `hold'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/database/connecting.rb:189:in `synchronize'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/database/query.rb:151:in `transaction'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:1006:in `checked_transaction'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:761:in `save'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:994:in `checked_save_failure'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:761:in `save'
 from ./lib/tglogin.rb:164:in `auth'
 from ./tg.rb:167

Changed in telegard:
importance: Medium → High
status: New → Confirmed
Chris Tusa (chris-tusa) on 2010-06-03
summary: - Very First login errors on database record (callhistory?)
+ Very First login or signup errors on database record.
Chris Tusa (chris-tusa) wrote :

Resolved issue with comment #1 by improving creation of record by pre-creating caller id and expiration values in advance of the Session.new call. Issue now found when logging out as shown below with a failed DELETE statement. More than likely this is a result of the $session variable in lib/tglogin.rb not knowing its own ID due to no refresh. Again. this issue ONLY occurs during the first login.

/data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:863:in `_delete': Attempt to delete object did not result in a single row modification (Rows Deleted: 0, SQL: DELETE FROM "SESSIONS" WHERE ("ID" IS NULL)) (Sequel::NoExistingObject)
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:624:in `delete'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:886:in `_destroy_delete'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:877:in `_destroy'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:635:in `destroy'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/model/base.rb:1006:in `checked_transaction'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/database/query.rb:167:in `_transaction'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/database/query.rb:153:in `transaction'
 from /data/devel/lang/jruby-1.5.0/lib/ruby/gems/1.8/gems/sequel-3.12.0/lib/sequel/connection_pool/threaded.rb:84:in `hold'
  ... 7 levels...
 from ./lib/tgio/input.rb:342:in `menuprompt'
 from ./lib/controllers/main.rb:62:in `menu'
 from ./tg.rb:170

Changed in telegard:
status: Confirmed → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers