diff --git a/.env.testing b/.env.testing index e69bc581..d4c84e0b 100644 --- a/.env.testing +++ b/.env.testing @@ -1,6 +1,6 @@ # Only the variables that start with VITE_ are seen in the application import.meta.env in Vue. - +# iOS doesn't like spaces in the app title. TIME_SAFARI_APP_TITLE="TimeSafari_Test" VITE_APP_SERVER=https://test.timesafari.app # This is the claim ID for actions in the BVC project. diff --git a/src/constants/app.ts b/src/constants/app.ts index a08cb15a..e0044ff4 100644 --- a/src/constants/app.ts +++ b/src/constants/app.ts @@ -7,6 +7,7 @@ export enum AppString { // This is used in titles and verbiage inside the app. // There is also an app name without spaces, for packaging in the package.json file used in the manifest. APP_NAME = "Time Safari", + // iOS doesn't like spaces in the app title. APP_NAME_NO_SPACES = "TimeSafari", PROD_ENDORSER_API_SERVER = "https://api.endorser.ch", diff --git a/src/db-sql/migration.ts b/src/db-sql/migration.ts index e06636bd..0feb3ad2 100644 --- a/src/db-sql/migration.ts +++ b/src/db-sql/migration.ts @@ -29,6 +29,7 @@ import { arrayBufferToBase64 } from "@/libs/crypto"; const randomBytes = crypto.getRandomValues(new Uint8Array(32)); const secretBase64 = arrayBufferToBase64(randomBytes); +console.log('secretBase64', secretBase64); // useful while we have multiple DBs activating (at least on web) // Each migration can include multiple SQL statements (with semicolons) const MIGRATIONS = [ diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts index f2dc79a4..1776c29c 100644 --- a/src/libs/endorserServer.ts +++ b/src/libs/endorserServer.ts @@ -60,7 +60,7 @@ import { KeyMetaMaybeWithPrivate, } from "../interfaces/common"; import { PlanSummaryRecord } from "../interfaces/records"; -import { logger } from "../utils/logger"; +import { logger, safeStringify } from "../utils/logger"; import { PlatformServiceFactory } from "@/services/PlatformServiceFactory"; /** @@ -437,19 +437,23 @@ export async function getHeaders( } headers["Authorization"] = "Bearer " + token; } catch (error) { - // This rarely happens: we've seen it when they have account info but the - // encryption secret got lost. But in most cases we want users to at - // least see their feed -- and anything else that returns results for - // anonymous users. - // We'll continue with an anonymous request... still want to show feed and other things, but ideally let them know. + // This rarely happens: we've seen it when they have account info but the + // encryption secret got lost. + // Replicate this in Chrome: go to Storage and hit 'Clear site data'. + // Check the util.ts retrieveFullyDecryptedAccount method where it calls simpleDecrypt. + + // In most cases we want users to at least see their feed -- and anything + // else that returns results for anonymous users. + // We'll continue with an anonymous request... still want to show feed + // and other things, but we need to let them know. logConsoleAndDb( "Something failed in getHeaders call (will proceed anonymously" + ($notify ? " and notify user" : "") + "): " + // IntelliJ type system complains about getCircularReplacer() with: Argument of type '(obj: any, key: string, value: any) => any' is not assignable to parameter of type '(this: any, key: string, value: any) => any'. //JSON.stringify(error, getCircularReplacer()), // JSON.stringify(error) on a Dexie error throws another error about: Converting circular structure to JSON - error, + error + " - " + safeStringify(error), true, ); if ($notify) { diff --git a/src/libs/util.ts b/src/libs/util.ts index 17ba3c8e..5878a315 100644 --- a/src/libs/util.ts +++ b/src/libs/util.ts @@ -605,7 +605,7 @@ export const retrieveFullyDecryptedAccount = async ( dbAccount.values.length === 0 || dbAccount.values[0].length === 0 ) { - throw new Error("Account not found."); + throw new Error("Account not found for did: " + activeDid); } const fullAccountData = databaseUtil.mapQueryResultToValues( dbAccount, diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index b91dc224..6a589e14 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -126,7 +126,7 @@
People {{ profileImageUrl ? "without your image" : "" }} see this
- (if you've let them see your activity): + (if you've let them see which posts are yours):
URL.revokeObjectURL(this.downloadUrl), 1000); - } catch (error) { - this.handleExportError(error); - } + // // Revoke the temporary URL -- after a pause to avoid DuckDuckGo download failure + // setTimeout(() => URL.revokeObjectURL(this.downloadUrl), 1000); + // } catch (error) { + // this.handleExportError(error); + // } } /** diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 49919da9..a626b099 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -102,8 +102,7 @@ Raymer * @version 1.0.0 */ class="text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white mt-2 px-2 py-3 rounded-md" @click="showNameThenIdDialog()" > - Show them {{ PASSKEYS_ENABLED ? "default" : "your" }} identifier - info + Show them your identification info
@@ -683,7 +682,7 @@ export default class HomeView extends Vue { group: "alert", type: "warning", title: "Feed Loading Issue", - text: "Some feed data may be unavailable. Pull to refresh.", + text: "Some feed data may be unavailable. Try refreshing the page.", }, 5000, );