diff --git a/src/components/QRScanner/QRScannerDialog.vue b/src/components/QRScanner/QRScannerDialog.vue
index 032286e1..aca9248c 100644
--- a/src/components/QRScanner/QRScannerDialog.vue
+++ b/src/components/QRScanner/QRScannerDialog.vue
@@ -201,6 +201,10 @@
{{ debugMessage }}
+
+
+ DEBUG PANEL: If you see this, the template is updating.
+
@@ -278,9 +282,9 @@ export default class QRScannerDialog extends Vue {
}
}
- async onInit(promise: Promise, attempt = 1): Promise {
- alert("onInit called, attempt: " + attempt);
- this.debugMessage = "onInit called, attempt: " + attempt;
+ async onInit(promise: Promise) {
+ alert("onInit called");
+ this.debugMessage = "onInit called";
let timeoutHit = false;
const timeout = setTimeout(() => {
timeoutHit = true;
@@ -304,25 +308,19 @@ export default class QRScannerDialog extends Vue {
clearTimeout(timeout);
alert("Promise rejected: " + (error instanceof Error ? error.message : error));
this.debugMessage = "Promise rejected: " + (error instanceof Error ? error.message : error);
- if (attempt < 3) {
- // Retry after a short delay
- setTimeout(() => this.onInit(promise, attempt + 1), 1500);
- this.initializationStatus = `Retrying camera initialization (attempt ${attempt + 1})...`;
- return;
- }
- const wrappedError =
- error instanceof Error ? error : new Error(String(error));
- this.error = wrappedError.message;
- this.cameraStatus = "Error";
- if (this.onError) {
- this.onError(wrappedError);
+ if (error instanceof Error) {
+ this.error = error.message;
+ this.cameraStatus = "Error";
+ if (this.onError) {
+ this.onError(error);
+ }
+ logger.error("Error initializing QR scanner:", {
+ error: error.message,
+ stack: error.stack,
+ name: error.name,
+ type: error.constructor.name,
+ });
}
- logger.error("Error initializing QR scanner:", {
- error: wrappedError.message,
- stack: wrappedError.stack,
- name: wrappedError.name,
- type: wrappedError.constructor.name,
- });
} finally {
this.isInitializing = false;
}