Move SentryInit before logger.log to avoid winston exceptions

Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
Hung-Han (Henry) Chen committed 2021-07-09 14:22:38 +03:00
1 parent 31745b38da
commit e815461cb4
1 file changed
+4 -6
+4 -6
View File
@@ -61,6 +61,10 @@ import { ExtensionsStore } from "../extensions/extensions-store";
import { FilesystemProvisionerStore } from "./extension-filesystem";
import { SentryInit } from "../common/sentry";
// This has to be called before start using winton-based logger
// For example, before any logger.log
SentryInit();
const workingDir = path.join(app.getPath("appData"), appName);
const cleanup = disposer();
@@ -141,12 +145,6 @@ app.on("ready", async () => {
UserStore.createInstance().startMainReactions();
/**
* There is no point setting up sentry before UserStore is initialized as
* `allowErrorReporting` will always be falsy.
*/
await SentryInit();
ClusterStore.createInstance().provideInitialFromMain();
HotbarStore.createInstance();
ExtensionsStore.createInstance();