Skip to content

Commit

Permalink
fix account error when id token is not found and fix account migration
Browse files Browse the repository at this point in the history
  • Loading branch information
blarfoon committed Nov 18, 2024
1 parent d041c46 commit 4420e7c
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
// packages/mainWindow/vite.config.mjs
import { resolve, join } from "node:path";
import { defineConfig } from "file:///Users/davideceschia/Documents/gitRepos/GDLauncher-Carbon/node_modules/.pnpm/vite@4.5.2_@types+node@20.11.6_less@4.2.0_terser@5.27.0/node_modules/vite/dist/node/index.js";
import solidPlugin from "file:///Users/davideceschia/Documents/gitRepos/GDLauncher-Carbon/node_modules/.pnpm/vite-plugin-solid@2.9.1_@testing-library+jest-dom@5.17.0_solid-js@1.8.15_vite@4.5.2_@types+no_pmzw7f2nprlmdrbn2arr6rg32i/node_modules/vite-plugin-solid/dist/esm/index.mjs";
import Unocss from "file:///Users/davideceschia/Documents/gitRepos/GDLauncher-Carbon/node_modules/.pnpm/unocss@0.62.3_postcss@8.4.35_rollup@4.9.6_vite@5.1.4_@types+node@20.11.6_less@4.2.0_terser@5.27.0_/node_modules/unocss/dist/vite.mjs";

// package.json
var package_default = {
name: "@gd/desktop",
productName: "GDLauncher",
private: true,
description: "GDLauncher Carbon.",
author: "GorillaDevs Inc.",
license: "ARR",
type: "module",
_comment: "DO NOT MANUALLY EDIT THE VERSION",
version: "0.0.0",
main: "dist/main/index.cjs",
scripts: {
dev: "node scripts/watch.mjs",
test: "playwright test",
"build-vite": "node scripts/build.mjs",
"patch-version": "node scripts/monkeypatchVersion.mjs",
"build-electron": "cross-env-shell DEBUG=electron-builder ow-electron-builder --config .electron-builder.config.cjs",

Check failure on line 24 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / windows_x64

Insert `⏎·····`

Check failure on line 24 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / ubuntu_x64

Insert `⏎·····`

Check failure on line 24 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / mac_universal

Insert `⏎·····`
build: "pnpm patch-version && pnpm build-vite && pnpm build-electron",
clean: "node scripts/cleanReleaseFolder.mjs",
lint: 'tsc && eslint --ext .js,.jsx,.ts,.tsx,.mjs,.cjs . && prettier --check "**/*.{js,jsx,ts,tsx,mjs,cjs}"',
release: "node scripts/releaseDraft.mjs"
},
devDependencies: {
"@formkit/auto-animate": "^0.8.2",
"@gd/config": "workspace:*",
"@gd/core_module": "workspace:*",
"@gd/i18n": "workspace:*",
"@gd/ui": "workspace:*",
"@overwolf/ow-electron": "^31.4.0",
"@overwolf/ow-electron-builder": "^25.0.6",
"@playwright/test": "^1.47.1",
"@rive-app/canvas": "^2.21.5",
"@rspc/client": "^0.2.0",
"@rspc/solid": "^0.2.0",
"@sentry/electron": "^4.23.0",
"@sentry/vite-plugin": "^2.14.2",
"@solid-primitives/deep": "^0.2.3",
"@solid-primitives/keyboard": "^1.2.5",
"@solid-primitives/map": "^0.4.8",
"@solidjs/router": "^0.9.1",
"@tanstack/solid-query": "^5.30.6",
"@tanstack/solid-table": "^8.20.5",
"@tanstack/solid-virtual": "3.4.0",
"@types/marked": "^5.0.2",
"@types/sanitize-html": "^2.9.1",
"@typescript-eslint/parser": "^6.7.3",
"@unocss/eslint-config": "^0.62.3",
chokidar: "^3.5.3",
"date-fns": "^2.30.0",
dotenv: "^16.3.1",
electron: "^31.4.0",
"electron-log": "^5.1.1",
"electron-notarize": "^1.2.2",
"electron-updater": "^6.3.7",
eslint: "^8.31.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-i18next": "6.0.3",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-solid": "^0.14.3",
"fast-xml-parser": "^4.3.6",
"fs-extra": "^11.2.0",
"html-parse-string": "^0.0.9",
jsdom: "^22.1.0",
marked: "^9.0.3",
playwright: "^1.47.1",
prettier: "^3.0.3",
"sanitize-html": "^2.11.0",
"solid-js": "^1.8.15",
"solid-transition-group": "^0.2.3",
typescript: "^5.6.3",
vite: "^4.4.9",
"vite-plugin-solid": "^2.7.0"
},
env: {
"//": "Used in build scripts",
PORT: 3344
}
};

// packages/mainWindow/vite.config.mjs
import { unocssConfig, appVersion } from "file:///Users/davideceschia/Documents/gitRepos/GDLauncher-Carbon/packages/config/dist/index.js";

Check failure on line 88 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / windows_x64

Replace `·unocssConfig,·appVersion·` with `⏎··unocssConfig,⏎··appVersion⏎`

Check failure on line 88 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / ubuntu_x64

Replace `·unocssConfig,·appVersion·` with `⏎··unocssConfig,⏎··appVersion⏎`

Check failure on line 88 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / mac_universal

Replace `·unocssConfig,·appVersion·` with `⏎··unocssConfig,⏎··appVersion⏎`
import { dirname } from "path";
import { fileURLToPath } from "url";
var __vite_injected_original_import_meta_url = "file:///Users/davideceschia/Documents/gitRepos/GDLauncher-Carbon/apps/desktop/packages/mainWindow/vite.config.mjs";

Check failure on line 91 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / windows_x64

Insert `⏎·`

Check failure on line 91 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / ubuntu_x64

Insert `⏎·`

Check failure on line 91 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / mac_universal

Insert `⏎·`
var __dirname = dirname(fileURLToPath(__vite_injected_original_import_meta_url));

Check failure on line 92 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / windows_x64

Replace `fileURLToPath(__vite_injected_original_import_meta_url)` with `⏎··fileURLToPath(__vite_injected_original_import_meta_url)⏎`

Check failure on line 92 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / ubuntu_x64

Replace `fileURLToPath(__vite_injected_original_import_meta_url)` with `⏎··fileURLToPath(__vite_injected_original_import_meta_url)⏎`

Check failure on line 92 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / mac_universal

Replace `fileURLToPath(__vite_injected_original_import_meta_url)` with `⏎··fileURLToPath(__vite_injected_original_import_meta_url)⏎`
var vite_config_default = defineConfig({
mode: process.env.NODE_ENV,
root: __dirname,
plugins: [
Unocss({
...unocssConfig,
rules: [
...unocssConfig.rules,
[
/^bg-img-(.*)$/,
([, d]) => {
const img = d.split("-")[0];
return {
background: process.env.NODE_ENV === "development" ? `url('./assets/images/${img}')` : `url('./images/${img}')`,

Check failure on line 106 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / windows_x64

Replace `·process.env.NODE_ENV·===·"development"·?·`url('./assets/images/${img}')`` with `⏎················process.env.NODE_ENV·===·"development"⏎··················?·`url('./assets/images/${img}')`⏎·················`

Check failure on line 106 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / ubuntu_x64

Replace `·process.env.NODE_ENV·===·"development"·?·`url('./assets/images/${img}')`` with `⏎················process.env.NODE_ENV·===·"development"⏎··················?·`url('./assets/images/${img}')`⏎·················`

Check failure on line 106 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / mac_universal

Replace `·process.env.NODE_ENV·===·"development"·?·`url('./assets/images/${img}')`` with `⏎················process.env.NODE_ENV·===·"development"⏎··················?·`url('./assets/images/${img}')`⏎·················`
"background-size": "cover",
"background-repeat": "no-repeat",
"box-sizing": "border-box"
};
}
],
[
/^content-\[(.*)\]$/,
([, content]) => ({ content: JSON.stringify(content) })
]
]
}),
solidPlugin()
],
assetsInclude: ["**/*.riv"],
envDir: resolve(__dirname, "../../../../"),
define: {
__APP_VERSION__: JSON.stringify(appVersion)
},
base: "./",
optimizeDeps: {
exclude: ["@tanstack/solid-query", "path", "fs", "promises"]
},
build: {
target: "esnext",
emptyOutDir: true,
outDir: "../../dist/mainWindow",
sourcemap: true
},
resolve: {
alias: {
"@": join(__dirname, "src"),
"@package_json": resolve(__dirname, "../../package.json")
}
},
server: {
port: package_default.env.PORT
}
});
export {

Check failure on line 146 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / windows_x64

Replace `⏎··vite_config_default·as·default⏎` with `·vite_config_default·as·default·`

Check failure on line 146 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / ubuntu_x64

Replace `⏎··vite_config_default·as·default⏎` with `·vite_config_default·as·default·`

Check failure on line 146 in apps/desktop/packages/mainWindow/vite.config.mjs.timestamp-1731887386854-66d016c430bb9.mjs

View workflow job for this annotation

GitHub Actions / mac_universal

Replace `⏎··vite_config_default·as·default⏎` with `·vite_config_default·as·default·`
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsicGFja2FnZXMvbWFpbldpbmRvdy92aXRlLmNvbmZpZy5tanMiLCAicGFja2FnZS5qc29uIl0sCiAgInNv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9tIFwidXJsXCI7XG5cbmNvbnN0IF9fZGlybmFtZSA9IGRpcm5hbWUoZmlsZVVSTFRvUGF0aChpbXBvcnQubWV0YS51cmwpKTtcblxuZXhwb3J0IGRlZmF1bHQgZGVmaW5lQ29uZmlnKHtcbiAgbW9kZTogcHJvY2Vzcy5lbnYuTk9ERV9FTlYsXG4gIHJvb3Q6IF9fZGlybmFtZSxcbiAgcGx1Z2luczogW1xuICAgIFVub2Nzcyh7XG4gICAgICAuLi51bm9jc3NDb25maWcsXG4gICAgICBydWxlczogW1xuICAgICAgICAuLi51bm9jc3NDb25maWcucnVsZXMsXG4gICAgICAgIFtcbiAgICAgICAgICAvXmJnLWltZy0oLiopJC8sXG4gICAgICAgICAgKFssIGRdKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBpbWcgPSBkLnNwbGl0KFwiLVwiKVswXTtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgIGJhY2tncm91bmQ6XG4gICAgICAgICAgICAgICAgcHJvY2Vzcy5lbnYuTk9ERV9FTlYgPT09IFwiZGV2ZWxvcG1lbnRcIlxuICAgICAgICAgICAgICAgICAgPyBgdXJsKCcuL2Fzc2V0cy9pbWFnZXMvJHtpbWd9JylgXG4gICAgICAgICAgICAgICAgICA6IGB1cmwoJy4vaW1hZ2VzLyR7aW1nfScpYCxcbiAgICAgICAgICAgICAgXCJiYWNrZ3JvdW5kLXNpemVcIjogXCJjb3ZlclwiLFxuICAgICAgICAgICAgICBcImJhY2tncm91bmQtcmVwZWF0XCI6IFwibm8tcmVwZWF0XCIsXG4gICAgICAgICAgICAgIFwiYm94LXNpemluZ1wiOiBcImJvcmRlci1ib3hcIlxuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFtcbiAgICAgICAgICAvXmNvbnRlbnQtXFxbKC4qKVxcXSQvLFxuICAgICAgICAgIChbLCBjb250ZW50XSkgPT4gKHsgY29udGVudDogSlNPTi5zdHJpb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FBTyxFQUFFO0FBQUEsUUFDdkQ7QUFBQSxNQUNGO0FBQUEsSUFDRixDQUFDO0FBQUEsSUFDRCxZQUFZO0FBQUEsRUFDZDtBQUFBLEVBQ0EsZUFBZSxDQUFDLFVBQVU7QUFBQSxFQUMxQixRQUFRLFFBQVEsV0FBVyxjQUFjO0FBQUEsRUFDekMsUUFBUTtBQUFBLElBQ04saUJBQWlCLEtBQUssVUFBVSxVQUFVO0FBQUEsRUFDNUM7QUFBQSxFQUNBLE1BQU07QUFBQSxFQUNOLGNBQWM7QUFBQSxJQUNaLFNBQVMsQ0FBQyx5QkFBeUIsUUFBUSxNQUFNLFVBQVU7QUFBQSxFQUM3RDtBQUFBLEVBQ0EsT0FBTztBQUFBLElBQ0wsUUFBUTtBQUFBLElBQ1IsYUFBYTtBQUFBLElBQ2IsUUFBUTtBQUFBLElBQ1IsV0FBVztBQUFBLEVBQ2I7QUFBQSxFQUNBLFNBQVM7QUFBQSxJQUNQLE9BQU87QUFBQSxNQUNMLEtBQUssS0FBSyxXQUFXLEtBQUs7QUFBQSxNQUMxQixpQkFBaUIsUUFBUSxXQUFXLG9CQUFvQjtBQUFBLElBQzFEO0FBQUEsRUFDRjtBQUFBLEVBQ0EsUUFBUTtBQUFBLElBQ04sTUFBTSxnQkFBSSxJQUFJO0FBQUEsRUFDaEI7QUFDRixDQUFDOyIsCiAgIm5hbWVzIjogW10KfQo=
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ALTER TABLE "new_AppConfiguration" RENAME TO "AppConfiguration";
CREATE UNIQUE INDEX "AppConfiguration_id_key" ON "AppConfiguration"("id");

-- reset since azure app id changed
UPDATE "Account" SET "accessToken" = NULL, "tokenExpires" = NULL, "msRefreshToken" = NULL, "idToken" = NULL;
UPDATE "Account" SET "accessToken" = "invalid", "msRefreshToken" = "invalid", "idToken" = "invalid";

PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
14 changes: 7 additions & 7 deletions crates/carbon_app/src/managers/account/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ impl<'s> ManagerRef<'s, AccountManager> {
))?
.id_token
else {
bail!("attempted to get an account that does not exist");
bail!("this account is present in the db but the id_token is missing. Presumably offline account. (uuid: {uuid})");
};

info!("Waiting for account validation");
Expand All @@ -232,7 +232,7 @@ impl<'s> ManagerRef<'s, AccountManager> {
))?
.id_token
else {
bail!("attempted to get an account that does not exist");
bail!("this account is present in the db but the id_token is missing. Presumably offline account. (uuid: {uuid})");
};

let account = self.gdl_account_task.read().await;
Expand All @@ -257,7 +257,7 @@ impl<'s> ManagerRef<'s, AccountManager> {
.id_token
else {
return Err(RequestGDLAccountDeletionError::RequestFailed(
anyhow::anyhow!("attempted to get an account that does not exist"),
anyhow::anyhow!("this account is present in the db but the id_token is missing. Presumably offline account. (uuid: {uuid})")
));
};

Expand Down Expand Up @@ -294,7 +294,7 @@ impl<'s> ManagerRef<'s, AccountManager> {
))?
.id_token
else {
bail!("attempted to get an account that does not exist");
bail!("this account is present in the db but the id_token is missing. Presumably offline account. (uuid: {uuid})");
};

let lock = self.gdl_account_task.write().await;
Expand Down Expand Up @@ -354,7 +354,7 @@ impl<'s> ManagerRef<'s, AccountManager> {
))?
.id_token
else {
bail!("attempted to get an account that does not exist");
bail!("this account is present in the db but the id_token is missing. Presumably offline account. (uuid: {saved_gdl_account_uuid})")
};

let Some(user) = self
Expand Down Expand Up @@ -386,7 +386,7 @@ impl<'s> ManagerRef<'s, AccountManager> {
.id_token
else {
return Err(RequestNewVerificationTokenError::RequestFailed(
anyhow::anyhow!("attempted to get an account that does not exist"),
anyhow::anyhow!("this account is present in the db but the id_token is missing. Presumably offline account. (uuid: {uuid})")
));
};

Expand Down Expand Up @@ -419,7 +419,7 @@ impl<'s> ManagerRef<'s, AccountManager> {
.id_token
else {
return Err(RequestNewEmailChangeError::RequestFailed(anyhow::anyhow!(
"attempted to get an account that does not exist"
"this account is present in the db but the id_token is missing. Presumably offline account. (uuid: {uuid})"
)));
};

Expand Down

0 comments on commit 4420e7c

Please sign in to comment.