ca98am79 / connect-dynamodb

DynamoDB session store for Connect
http://ca98am79.github.com/connect-dynamodb/
MIT License
144 stars 66 forks source link

Cannot read property length of undefined #33

Closed jacobsimon closed 8 years ago

jacobsimon commented 8 years ago

Updated to 1.0.8 to get the fix for reaping but now encountering a different issue during testing. It appears to come from the line that references self.prefix.length in the reaping logic. Has anyone else seen/resolved this problem?

TypeError: Cannot read property 'length' of undefined 
  at destroyDataAt (/.../node_modules/connect-dynamodb/lib/connect-dynamodb.js:211:48)
  at Response.destroy (/.../node_modules/connect-dynamodb/lib/connect-dynamodb.js:219:9)
  at Response.onScan (/.../node_modules/connect-dynamodb/lib/connect-dynamodb.js:196:21)
  at Request.<anonymous> (/.../node_modules/aws-sdk/lib/request.js:355:18)
  at Request.callListeners (/.../node_modules/aws-sdk/lib/sequential_executor.js:105:20)
  at Request.emit /.../node_modules/aws-sdk/lib/sequential_executor.js:77:10)
  at Request.emit (/.../node_modules/aws-sdk/lib/request.js:615:14)
  at Request.transition (/.../node_modules/aws-sdk/lib/request.js:22:10)

(paths are abbreviated)

Baraksi commented 8 years ago

I encountered the same problem and resolved it.

Relevant pull request is here: https://github.com/ca98am79/connect-dynamodb/pull/34

ca98am79 commented 8 years ago

thanks @Baraksi