Snapshot before Gemini gets to work.

This commit is contained in:
Scott Idem
2025-12-16 13:09:45 -05:00
parent 710d6e10c0
commit f1645fe6f4
2 changed files with 25 additions and 1 deletions

View File

@@ -153,3 +153,26 @@ The feature is not working. The browser's console logs show that the `report_mee
### Next Step
The crucial next step is to use the **Network** tab in the browser's developer tools. We need to observe what happens, if anything, at the exact moment the "Stats payload being sent" message appears in the console. This will tell us if a request is being blocked by the browser itself (e.g., CORS pre-flight failure) or if it's failing to even be dispatched.
---
## Jitsi Stats Reporting Debugging (Final Resolution - 2025-12-16)
**Context:** Continued debugging the silent failure of the `create_ae_obj__activity_log` API call within the Jitsi video conferencing page.
**Root Cause Identification:**
1. **Hidden Console Errors:** The primary reason for the prolonged debugging was that Firefox Developer Tools had console errors hidden. This meant that crucial `TypeError` messages, which would have immediately pointed to the issue, were not visible.
2. **Incorrect Parameter Passing:** The `api_cfg` parameter, expected by `create_ae_obj__activity_log`, was not correctly resolved in the calling context. Specifically, the `$ae_api` Svelte store, which provides the necessary `api_cfg` object, was not being imported into the component. Accessing properties on an `undefined` `$ae_api` (or a malformed `api_cfg` extracted from it) led to an uncaught `TypeError` that was being suppressed by the console settings.
**Solution:**
* Ensured console errors were visible in Firefox Developer Tools.
* Added `import { ae_api } from '$lib/stores/ae_stores';` to the relevant Svelte component (`src/routes/idaa/(idaa)/video_conferences/+page.svelte`).
* Ensured `api_cfg` was correctly passed as `$ae_api` to the `create_ae_obj__activity_log` function.
**Key Learnings:**
* **Always Verify Console Settings:** Before deep-diving into complex debugging, ensure that browser developer tools are configured to show all error types. A simple UI misclick can hide critical information.
* **Parameter Resolution is Key:** Even with `async/await` and `try...catch` blocks, errors related to `undefined` or improperly resolved parameters passed to functions can cause silent failures if the error occurs before the `try` block can effectively catch it, or if console reporting is suppressed.
* **Initial Error Messages are Paramount:** The first error message is often the most accurate indicator of the root cause, even if subsequent attempts to fix it seem to fail. Had the `TypeError` been visible, the debugging process would have been significantly shorter.
* **The "Silent Failure" often has a hidden error message:** A function that appears to "disappear" or fail silently often has an underlying error being suppressed or unhandled in a way that prevents it from being logged.
**Outcome:**
The activity logging functionality is now working as expected. While the original hypothesis of a circular dependency was a plausible architectural issue, the immediate problem was a more fundamental runtime error exacerbated by hidden console output. The temporary isolation of the activity log function (`src/lib/ae_idaa/idaa_activity_log.ts`) is no longer needed.

View File

@@ -63,7 +63,8 @@
const participants_array = Array.from(meeting_participants.values());
const data_kv = {
external_client_id: user_id, // Novi Customer GUID in this case
// NOTE: It may make since to use the Jitsi ID instead. Technically this is reporting on behalf of Jitsi and not really specific to the moderator. Also, this helps if there are multiple moderators!
external_client_id: user_id, // Novi Customer GUID for now.
name: 'live_stats_update', // Name of log entry "type"
description: room_name,
url_root: data?.url.origin,