-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error on call etSessionKey #11
Comments
my module version "node-laravel-session": "^2.0.1" |
i dont know what is causing this. i see the serialized session }�(���T����V'����H��m �&����H����L�wJ�o�(��g�� and then its trying to unserialize that but it obiously cant. |
i find in this file at line 44 -44 when print decodde result it return |
Right, that's the string buffer. The resulting string is the one I put in
the comment above with weird characters
…On Thu, Feb 7, 2019, 2:58 PM Ali Hossinzadeh ***@***.*** wrote:
i find in this file at line 44
/node_modules/node_laravel_session/index.js
-44 let decoded = decoder.update(laravelSession.value, 'base64');
console.log(decoded);
when print decodde result it return
<Buffer 7d 15 28 f4 03 02 54 f4 07 1a cb 56 27 08 90 ab 85 48 dc f7 6d 20
a9 26 00 80 86 a1 88 48 85 e2 ed 9b c1 4c e4 77 4a a4 6f ac 28 85 ed 67 7f
dd>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS0qyiqj8fz-Ia_RoP7i7nD4O8V_S37kks5vLIVpgaJpZM4aoeqt>
.
|
I do not know what is this / var express = require('express'); var Redis = require("ioredis"); laravelSession.getAppKey('.env') io.on('connection',function(socket){
..... |
what is the key in the .env file?? |
cartbecart_session (laravel_session) eyJpdiI6IlwvQmxPWXlQODc5ZVRUN3czSUYzWlhRPT0iLCJ2YWx1ZSI6IkZUckVBa2thcFwvSDVqUlRGQUw0dWViK25vV21EM3RNb0g5bTFCMzVPSFwvaCsrekZuT05PN2ZWR3RHZmFKXC9DUWR6VHQzc21MeTBiYnB5citZdEpOQVJ3PT0iLCJtYWMiOiI4NWU2ZTJlODFiNWExMTE5YjNkODE3MzMzNzU0ODBjMGU5NzMwZDVlOWZjNmEwZDIxMzQ0OThmNTFhZjk3OGNjIn0= APP_KEY=base64:29A3+reTa/uHap99VMxlpITCLIXIGCJUrnPYkayRyJU= |
i think there might be something wrong with your key because it appears that that is supposed to be base64 encoded but when you go to decode it its malformed |
if you are still in development try to regenerate it |
I did this several times with the following command |
ok, so it had been a while since i played with laravel so.... i did some testing and got the same error here. now i think i was able to fix it but i would like to verify with you.... could you add the following log console.log('decodedValue', decoded.toString()); and you will get a weird string (in your case it had symbols, in mine it didnt, i dont know if it has to do something with the character encoding. If you have a different character encoding pass it to the function toString like so "toString('utf-8')") once you do, get the value it logs and try to look for that key in you session driver, if its a file it will be in the storage folder and if its in a database or redis it will be the primary key or identifier of the session. if you confirm i will create a fix and push it :) |
ok .. i will come back soon |
i add this line in /node_modules/node_laravel_session/index.js after line 43 result is decodedValue s:40:"3EyeQWEP03dudZvuE1PpoaXxXVb6gskywKYQo2FW"; |
wow problem was solved |
hi thanks for this modual .
my node -v is 6.9.2
npm -v is 3.10.9
when call to to this propertis .
var sessionKey = laravelSession.getSessionKey(session, laravel_app_key);
it got this error
SyntaxError: Unknown / Unhandled data type(s): � at error (G:\wamp64\www\xxx\laravel\node_modules\php-unserialize\php-unserialize.js:54:13) at _unserialize (G:\wamp64\www\xxx\laravel\node_modules\php-unserialize\php-unserialize.js:166:11) at unserialize (G:\wamp64\www\xxx\laravel\node_modules\php-unserialize\php-unserialize.js:173:10) at Object.getSessionKey (G:\wamp64\www\xxx\laravel\node_modules\node-laravel-session\index.js:46:16) at Namespace.<anonymous> (G:\wamp64\www\xxx\laravel\app.js:28:37) at emitOne (events.js:96:13) at Namespace.emit (events.js:188:7) at Namespace.emit (G:\wamp64\www\xxx\laravel\node_modules\socket.io\lib\namespace.js:205:10) at G:\wamp64\www\xxx\laravel\node_modules\socket.io\lib\namespace.js:172:14 at _combinedTickCallback (internal/process/next_tick.js:67:7) [nodemon] app crashed - waiting for file changes before starting...
The text was updated successfully, but these errors were encountered: