Session Cookies not loaded correctly?
Created by: dax-classix
I'm trying to develop using nodemon
, so my node process is restarting frequently. I wanted to use the profile
option so I don't need to scan the QR every time it restarts. I am using the sample 7 line script.
I initialize like this:
const profile = 'dax.wechaty.json';
const bot = new Wechaty({ profile });
I get the following errors upon restart:
ERR! PuppetWebBrowser loadSession() addCookies() exception: {"errorMessage":"Can only set Cookies for the current domain","request":{"headers":{"Accept":"application/json; charset=utf-8","Connection":"close","Content-Length":"99","Content-Type":"application/json;charset=UTF-8","Host":"[REDACTED]:65121"},"httpVersion":"1.1","method":"POST","post":"{\"cookie\":{\"name\":\"pgv_si\",\"value\":\"[REDACTED]\",\"path\":\"/\",\"domain\":\".wechat.com\",\"secure\":false}}","url":"/cookie","urlParsed":{"anchor":"","query":"","file":"cookie","directory":"/","path":"/cookie","relative":"/cookie","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/cookie","queryKey":{},"chunks":["cookie"]},"urlOriginal":"/session/[REDACTED]/cookie"}}
[REDACTED]
contains the (seemingly) correct session info.
Am I doing something wrong?