我有NW.JS桌面应用程序,它的作用就像一个web浏览器。该应用程序构建在0.45.6 NWJS版本上。
从上周起,桌面在重启之间停止保存会话,比如当用户以前登录到网站并停止应用程序并重新启动时,该网站已经登录。
我还试图将NWJS升级到最新版本0.52.0 (2021年4月),但它仍然无法工作。
会话是在win.reloadIgnoringCache()触发的重新加载期间维护的。
和这一切都发生在所有的网站上。
是否有任何会话变量参数添加到NWJS中,我可以用它来维护状态?我应该朝哪个方向去解决这个问题呢?
以下是package.json内容
{
"name": "app",
"version": "31.0.1",
"description": "app",
"author": "app",
"license": "UNLICENSED",
"main": "main.html",
"nodejs": true,
"single-instance": true,
"page-cache": false,
"scripts": {
"start": "nw ."
},
"node-remote": "<all_urls>",
"window": {
"show": true,
"frame": false,
"position": "center",
"width": 800,
"height": 460,
"min_width": 800,
"min_height": 460,
"resizable": false,
"icon": "resources/images/favicon.png"
},
"dependencies": {
"crypto": "latest",
"crypto-js": "latest",
"jquery": "latest",
"lodash-core": "^4.17.19",
"log4js": "latest",
"node-machine-id": "latest",
"rimraf": "latest",
"semver": "latest",
"shelljs": "latest"
},
"chromium-args": "--enable-logging=stderr --disable-gpu --user-data-dir='/Users/sunil/sunil/temp/userdatadir/profile1'"
}发布于 2021-07-18 12:34:12
您是否尝试过从chromium-args中删除以下内容
--user-data-dir='/Users/sunil/sunil/temp/userdatadir/profile1'
https://stackoverflow.com/questions/68427188
复制相似问题