Comments (5)
@viraptor Thanks for the input. Please submit a little more information about the runtime environment: node version, used libraries with their versions, some meaningful code fragments etc.
from connect-memcached.
Just for the record, I've tested scenarios with live v1->v2 migration (without encryption) and there were no errors, so I need a little more data to recreate the scenario.
from connect-memcached.
On behalf of @viraptor, we are using Node 16.16.0
These are our dependencies.
"dependencies": {
"async": "~3.2",
"bluebird": "^3.7.2",
"body-parser": "~1.20.0",
"bootable": "^0.2.4",
"bunyan": "^1.8.12",
"coffeescript": "~2.7.0",
"connect-flash": "^0.1.1",
"connect-memcached": "^2.0.0",
"connect-timeout": "^1.7.0",
"cookie-parser": "~1.4.6",
"cors": "^2.5.3",
"csurf": "^1.10.0",
"dd-trace": "^2.12.2",
"ecad": "^0.2.0",
"errorhandler": "^1.5.1",
"express": "^4.18.1",
"express-cluster": "0.0.5",
"express-http-proxy": "^1.6.3",
"express-session": "^1.17.3",
"heroku-ssl-redirect": "0.0.2",
"lodash": ">=4.17.20",
"memcached": "^2.1.0",
"method-override": "~3.0.0",
"mockery": "^2.1.0",
"morgan": "~1.10.0",
"newrelic": "^8.17.1",
"oauth20-provider": "envato/node-oauth20-provider#envato-api-gateway",
"parse-database-url": "^0.3.0",
"pg": "^8.7.3",
"pg-hstore": "^2.3.4",
"pug": "^3.0.2",
"randomstring": "^1.2.2",
"raw-body": "^2.5.1",
"require-subvert": "^0.1.0",
"rollbar": "^2.25.1",
"sequelize": "^5.22.5",
"sequelize-cli": "^6.4.1",
"type-is": "^1.6.12",
"x-frame-options": "1.0.0"
},
Our implementation is simple, no encryption:
session = require('express-session')
MemcachedStore = require('connect-memcached')(session)
app.use(Middleware.sessionStore(
secret: process.env.EXPRESS_SESSION_SECRET,
resave: false,
saveUninitialized: false,
store: new MemcachedStore({
hosts: global.memcacheHosts,
prefix: 'api-gateway:session:'
})
))
Can I ask, in v2.0.0, it seems like the parseable string is not JSON parsed anymore. Is this a possible cause? v1.0.0...v2.0.0#diff-60110081947a55d72cbc180c13f565fd978c43ad0dbb393ff9719c654193b634L88
Here's a screenshot of our rollbar trace:
from connect-memcached.
To my knowledge, in such case, Memcached client should directly pass Object
as the data
in callback function, which is then passed using variable parseable_string
(quite misleading name) to createSession
. String parsing is occurring only during decryption for obvious reasons. Also look that the error is suggesting that the whole data
is undefined
, which suggest the problem is somewhere else? If the problem would be that the store is passing string instead object, then whole different error would appear. Previously 1.0.0
the data would be unnecessary dumped to string and again converted to Object, so the current behavior makes more sense.
These are just some fast observations, will run some experiments later. By the time don't hesitate to put some breakpoints or logs and dubug your specific case.
from connect-memcached.
Serialization of the cookie data may be at play here
from connect-memcached.
Related Issues (18)
- session expire HOT 1
- License missing HOT 1
- Example won't work HOT 8
- Dependency on "connect" HOT 1
- Does your library support SASL? HOT 3
- Support recommended store.touch method HOT 4
- maintenance help HOT 1
- Confirm memcached connection HOT 6
- user logout automatically HOT 2
- No authentication? HOT 2
- how to set prefix HOT 3
- Possible bug in AWS environment HOT 10
- [Node v8.9.4] Warning: Use Cipheriv for counter mode of aes-256-ctr HOT 9
- Passing in a existing memcached client ignores the secret option HOT 5
- Store fails on memcached 0.0.8 HOT 2
- Latest test suite HOT 4
- Crypto algorithm HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from connect-memcached.