I migrated from Theia 0.12 to 1.4. If I run theia build, I have an error in my generated electron-main.js:
const setElectronSecurityToken = async port => {
await electron.session.defaultSession.cookies.set({
url: `http://localhost:${port}/`,
name: ElectronSecurityToken,
value: JSON.stringify(electronSecurityToken),
httpOnly: true
});
};
The set function expects 2 arguments instead of one. Any idea what I forgot to update which might cause this issue?
(node:5419) UnhandledPromiseRejectionWarning: TypeError: Insufficient number of arguments.
at setElectronSecurityToken (/home/<path>/dist/linux-unpacked/resources/app/src-gen/frontend/electron-main.js:221:55)
at ChildProcess.cp.on (/home/<path>/dist/linux-unpacked/resources/app/src-gen/frontend/electron-main.js:266:19)
at ChildProcess.emit (events.js:182:13)
at emit (internal/child_process.js:811:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:5419) 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: 2)