Linux 4.19.66-1-MANJARO
Electron v6.0.1
Chromium v76.0.3809.102
Node v12.4.0
Installed from archlinux repo
(node:31792) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'x' of undefined
at createMainWindow (/usr/lib/caprine/dist-js/index.js:190:28)
at /usr/lib/caprine/dist-js/index.js:240:18
(node:31792) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'x' of undefined
at createMainWindow (/usr/lib/caprine/dist-js/index.js:190:28)
at /usr/lib/caprine/dist-js/index.js:240:18
(node:31792) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:31792) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:31792) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js
process with a non-zero exit code.
(node:31792) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js
process with a non-zero exit code.
5.2.9-arch1-1-ARCH
Election v6.0.1
Chromium v76.0.3809.102
Node v12.4.0
Same issue, same error message.
Temporary fix just to get it running on i3 :
Open /usr/lib/caprine/dist-js/index.js on line 190 with an editor as sudo and replace:
lastWindowState.x,
lastWindowState.y,
lastWindowState.width,
lastWindowState.height
on the x,y,width,height arguments respectively with some integer like 0,0,100,100 respectively. Remember to keep the comma after the number.
Should startup afterwards. Hope I could help
It worked for me, thanks!
Building on what @PanagiotisGts recommended, I modified line 181 from
const lastWindowState = config_1.default.get('lastWindowState');
to
const lastWindowState = config_1.default.get('lastWindowState') || { x:0, y:0, width:100, height:100 };
and that solved my issue in manjaro :)
Most helpful comment
Temporary fix just to get it running on i3 :
Open /usr/lib/caprine/dist-js/index.js on line 190 with an editor as sudo and replace:
lastWindowState.x,
lastWindowState.y,
lastWindowState.width,
lastWindowState.height
on the x,y,width,height arguments respectively with some integer like 0,0,100,100 respectively. Remember to keep the comma after the number.
Should startup afterwards. Hope I could help