diff --git a/src/App.vue b/src/App.vue index 2ec9239..50249b2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -309,6 +309,28 @@ + +
+ Something has gone very wrong. We'd appreciate if you'd + contact us and let us know how you got here. Thank you! +
+ +- If all else fails, uninstall the app, ensure all the browser tabs with - it are closed, and clear out caches and storage. + If all else fails, it's best to start over.
Of course, you'll want to back up all your data first -- all seeds as
- well as the contacts & settings -- on the Account
+ well as the contacts & settings -- on the Profile
+ Here are instructions to uninstall the app and clear out caches and storage. + Note that you should first ensure check that the browser tabs with Time Safari are closed. + (If any are open then that will interfere with your refresh.) +
- There is an "Advanced" section at the bottom of the Account
+ There is an "Advanced" section at the bottom of the Profile
@@ -422,19 +422,19 @@
First, note that clearing the cache will clear all your identity and contact info, - so we recommend doing other things first (unless you know you have your backups ready). + so we recommend doing other things first -- and only clearing when have your backups ready.
{{ package.version }} ({{ commitHash }})
Contact us at diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index bb9bd1c..8e4de44 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -389,6 +389,7 @@ import { } from "@/constants/app"; import { db, + logConsoleAndDb, retrieveSettingsForActiveAccount, updateAccountSettings, } from "@/db/index"; @@ -486,12 +487,21 @@ export default class HomeView extends Vue { async mounted() { try { - this.allMyDids = await retrieveAccountDids(); - if (this.allMyDids.length === 0) { - this.isCreatingIdentifier = true; - const newDid = await generateSaveAndActivateIdentity(); - this.isCreatingIdentifier = false; - this.allMyDids = [newDid]; + try { + this.allMyDids = await retrieveAccountDids(); + if (this.allMyDids.length === 0) { + this.isCreatingIdentifier = true; + const newDid = await generateSaveAndActivateIdentity(); + this.isCreatingIdentifier = false; + this.allMyDids = [newDid]; + } + } catch (error) { + // continue because we want the feed to work, even anonymously + logConsoleAndDb( + "Error retrieving all account DIDs on home page:" + error, + true, + ); + // some other piece will display an error about personal info } const settings = await retrieveSettingsForActiveAccount(); @@ -546,6 +556,7 @@ export default class HomeView extends Vue { this.activeDid, this.lastAckedOfferToUserJwtId, ); + console.log("offersToUserData", offersToUserData); this.numNewOffersToUser = offersToUserData.data.length; this.newOffersToUserHitLimit = offersToUserData.hitLimit; } @@ -563,7 +574,7 @@ export default class HomeView extends Vue { // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (err: any) { - console.error("Error retrieving settings or feed.", err); + logConsoleAndDb("Error retrieving settings or feed: " + err, true); this.$notify( { group: "alert", @@ -760,13 +771,19 @@ export default class HomeView extends Vue { */ async retrieveGives(endorserApiServer: string, beforeId?: string) { const beforeQuery = beforeId == null ? "" : "&beforeId=" + beforeId; + const doNotShowErrorAgain = !!beforeId; // don't show error again if we're loading more + const headers = await getHeaders( + this.activeDid, + doNotShowErrorAgain ? undefined : this.$notify, + ); + // retrieve headers for this user, but if an error happens then report it but proceed with the fetch with no header const response = await fetch( endorserApiServer + "/api/v2/report/gives?giftNotTrade=true" + beforeQuery, { method: "GET", - headers: await getHeaders(this.activeDid), + headers: headers, }, ); diff --git a/src/views/IdentitySwitcherView.vue b/src/views/IdentitySwitcherView.vue index bfefd94..4392203 100644 --- a/src/views/IdentitySwitcherView.vue +++ b/src/views/IdentitySwitcherView.vue @@ -170,6 +170,7 @@ export default class IdentitySwitcherView extends Vue { title: "Delete Identity?", text: "Are you sure you want to erase this identity? (There is no undo. You may want to select it and back it up just in case.)", onYes: async () => { + // one of the few times we use accountsDBPromise directly; try to avoid more usage const accountsDB = await accountsDBPromise; await accountsDB.accounts.delete(id); this.otherIdentities = this.otherIdentities.filter( diff --git a/src/views/ProjectViewView.vue b/src/views/ProjectViewView.vue index 685e88f..787d7fb 100644 --- a/src/views/ProjectViewView.vue +++ b/src/views/ProjectViewView.vue @@ -489,7 +489,11 @@ import QuickNav from "@/components/QuickNav.vue"; import EntityIcon from "@/components/EntityIcon.vue"; import ProjectIcon from "@/components/ProjectIcon.vue"; import { NotificationIface } from "@/constants/app"; -import { db, retrieveSettingsForActiveAccount } from "@/db/index"; +import { + db, + logConsoleAndDb, + retrieveSettingsForActiveAccount, +} from "@/db/index"; import { Contact } from "@/db/tables/contacts"; import * as libsUtil from "@/libs/util"; import { @@ -557,7 +561,24 @@ export default class ProjectViewView extends Vue { this.allContacts = await db.contacts.toArray(); this.isRegistered = !!settings.isRegistered; - this.allMyDids = await retrieveAccountDids(); + try { + this.allMyDids = await retrieveAccountDids(); + } catch (error) { + // continue because we want to see claims, even anonymously + logConsoleAndDb( + "Error retrieving all account DIDs on home page:" + error, + true, + ); + this.$notify( + { + group: "alert", + type: "danger", + title: "Error Loading Profile", + text: "See the Help page to fix problems with your personal data.", + }, + -1, + ); + } const pathParam = window.location.pathname.substring("/project/".length); if (pathParam) { diff --git a/src/views/ProjectsView.vue b/src/views/ProjectsView.vue index 32fea4e..d151813 100644 --- a/src/views/ProjectsView.vue +++ b/src/views/ProjectsView.vue @@ -355,7 +355,7 @@ export default class ProjectsView extends Vue { **/ async projectDataLoader(url: string) { try { - const headers = await getHeaders(this.activeDid); + const headers = await getHeaders(this.activeDid, this.$notify); this.isLoading = true; const resp = await this.axios.get(url, { headers } as AxiosRequestConfig); if (resp.status === 200 && resp.data.data) { diff --git a/src/views/SeedBackupView.vue b/src/views/SeedBackupView.vue index 9604b01..a991a79 100644 --- a/src/views/SeedBackupView.vue +++ b/src/views/SeedBackupView.vue @@ -94,7 +94,7 @@