← Back to list | Download | 2026-01-21-21-54-log2-Laurent.log (1,055,833 bytes)
=== Eye Viewer Log Rotated at 2026-01-21 10:56:04 +0000 ===
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("operation_type"): 0, AnyHashable("message_data"): {
    datesent = "2026-01-21 11:04:49";
    "file_name" = "";
    message = Okii;
    "message_id" = 18384;
    "message_type" = 0;
    "prev_session_message_id" = 18383;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("session_id"): ILUIWU]
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18384, AnyHashable("operation_type"): 3]
 - stun:stun.l.google.com:19302
 - turn:crivello.dyndns.org:3478?transport=udp
 - turn:crivello.dyndns.org:3478?transport=tcp
 - turns:crivello.dyndns.org:5349?transport=tcp
    datesent = "2026-01-21 11:20:40";
    "file_name" = "";
    message = "\Ud83d\Udc8b";
    "message_id" = 18385;
    "message_type" = 0;
    "prev_session_message_id" = 18384;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18385]
    datesent = "2026-01-21 11:20:40";
    "file_name" = "";
    message = "\Ud83d\Udc8b";
    "message_id" = 18385;
    "message_type" = 0;
    "prev_session_message_id" = 18384;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18385]
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("operation_type"): 0, AnyHashable("session_id"): ILUIWU, AnyHashable("message_data"): {
    datesent = "2026-01-21 11:20:40";
    "file_name" = "";
    message = "\Ud83d\Udc8b";
    "message_id" = 18385;
    "message_type" = 0;
    "prev_session_message_id" = 18384;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}]
    "content-available" = 1;
}, AnyHashable("operation_type"): 3]
 - stun:stun.l.google.com:19302
 - turn:crivello.dyndns.org:3478?transport=udp
 - turn:crivello.dyndns.org:3478?transport=tcp
 - turns:crivello.dyndns.org:5349?transport=tcp
    "LocalWebSocketTask <622300CF-5BD1-445E-9935-9BE955B4F47C>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <622300CF-5BD1-445E-9935-9BE955B4F47C>.<1>}
    "content-available" = 1;
}, AnyHashable("operation_type"): 3]
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18386, AnyHashable("operation_type"): 3]
    "LocalWebSocketTask <37837BEB-46F9-4935-AF5A-43BDB98CA0DD>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <37837BEB-46F9-4935-AF5A-43BDB98CA0DD>.<1>}
    datesent = "2026-01-21 12:16:28";
    "file_name" = "";
    message = "I was in a call with sasa baby";
    "message_id" = 18388;
    "message_type" = 0;
    "prev_session_message_id" = 18387;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}]
    datesent = "2026-01-21 12:16:31";
    "file_name" = "";
    message = "Sorry\Ud83e\Udd72";
    "message_id" = 18389;
    "message_type" = 0;
    "prev_session_message_id" = 18388;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 2;
    "content-available" = 1;
    sound = default;
}]
    "content-available" = 1;
}, AnyHashable("operation_type"): 3]
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 2;
    "content-available" = 1;
    sound = default;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 12:16:31";
    "file_name" = "";
    message = "Sorry\Ud83e\Udd72";
    "message_id" = 18389;
    "message_type" = 0;
    "prev_session_message_id" = 18388;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("operation_type"): 0]
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18389]
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18390]
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18391]
    "LocalWebSocketTask <5B5E188C-4F2F-44A5-A562-5B4D26D46C91>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <5B5E188C-4F2F-44A5-A562-5B4D26D46C91>.<1>}
    datesent = "2026-01-21 12:24:40";
    "file_name" = "";
    message = "Im sure it will baby\U2665\Ufe0f";
    "message_id" = 18393;
    "message_type" = 0;
    "prev_session_message_id" = 18392;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("message_id"): 18393, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}]
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("message_id"): 18393, AnyHashable("message_data"): {
    datesent = "2026-01-21 12:24:40";
    "file_name" = "";
    message = "Im sure it will baby\U2665\Ufe0f";
    "message_id" = 18393;
    "message_type" = 0;
    "prev_session_message_id" = 18392;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("operation_type"): 0]
    "content-available" = 1;
}]
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU]
    "content-available" = 1;
}]
    "LocalWebSocketTask <BA7106B1-EAB1-4727-AB8A-DA2CC99C2DEF>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <BA7106B1-EAB1-4727-AB8A-DA2CC99C2DEF>.<1>}
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_data"): {
    datesent = "2026-01-21 12:35:13";
    "file_name" = "";
    message = "Babyyy!!!!!!";
    "message_id" = 18396;
    "message_type" = 0;
    "prev_session_message_id" = 18395;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("message_id"): 18396]
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18396]
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 12:35:22";
    "file_name" = "";
    message = "\Ud83d\Ude21";
    "message_id" = 18397;
    "message_type" = 0;
    "prev_session_message_id" = 18396;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("message_id"): 18397, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 0]
    "LocalWebSocketTask <6DEF45AE-ECF0-48E2-ABCE-C8D608D0AC30>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <6DEF45AE-ECF0-48E2-ABCE-C8D608D0AC30>.<1>}
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18397, AnyHashable("operation_type"): 3]
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 12:35:22";
    "file_name" = "";
    message = "\Ud83d\Ude21";
    "message_id" = 18397;
    "message_type" = 0;
    "prev_session_message_id" = 18396;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("message_id"): 18397]
    datesent = "2026-01-21 12:56:37";
    "file_name" = "";
    message = "I do, I always do !";
    "message_id" = 18400;
    "message_type" = 0;
    "prev_session_message_id" = 18399;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("session_id"): ILUIWU]
    "content-available" = 1;
}, AnyHashable("message_id"): 18400, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU]
    "LocalDataTask <7074F352-0D31-4D01-A5AE-7D58AE30AFF6>.<150>"
), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=https://crivello.dyndns.org:443/WebRTC/chat/receive_message.php, NSErrorFailingURLKey=https://crivello.dyndns.org:443/WebRTC/chat/receive_message.php, _kCFStreamErrorDomainKey=4}
 - stun:stun.l.google.com:19302
 - turn:crivello.dyndns.org:3478?transport=udp
 - turn:crivello.dyndns.org:3478?transport=tcp
 - turns:crivello.dyndns.org:5349?transport=tcp
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18404, AnyHashable("session_id"): ILUIWU]
    "content-available" = 1;
}, AnyHashable("operation_type"): 3]
    datesent = "2026-01-21 16:09:06";
    "file_name" = "";
    message = "Ahhh I wish I can go\Ud83e\Udd72";
    "message_id" = 18416;
    "message_type" = 0;
    "prev_session_message_id" = 18415;
    "replied_message" = "Maybe Pilates ?";
    "replied_sender_id" = "3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF";
    "replied_sender_name" = Laurent;
    "reply_to_id" = 18408;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 7;
    "content-available" = 1;
    sound = default;
}]
    "content-available" = 1;
}]
    "content-available" = 1;
}, AnyHashable("message_id"): 18415]
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18414]
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18412]
    "content-available" = 1;
}, AnyHashable("message_id"): 18410]
    "content-available" = 1;
}]
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU]
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18419]
    datesent = "2026-01-21 16:37:39";
    "file_name" = "";
    message = "I haven\U2019t eaten anything yet today";
    "message_id" = 18420;
    "message_type" = 0;
    "prev_session_message_id" = 18419;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("message_id"): 18420, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}]
    datesent = "2026-01-21 16:37:39";
    "file_name" = "";
    message = "I haven\U2019t eaten anything yet today";
    "message_id" = 18420;
    "message_type" = 0;
    "prev_session_message_id" = 18419;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("message_id"): 18420, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}]
    datesent = "2026-01-21 16:37:39";
    "file_name" = "";
    message = "I haven\U2019t eaten anything yet today";
    "message_id" = 18420;
    "message_type" = 0;
    "prev_session_message_id" = 18419;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("message_id"): 18420, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}]
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU]
    "content-available" = 1;
}, AnyHashable("message_id"): 18421, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3]
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU]
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("operation_type"): 0, AnyHashable("message_data"): {
    datesent = "2026-01-21 16:38:16";
    "file_name" = "";
    message = "Yes I was baby";
    "message_id" = 18423;
    "message_type" = 0;
    "prev_session_message_id" = 18422;
    "replied_message" = "Were you alone at home today ?";
    "replied_sender_id" = "3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF";
    "replied_sender_name" = Laurent;
    "reply_to_id" = 18406;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("session_id"): ILUIWU]
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("operation_type"): 0, AnyHashable("message_data"): {
    datesent = "2026-01-21 16:38:16";
    "file_name" = "";
    message = "Yes I was baby";
    "message_id" = 18423;
    "message_type" = 0;
    "prev_session_message_id" = 18422;
    "replied_message" = "Were you alone at home today ?";
    "replied_sender_id" = "3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF";
    "replied_sender_name" = Laurent;
    "reply_to_id" = 18406;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("session_id"): ILUIWU]
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("message_id"): 18423, AnyHashable("message_data"): {
    datesent = "2026-01-21 16:38:16";
    "file_name" = "";
    message = "Yes I was baby";
    "message_id" = 18423;
    "message_type" = 0;
    "prev_session_message_id" = 18422;
    "replied_message" = "Were you alone at home today ?";
    "replied_sender_id" = "3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF";
    "replied_sender_name" = Laurent;
    "reply_to_id" = 18406;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}]
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18423, AnyHashable("operation_type"): 3]
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18424]
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 16:38:43";
    "file_name" = "";
    message = "Not sure about that, gained some weight during weekend \Ud83e\Udd23\Ud83e\Udd23";
    "message_id" = 18425;
    "message_type" = 0;
    "prev_session_message_id" = 18424;
    "replied_message" = "More needed for me than for you !";
    "replied_sender_id" = "3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF";
    "replied_sender_name" = Laurent;
    "reply_to_id" = 18422;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18425]
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 16:38:43";
    "file_name" = "";
    message = "Not sure about that, gained some weight during weekend \Ud83e\Udd23\Ud83e\Udd23";
    "message_id" = 18425;
    "message_type" = 0;
    "prev_session_message_id" = 18424;
    "replied_message" = "More needed for me than for you !";
    "replied_sender_id" = "3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF";
    "replied_sender_name" = Laurent;
    "reply_to_id" = 18422;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18425]
    datesent = "2026-01-21 16:38:43";
    "file_name" = "";
    message = "Not sure about that, gained some weight during weekend \Ud83e\Udd23\Ud83e\Udd23";
    "message_id" = 18425;
    "message_type" = 0;
    "prev_session_message_id" = 18424;
    "replied_message" = "More needed for me than for you !";
    "replied_sender_id" = "3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF";
    "replied_sender_name" = Laurent;
    "reply_to_id" = 18422;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("operation_type"): 0, AnyHashable("message_id"): 18425, AnyHashable("session_id"): ILUIWU]
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18425]
    "LocalWebSocketTask <C46221C8-5A4A-4F2B-9DAC-2BE6B035669B>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <C46221C8-5A4A-4F2B-9DAC-2BE6B035669B>.<1>, NSLocalizedDescription=The network connection was lost.}
    "LocalWebSocketTask <6E11C228-B24A-4F7A-AC00-58DDE0A5B60C>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <6E11C228-B24A-4F7A-AC00-58DDE0A5B60C>.<1>}
    "LocalWebSocketTask <B20088FB-C92D-472A-A471-0DCB51C8A677>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <B20088FB-C92D-472A-A471-0DCB51C8A677>.<1>}
── Body ──
{"ok":true,"message":"Message updated","session_id":"ILUIWU","message_id":18429,"event_type":2}
    "content-available" = 1;
}, AnyHashable("message_id"): 18428]
[19:06:07] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:06:07] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:06:07] [LIFECYCLE] App entering foreground - restoring connections
[19:06:07] [LIFECYCLE] Away > 2 minutes (2449s) - will scroll to bottom
[19:06:07] [UPLOAD_RETRY] No pending uploads to retry
[19:06:07] [LIFECYCLE] Merged 868 reactions from local DB
[19:06:07] [LIFECYCLE] WebRTC audio re-enabled
[19:06:07] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:06:07] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:06:07] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:06:07] [VIEWER] Reconnecting after background - querying agents
[19:06:07] [UNSENT_RETRY] Checking for unsent messages...
[19:06:07] [PENDING_UPLOAD] Total pending upload messages: 0
[19:06:07] [UNSENT_RETRY] No unsent messages found
[19:06:07] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:06:07] [WS] Connection failed: The operation couldn’t be completed. Software caused connection abort
[19:06:07] [WS] Query connection failed - cleaning up all agent connections and views
[19:06:07] [CLEANUP] ========================================
[19:06:07] [CLEANUP] Cleaning up all agent connections and views
[19:06:07] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:06:07] [CLEANUP] Stopped and removed 0 video connections
[19:06:07] [CLEANUP] Removed 0 video views
[19:06:07] [CLEANUP] Removed 0 feed scroll views
[19:06:07] [CLEANUP] Removed 0 status labels
[19:06:07] [CLEANUP] Reset agent query state
[19:06:07] [CLEANUP] Updated page indicator
[19:06:07] [CLEANUP] Rebuilt video layout
[19:06:07] [CLEANUP] ✅ All agent connections and views cleaned up
[19:06:07] [CLEANUP] ========================================
[19:06:07] [SERVER] Starting reconnect polling (5s interval)
[19:06:07] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18380, 18381, 18382, 18383, 18384]
[19:06:07] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:06:07] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:06:07] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:06:07] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[19:06:07] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:06:07] [PUSH] handlePollEventsNotification userInfo: [:]
[19:06:07] [PUSH] No message_id in userInfo
[19:06:07] [PUSH] No operation_type in userInfo
[19:06:07] [FAST_REFRESH] Evolution disabled - performing incremental sync
[19:06:07] [FAST_REFRESH] Already have 50 messages - skipping local DB load
[19:06:07] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[19:06:07] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[19:06:07] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[19:06:07] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18429
[19:06:07] [CLIENT_SIG] WebSocket opened
[19:06:07] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:06:07] [CLIENT_SIG] Connected! clientId=gKQpxrE3ZSN2_b79
[19:06:07] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:06:07] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:06:07] [INCREMENTAL_SYNC] ✅ No new messages
[19:06:07] [FAST_REFRESH] Incremental sync complete - 50 messages
[19:06:07] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18380, 18381, 18382, 18383, 18384]
[19:06:07] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:06:07] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:06:07] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:06:07] [COMBINED_FETCH] Loaded 7195 read receipts, 873 messages with reactions
[19:06:07] [FOREGROUND] Enriched 0 messages with readBy data from server
[19:06:07] [COMBINED_FETCH] Loaded 7195 read receipts, 873 messages with reactions
[19:06:07] [FAST_REFRESH] Enriched 50 messages with readBy data
[19:06:07] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:06:08] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18380, 18381, 18382, 18383, 18384]
[19:06:08] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:06:08] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:06:08] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true[19:06:08] [LOG] Pruned 396 entries older than 3 hours
[19:06:08] [SECURITY] Restored real session: ILUIWU
[19:06:08] [SECURITY] Restored real session: ILUIWU
[19:06:08] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[19:06:08] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:06:08] [LOCK] ✅ PIN auth callback - setting isAuthenticated = true
[19:06:08] [AUTH] Authentication completed - updating UI only (data already fetched in foreground handler)
[19:06:08] [AUTH] UI update complete
[19:06:08] [FAKE MODE] Exiting fake mode, restoring real session
[19:06:08] [SECURITY] Restored real session: ILUIWU
[19:06:08] [SECURITY] Saved real session: ILUIWU
[19:06:08] [FAKE MODE] ✅ Restored real session: ILUIWU
[19:06:08] [FAKE MODE] Loaded 50 messages (limited to page size)
[19:06:08] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":0,"removed_from_other_channels":0}
[19:06:08] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:06:08] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:06:08] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:06:08] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:06:08] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18380, 18381, 18382, 18383, 18384]
[19:06:08] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:06:08] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:06:08] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:06:08] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[19:06:08] HELLO → sent (cached token, role=query)
[19:06:08] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[19:06:08] [WS] Query connection failed - cleaning up all agent connections and views
[19:06:08] [WS] WebSocket ACTUALLY CLOSED - isQueryOnly=true, connectionStr=iosILUIWU, closeCode=1000
[19:06:08] [WS] Query connection to iosILUIWU closed - cleaning up all agent connections and views
[19:06:08] [CLEANUP] ========================================
[19:06:08] [CLEANUP] Cleaning up all agent connections and views
[19:06:08] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:06:08] [CLEANUP] Stopped and removed 0 video connections
[19:06:08] [CLEANUP] Removed 0 video views
[19:06:08] [CLEANUP] Removed 0 feed scroll views
[19:06:08] [CLEANUP] Removed 0 status labels
[19:06:08] [CLEANUP] Reset agent query state
[19:06:08] [CLEANUP] Updated page indicator
[19:06:08] [CLEANUP] Rebuilt video layout
[19:06:08] [CLEANUP] ✅ All agent connections and views cleaned up
[19:06:08] [CLEANUP] ========================================
[19:06:08] [SERVER] Starting reconnect polling (5s interval)
[19:06:08] [CLEANUP] ========================================
[19:06:08] [CLEANUP] Cleaning up all agent connections and views
[19:06:08] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:06:08] [CLEANUP] Stopped and removed 0 video connections
[19:06:08] [CLEANUP] Removed 0 video views
[19:06:08] [CLEANUP] Removed 0 feed scroll views
[19:06:08] [CLEANUP] Removed 0 status labels
[19:06:08] [CLEANUP] Reset agent query state
[19:06:08] [CLEANUP] Updated page indicator
[19:06:08] [CLEANUP] Rebuilt video layout
[19:06:08] [CLEANUP] ✅ All agent connections and views cleaned up
[19:06:08] [CLEANUP] ========================================
[19:06:08] [SERVER] Starting reconnect polling (5s interval)
[19:06:09] [USER] ✅ User registered successfully
[19:06:09] [PUSH] User registration after token update: success
[19:06:09] [COMBINED_FETCH] Loaded 7195 read receipts, 873 messages with reactions
[19:06:09] [FAKE MODE] Enriched 50 messages with readBy data
[19:06:09] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18380, 18381, 18382, 18383, 18384]
[19:06:09] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:06:09] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:06:09] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:06:10] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[19:06:10] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:06:10] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[19:06:10] HELLO → sent (cached token, role=query)
[19:06:10] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[19:06:10] [WS] Query connection failed - cleaning up all agent connections and views
[19:06:10] [WS] WebSocket ACTUALLY CLOSED - isQueryOnly=true, connectionStr=iosILUIWU, closeCode=1000
[19:06:10] [WS] Query connection to iosILUIWU closed - cleaning up all agent connections and views
[19:06:10] [CLEANUP] ========================================
[19:06:10] [CLEANUP] Cleaning up all agent connections and views
[19:06:10] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:06:10] [CLEANUP] Stopped and removed 0 video connections
[19:06:10] [CLEANUP] Removed 0 video views
[19:06:10] [CLEANUP] Removed 0 feed scroll views
[19:06:10] [CLEANUP] Removed 0 status labels
[19:06:10] [CLEANUP] Reset agent query state
[19:06:10] [CLEANUP] Updated page indicator
[19:06:10] [CLEANUP] Rebuilt video layout
[19:06:10] [CLEANUP] ✅ All agent connections and views cleaned up
[19:06:10] [CLEANUP] ========================================
[19:06:10] [SERVER] Starting reconnect polling (5s interval)
[19:06:10] [CLEANUP] ========================================
[19:06:10] [CLEANUP] Cleaning up all agent connections and views
[19:06:10] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:06:10] [CLEANUP] Stopped and removed 0 video connections
[19:06:10] [CLEANUP] Removed 0 video views
[19:06:10] [CLEANUP] Removed 0 feed scroll views
[19:06:10] [CLEANUP] Removed 0 status labels
[19:06:10] [CLEANUP] Reset agent query state
[19:06:10] [CLEANUP] Updated page indicator
[19:06:10] [CLEANUP] Rebuilt video layout
[19:06:10] [CLEANUP] ✅ All agent connections and views cleaned up
[19:06:10] [CLEANUP] ========================================
[19:06:10] [SERVER] Starting reconnect polling (5s interval)
[19:06:11] [LOCK] Lock button tapped - locking app immediately
[19:06:11] [LOCK] Received lock app notification
[19:06:12] [LIFECYCLE] App resigning active - cleared crash flag
[19:06:12] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[19:06:12] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:06:12] [SECURITY] sceneDidEnterBackground - isAuthenticated=false
[19:06:12] [SECURITY] ⚠️ NOT saving timestamp - isAuthenticated is false
[19:06:12] [LIFECYCLE] App entering background - cleared crash flag
[19:06:12] [CLIENT_SIG] Disconnecting
[19:06:12] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[19:06:12] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[19:06:12] [WS] Canceling WebSocket for query connection to iosILUIWU
[19:06:12] In cleanupPeer
[19:06:12] In cleanupPeer
[19:06:12] [LIFECYCLE] WebRTC audio disabled
[19:06:12] [LIFECYCLE] AVAudioSession deactivated
[19:06:12] [LIFECYCLE] All connections stopped
[19:06:12] [CLIENT_SIG] WebSocket closed with code 1001
[19:06:12] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[19:06:12] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[19:06:12] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[19:06:12] [SERVER] Stopped reconnect polling
[19:06:12] [WS] WebSocket task completed with error - isQueryOnly=true: cancelled
[19:06:12] [WS] Query connection error - cleaning up all agent connections and views
[19:06:12] Will request stop of video 0
[19:06:12] [WS] Connection failed: cancelled
[19:06:12] [WS] Query connection failed - cleaning up all agent connections and views
[19:06:12] Will request stop of video 0
[19:06:12] [APP_DISCONNECT] Scene disconnecting - logging pending uploads...
[19:06:12] [APP_TERMINATE] ⚠️ 2 pending uploads in DB queue:
[19:06:12] [APP_TERMINATE]   - id=335, file=t_21b86ebc5e802df4.jpg, status=uploading, retries=0, size=0.0MB
[19:06:12] [APP_TERMINATE]   - id=474, file=1f0e8529cd56643f.mov, status=uploading, retries=0, size=0.0MB
[19:09:58] [CRASH] No crash detected
[19:09:58] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[19:09:58] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[19:09:58] [GIPHY] SDK not available - using REST API fallback
[19:09:58] [BACKGROUND] Background fetch enabled
[19:09:58] [AUTH] Starting PIN authentication
[19:09:58] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:09:58] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:09:58] [CLEANUP] No old timer messages to delete
[19:09:58] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[19:09:59] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":0,"removed_from_other_channels":0}
[19:09:59] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:09:59] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[19:09:59] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:09:59] [USER] ✅ User registered successfully
[19:09:59] [PUSH] User registration after token update: success
[19:09:59] [CLIENT_SIG] WebSocket opened
[19:09:59] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:09:59] [CLIENT_SIG] Connected! clientId=CkI5Syi50YBwikPW
[19:09:59] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:09:59] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:09:59] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18429)...
[19:09:59] [PRELOAD] No messages or parse error
[19:10:00] [PIN_AUTH] Correct PIN
[19:10:00] [SECURITY] Restored real session: ILUIWU
[19:10:00] [SECURITY] Restored real session: ILUIWU
[19:10:00] [SECURITY] Saved real session: ILUIWU
[19:10:00] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[19:10:00] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:10:00] Documents Directory: /var/mobile/Containers/Data/Application/BCEE3A1D-777A-4FA7-8430-4ADDB19C5FAA/Documents
[19:10:00] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[19:10:00] [THEME] Applying current theme
[19:10:00] [CHAT] Applied day theme (mode: day)
[19:10:00] [SECURITY] Saved real session: ILUIWU
[19:10:00] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:10:00] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:10:00] [NETWORK] Network monitor started
[19:10:00] [NETWORK] Status changed: connected
[19:10:00] Did transition
[19:10:00] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[19:10:00] [VIEWER] Screen lock enabled - normal idle behavior
[19:10:00] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[19:10:00] [VCC] ========== VideoConnectionClass INIT ==========
[19:10:00] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[19:10:00] [DATA AUDIO] ========== setupWebRTC() START ==========
[19:10:00] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[19:10:00] [DATA AUDIO] Creating encoder/decoder factories...
[19:10:00] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[19:10:00] [CODEC] Viewer selected encoder: AV1 (best quality)
[19:10:00] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[19:10:00] [DATA AUDIO] ✅ Factory created
[19:10:00] [DATA AUDIO] RTCAudioSession locked
[19:10:00] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[19:10:00] [DATA AUDIO] RTCAudioSession unlocked
[19:10:00] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[19:10:00] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[19:10:00] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[19:10:00] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:10:00] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[19:10:00] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[19:10:00] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[19:10:00] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[19:10:00] Did transition
[19:10:00] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[19:10:00] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:10:00] [CHUNK] Merged 868 reactions synchronously
[19:10:00] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:10:00] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[19:10:00] [MIGRATION] No messages need sender_name backfill
[19:10:00] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[19:10:00] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[19:10:00] [GALLERY_DB] Raw datesent for msg 18407: '2026-01-21 15:35:55'
[19:10:00] [GALLERY_DB] Raw datesent for msg 18380: '2026-01-21 10:30:35'
[19:10:00] [USER] ✅ User registered successfully
[19:10:00] [USER] User registration successful
[19:10:00] [GALLERY_DB] ✅ Loaded 475 media messages
[19:10:00] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18429
[19:10:00] [INCREMENTAL_SYNC] ✅ No new messages
[19:10:00] [GALLERY] Filtered 475 -> 436 (only with local thumbnails)
[19:10:00] [GALLERY] First 5 after sort (newest first):
[19:10:00] [GALLERY]   0: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[19:10:00] [GALLERY]   1: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[19:10:00] [GALLERY]   2: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[19:10:00] [GALLERY]   3: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[19:10:00] [GALLERY]   4: id=18340, date=2026-01-21 08:29:40, file=a4f205035ad487c7.jpg
[19:10:00] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[19:10:00] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18380, 18381, 18382, 18383, 18384]
[19:10:00] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[19:10:00] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:10:00] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:10:00] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[19:10:00] [SERVER] Starting reconnect polling (5s interval)
[19:10:00] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[19:10:00] [ICONS] Offset applied: -14.6
[19:10:00] [ICONS] New left margin: 11.2, New right margin: 11.3
[19:10:00] [ICONS] Chat center: (31.2, 87.0)
[19:10:00] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[19:10:00] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[19:10:00] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[19:10:00] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[19:10:00] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[19:10:00] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[19:10:00] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[19:10:00] [ICONS] Screen width: 440.0
[19:10:00] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[19:10:00] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:10:00] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:10:00] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[19:10:00] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:10:00] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:10:00] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:10:00] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[19:10:00] [UNSENT_RETRY] Checking for unsent messages...
[19:10:00] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[19:10:00] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[19:10:00] [UPLOAD_RECOVERY] Session: ILUIWU
[19:10:00] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[19:10:00] [UPLOAD_RECOVERY] Checking recent media messages on server...
[19:10:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[19:10:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[19:10:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[19:10:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[19:10:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[19:10:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[19:10:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[19:10:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[19:10:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[19:10:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[19:10:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[19:10:00] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[19:10:00] [PENDING_UPLOAD] Total pending upload messages: 0
[19:10:00] [UNSENT_RETRY] No unsent messages found
[19:10:00] new_session POST ok: token len=157
[19:10:00] HELLO → sent (fetched token, role=query)
[19:10:00] [SIG] hello_ok received for query connection - ready to query agents
[19:10:00] [SIG] get_agents request sent for sessionId=ILUIWU
[19:10:00] [SIG] get_agents request sent for sessionId=iosILUIWU
[19:10:00] [SERVER] Stopped reconnect polling
[19:10:00] [SIG] agents_list received: []
[19:10:00] [SIG] agents_list received: []
[19:10:01] [UPLOAD_RECOVERY] ✅ All media files verified on server
[19:10:01] [COMBINED_FETCH] Loaded 7195 read receipts, 873 messages with reactions
[19:10:01] [READBY_ENRICH] Enriched 50 messages with readBy data
[19:10:01] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18380, 18381, 18382, 18383, 18384]
[19:10:01] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:10:01] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:10:01] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:10:14] [LOCK] Lock button tapped - locking app immediately
[19:10:14] [LOCK] Received lock app notification
[19:10:15] [LIFECYCLE] App resigning active - cleared crash flag
[19:10:16] [SECURITY] sceneDidEnterBackground - isAuthenticated=false
[19:10:16] [SECURITY] ⚠️ NOT saving timestamp - isAuthenticated is false
[19:10:16] [LIFECYCLE] App entering background - cleared crash flag
[19:10:16] [CLIENT_SIG] Disconnecting
[19:10:16] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[19:10:16] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[19:10:16] [WS] Canceling WebSocket for query connection to iosILUIWU
[19:10:16] In cleanupPeer
[19:10:16] In cleanupPeer
[19:10:16] [LIFECYCLE] WebRTC audio disabled
[19:10:16] [LIFECYCLE] AVAudioSession deactivated
[19:10:16] [LIFECYCLE] All connections stopped
[19:10:16] [CLIENT_SIG] WebSocket closed with code 1001
[19:10:16] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[19:10:16] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[19:10:16] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[19:10:16] [SERVER] Stopped reconnect polling
[19:10:16] Will request stop of video 0
[19:10:16] [WS] WebSocket task completed with error - isQueryOnly=true: cancelled
[19:10:16] [WS] Query connection error - cleaning up all agent connections and views
[19:10:16] Will request stop of video 0
[19:10:16] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[19:10:16] [WS] Query connection failed - cleaning up all agent connections and views
[19:10:16] [APP_DISCONNECT] Scene disconnecting - logging pending uploads...
[19:10:16] [APP_TERMINATE] ⚠️ 2 pending uploads in DB queue:
[19:10:16] [APP_TERMINATE]   - id=335, file=t_21b86ebc5e802df4.jpg, status=uploading, retries=0, size=0.0MB
[19:10:16] [APP_TERMINATE]   - id=474, file=1f0e8529cd56643f.mov, status=uploading, retries=0, size=0.0MB
[19:10:16] [LIFECYCLE] ViewController deallocated
[19:16:44] [CRASH] No crash detected
[19:16:44] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[19:16:44] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[19:16:44] [GIPHY] SDK not available - using REST API fallback
[19:16:44] [BACKGROUND] Background fetch enabled
[19:16:44] [CLEANUP] No old timer messages to delete
[19:16:44] [AUTH] Starting PIN authentication
[19:16:44] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:16:44] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:16:44] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[19:16:44] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":0,"removed_from_other_channels":0}
[19:16:44] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:16:44] [USER] ✅ User registered successfully
[19:16:44] [PUSH] User registration after token update: success
[19:16:44] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[19:16:44] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:16:44] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18429)...
[19:16:44] [CLIENT_SIG] WebSocket opened
[19:16:44] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:16:44] [CLIENT_SIG] Connected! clientId=6xCv5C2y1RPhgpPh
[19:16:44] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:16:44] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:16:45] [PRELOAD] No messages or parse error
[19:16:46] [PIN_AUTH] Correct PIN
[19:16:46] [SECURITY] Restored real session: ILUIWU
[19:16:46] [SECURITY] Restored real session: ILUIWU
[19:16:46] [SECURITY] Saved real session: ILUIWU
[19:16:46] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[19:16:46] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:16:46] Documents Directory: /var/mobile/Containers/Data/Application/BCEE3A1D-777A-4FA7-8430-4ADDB19C5FAA/Documents
[19:16:46] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[19:16:46] [THEME] Applying current theme
[19:16:46] [CHAT] Applied day theme (mode: day)
[19:16:46] [SECURITY] Saved real session: ILUIWU
[19:16:46] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:16:46] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:16:46] [NETWORK] Network monitor started
[19:16:46] [NETWORK] Status changed: connected
[19:16:46] Did transition
[19:16:46] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[19:16:46] [VIEWER] Screen lock enabled - normal idle behavior
[19:16:46] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[19:16:46] [VCC] ========== VideoConnectionClass INIT ==========
[19:16:46] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[19:16:46] [DATA AUDIO] ========== setupWebRTC() START ==========
[19:16:46] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[19:16:46] [DATA AUDIO] Creating encoder/decoder factories...
[19:16:46] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[19:16:46] [CODEC] Viewer selected encoder: AV1 (best quality)
[19:16:46] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[19:16:46] [DATA AUDIO] ✅ Factory created
[19:16:46] [DATA AUDIO] RTCAudioSession locked
[19:16:46] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[19:16:46] [DATA AUDIO] RTCAudioSession unlocked
[19:16:46] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[19:16:46] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[19:16:46] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[19:16:46] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:16:46] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[19:16:46] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[19:16:46] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[19:16:46] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[19:16:46] Did transition
[19:16:46] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[19:16:46] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:16:46] [CHUNK] Merged 868 reactions synchronously
[19:16:46] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:16:46] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[19:16:46] [MIGRATION] No messages need sender_name backfill
[19:16:46] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[19:16:46] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[19:16:46] [GALLERY_DB] Raw datesent for msg 18407: '2026-01-21 15:35:55'
[19:16:46] [GALLERY_DB] Raw datesent for msg 18380: '2026-01-21 10:30:35'
[19:16:46] [GALLERY_DB] ✅ Loaded 475 media messages
[19:16:46] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18429
[19:16:46] [GALLERY] Filtered 475 -> 436 (only with local thumbnails)
[19:16:46] [GALLERY] First 5 after sort (newest first):
[19:16:46] [GALLERY]   0: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[19:16:46] [GALLERY]   1: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[19:16:46] [GALLERY]   2: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[19:16:46] [GALLERY]   3: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[19:16:46] [GALLERY]   4: id=18340, date=2026-01-21 08:29:40, file=a4f205035ad487c7.jpg
[19:16:46] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[19:16:46] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18380, 18381, 18382, 18383, 18384]
[19:16:46] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[19:16:46] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:16:46] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:16:46] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[19:16:46] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:16:46] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:16:46] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:16:46] [SERVER] Starting reconnect polling (5s interval)
[19:16:46] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[19:16:46] [ICONS] Offset applied: -14.6
[19:16:46] [ICONS] New left margin: 11.2, New right margin: 11.3
[19:16:46] [ICONS] Chat center: (31.2, 87.0)
[19:16:46] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[19:16:46] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[19:16:46] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[19:16:46] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[19:16:46] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[19:16:46] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[19:16:46] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[19:16:46] [ICONS] Screen width: 440.0
[19:16:46] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[19:16:46] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:16:46] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:16:46] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[19:16:46] [USER] ✅ User registered successfully
[19:16:46] [USER] User registration successful
[19:16:46] [INCREMENTAL_SYNC] ✅ No new messages
[19:16:46] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[19:16:46] [UNSENT_RETRY] Checking for unsent messages...
[19:16:46] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[19:16:46] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[19:16:46] [UPLOAD_RECOVERY] Session: ILUIWU
[19:16:46] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[19:16:46] [UPLOAD_RECOVERY] Checking recent media messages on server...
[19:16:46] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[19:16:46] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[19:16:46] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[19:16:46] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[19:16:46] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[19:16:46] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[19:16:46] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[19:16:46] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[19:16:46] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[19:16:46] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[19:16:46] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[19:16:46] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[19:16:46] [PENDING_UPLOAD] Total pending upload messages: 0
[19:16:46] [UNSENT_RETRY] No unsent messages found
[19:16:46] new_session POST ok: token len=157
[19:16:46] HELLO → sent (fetched token, role=query)
[19:16:46] [SIG] hello_ok received for query connection - ready to query agents
[19:16:46] [SIG] get_agents request sent for sessionId=ILUIWU
[19:16:46] [SIG] get_agents request sent for sessionId=iosILUIWU
[19:16:46] [SERVER] Stopped reconnect polling
[19:16:46] [SIG] agents_list received: []
[19:16:46] [SIG] agents_list received: []
[19:16:46] [UPLOAD_RECOVERY] ✅ All media files verified on server
[19:16:47] [COMBINED_FETCH] Loaded 7195 read receipts, 873 messages with reactions
[19:16:47] [READBY_ENRICH] Enriched 50 messages with readBy data
[19:16:47] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18380, 18381, 18382, 18383, 18384]
[19:16:47] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:16:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:16:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:17:11] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[19:17:11] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[19:17:11] [GALLERY_DB] Raw datesent for msg 18407: '2026-01-21 15:35:55'
[19:17:11] [GALLERY_DB] Raw datesent for msg 18380: '2026-01-21 10:30:35'
[19:17:11] [GALLERY_DB] ✅ Loaded 475 media messages
[19:17:11] [GALLERY] Filtered 475 -> 436 (only with local thumbnails)
[19:17:11] [GALLERY] First 5 after sort (newest first):
[19:17:11] [GALLERY]   0: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[19:17:11] [GALLERY]   1: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[19:17:11] [GALLERY]   2: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[19:17:11] [GALLERY]   3: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[19:17:11] [GALLERY]   4: id=18340, date=2026-01-21 08:29:40, file=a4f205035ad487c7.jpg
[19:17:11] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=50, isReloading=false
[19:17:11] [MEDIA_SEND] 📤 Creating media message: id=-1, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, isGiphy=true, upload_status=0 (complete-giphy)
[19:17:11] [MEDIA_SEND] 💾 Inserted to DB with upload_status=0
[19:17:11] [SEND_MESSAGE] ✅ Added optimistic message id=-1 to arrays, newMsgCount=51
[19:17:11] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[-1, 18429, 18428, 18427, 18426]
[19:17:11] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:17:11] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:17:11] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:17:11] [GIF] configure msgId=-1 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[19:17:11] [GIF] msgId=-1 START fresh animation
[19:17:11] [CELL_UPLOAD] configure: msgId=-1, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:17:11] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:17:11] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:17:11] [GIF] configure msgId=-1 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[19:17:11] [GIF] msgId=-1 CONTINUE animation (elapsed=0.014163970947265625s)
[19:17:11] [CELL_UPLOAD] configure: msgId=-1, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:17:11] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:17:11] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:17:11] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:17:11] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:17:11] [SCROLL_BTN] Showing button - 380pt from bottom > half 379pt
[19:17:11] [CLIENT_SIG] Event received: type=0 messageId=18430
[19:17:11] [WS_EVENT] Received event: type=0, messageId=18430
[19:17:11] [WS_EVENT] 📨 New message notification (msgId=18430) - triggering incremental refresh, currentMsgCount=51
[19:17:11] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[19:17:11] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18430,"session_id":"ILUIWU","message_type":1,"file_name":"giphy:https:\/\/media3.giphy.com\/media\/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n\/5WSdgFuyGNK7Zt8ajG\/giphy.gif","datesent_utc":"2026-01-21 18:17:11"}
[19:17:11] [CHAT] receive_message.php JSON: ["message_type": 1, "session_id": ILUIWU, "message_id": 18430, "file_name": giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, "datesent_utc": 2026-01-21 18:17:11, "ok": 1]
[19:17:11] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18429
[19:17:11] [DB_UPGRADE] Upgrading message ID: -1 → 18430, preserveOriginalDate=false
[19:17:11] [DB_UPGRADE] ✅ Upgraded -1 → 18430 with send_status=0, 1 row(s) affected
[19:17:11] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -1 → 18430
[19:17:11] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -1 → 18430
[19:17:11] ReloadData 9
[19:17:11] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:17:11] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:17:11] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:17:11] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[19:17:11] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[19:17:11] [GIF] msgId=18430 START fresh animation
[19:17:11] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:17:11] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:17:11] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:17:11] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[19:17:11] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=51
[19:17:12] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[18380, 18381, 18382, 18383, 18384]
[19:17:12] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:17:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:17:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:17:12] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[19:17:12] [GIF] msgId=18430 CONTINUE animation (elapsed=0.19328594207763672s)
[19:17:12] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:17:12] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:17:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:17:12] [MENU] dismissAnyExistingMenu called
[19:17:12] [MENU] dismissAnyExistingMenu completed
[19:17:14] [MENU] dismissAnyExistingMenu called
[19:17:14] [MENU] dismissAnyExistingMenu completed
[19:17:15] [MENU] dismissAnyExistingMenu called
[19:17:15] [MENU] dismissAnyExistingMenu completed
[19:17:15] [LOCK] Lock button tapped - locking app immediately
[19:17:15] [LOCK] Received lock app notification
[19:17:15] [LIFECYCLE] App resigning active - cleared crash flag
[19:17:16] [SECURITY] sceneDidEnterBackground - isAuthenticated=false
[19:17:16] [SECURITY] ⚠️ NOT saving timestamp - isAuthenticated is false
[19:17:16] [LIFECYCLE] App entering background - cleared crash flag
[19:17:16] [CLIENT_SIG] Disconnecting
[19:17:16] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[19:17:16] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[19:17:16] [WS] Canceling WebSocket for query connection to iosILUIWU
[19:17:16] In cleanupPeer
[19:17:16] In cleanupPeer
[19:17:16] [LIFECYCLE] WebRTC audio disabled
[19:17:16] [LIFECYCLE] AVAudioSession deactivated
[19:17:16] [LIFECYCLE] All connections stopped
[19:17:16] [SERVER] Stopped reconnect polling
[19:17:16] [CLIENT_SIG] WebSocket closed with code 1001
[19:17:16] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[19:17:16] Will request stop of video 0
[19:17:16] Will request stop of video 0
[19:17:16] [WS] WebSocket ACTUALLY CLOSED - isQueryOnly=true, connectionStr=iosILUIWU, closeCode=1001
[19:17:16] [WS] Query connection to iosILUIWU closed - cleaning up all agent connections and views
[19:17:16] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[19:17:16] [WS] Query connection failed - cleaning up all agent connections and views
[19:17:16] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[19:17:16] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[19:17:16] [APP_DISCONNECT] Scene disconnecting - logging pending uploads...
[19:17:16] [APP_TERMINATE] ⚠️ 2 pending uploads in DB queue:
[19:17:16] [APP_TERMINATE]   - id=335, file=t_21b86ebc5e802df4.jpg, status=uploading, retries=0, size=0.0MB
[19:17:16] [APP_TERMINATE]   - id=474, file=1f0e8529cd56643f.mov, status=uploading, retries=0, size=0.0MB
[19:17:16] [LIFECYCLE] ViewController deallocated
[19:18:53] [CRASH] No crash detected
[19:18:53] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[19:18:53] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[19:18:53] [GIPHY] SDK not available - using REST API fallback
[19:18:53] [BACKGROUND] Background fetch enabled
[19:18:53] [CLEANUP] No old timer messages to delete
[19:18:53] [AUTH] Starting PIN authentication
[19:18:53] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:18:53] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:18:53] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[19:18:53] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[19:18:53] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:18:53] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18430)...
[19:18:53] [CLIENT_SIG] WebSocket opened
[19:18:53] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:18:53] [CLIENT_SIG] Connected! clientId=7nU6SJLwa0R4cq5l
[19:18:53] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:18:53] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:18:53] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":0,"removed_from_other_channels":0}
[19:18:53] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:18:53] [USER] ✅ User registered successfully
[19:18:53] [PUSH] User registration after token update: success
[19:18:53] [PRELOAD] No messages or parse error
[19:18:55] [PIN_AUTH] Correct PIN
[19:18:55] [SECURITY] Restored real session: ILUIWU
[19:18:55] [SECURITY] Restored real session: ILUIWU
[19:18:55] [SECURITY] Saved real session: ILUIWU
[19:18:55] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[19:18:55] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:18:55] Documents Directory: /var/mobile/Containers/Data/Application/BCEE3A1D-777A-4FA7-8430-4ADDB19C5FAA/Documents
[19:18:55] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[19:18:55] [THEME] Applying current theme
[19:18:55] [CHAT] Applied day theme (mode: day)
[19:18:55] [SECURITY] Saved real session: ILUIWU
[19:18:55] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:18:55] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:18:55] [NETWORK] Network monitor started
[19:18:55] [NETWORK] Status changed: connected
[19:18:55] Did transition
[19:18:55] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[19:18:55] [VIEWER] Screen lock enabled - normal idle behavior
[19:18:55] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[19:18:55] [VCC] ========== VideoConnectionClass INIT ==========
[19:18:55] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[19:18:55] [DATA AUDIO] ========== setupWebRTC() START ==========
[19:18:55] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[19:18:55] [DATA AUDIO] Creating encoder/decoder factories...
[19:18:55] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[19:18:55] [CODEC] Viewer selected encoder: AV1 (best quality)
[19:18:55] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[19:18:55] [DATA AUDIO] ✅ Factory created
[19:18:55] [DATA AUDIO] RTCAudioSession locked
[19:18:55] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[19:18:55] [DATA AUDIO] RTCAudioSession unlocked
[19:18:55] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[19:18:55] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[19:18:55] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[19:18:55] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:18:55] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[19:18:55] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[19:18:55] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[19:18:55] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[19:18:55] Did transition
[19:18:55] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[19:18:55] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:18:55] [CHUNK] Merged 868 reactions synchronously
[19:18:55] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:18:55] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[19:18:55] [MIGRATION] No messages need sender_name backfill
[19:18:55] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[19:18:55] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[19:18:55] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[19:18:55] [GALLERY_DB] Raw datesent for msg 18407: '2026-01-21 15:35:55'
[19:18:55] [USER] ✅ User registered successfully
[19:18:55] [USER] User registration successful
[19:18:55] [GALLERY_DB] ✅ Loaded 476 media messages
[19:18:55] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18430
[19:18:55] [INCREMENTAL_SYNC] ✅ No new messages
[19:18:55] [GALLERY] Filtered 476 -> 436 (only with local thumbnails)
[19:18:55] [GALLERY] First 5 after sort (newest first):
[19:18:55] [GALLERY]   0: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[19:18:55] [GALLERY]   1: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[19:18:55] [GALLERY]   2: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[19:18:55] [GALLERY]   3: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[19:18:55] [GALLERY]   4: id=18340, date=2026-01-21 08:29:40, file=a4f205035ad487c7.jpg
[19:18:55] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[19:18:55] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:18:55] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[19:18:55] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:18:55] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:18:55] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:18:55] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[19:18:55] [GIF] msgId=18430 START fresh animation
[19:18:55] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:18:55] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:18:55] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:18:55] [SERVER] Starting reconnect polling (5s interval)
[19:18:55] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[19:18:55] [ICONS] Offset applied: -14.6
[19:18:55] [ICONS] New left margin: 11.2, New right margin: 11.3
[19:18:55] [ICONS] Chat center: (31.2, 87.0)
[19:18:55] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[19:18:55] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[19:18:55] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[19:18:55] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[19:18:55] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[19:18:55] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[19:18:55] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[19:18:55] [ICONS] Screen width: 440.0
[19:18:55] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[19:18:55] [UNSENT_RETRY] Checking for unsent messages...
[19:18:55] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[19:18:55] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[19:18:55] [UPLOAD_RECOVERY] Session: ILUIWU
[19:18:55] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[19:18:55] [UPLOAD_RECOVERY] Checking recent media messages on server...
[19:18:55] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[19:18:55] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[19:18:55] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[19:18:55] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[19:18:55] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[19:18:55] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[19:18:55] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[19:18:55] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[19:18:55] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[19:18:55] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[19:18:55] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[19:18:55] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[19:18:55] [PENDING_UPLOAD] Total pending upload messages: 0
[19:18:55] [UNSENT_RETRY] No unsent messages found
[19:18:55] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[19:18:55] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:18:55] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:18:55] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[19:18:55] [UPLOAD_RECOVERY] ✅ All media files verified on server
[19:18:55] new_session POST ok: token len=157
[19:18:55] HELLO → sent (fetched token, role=query)
[19:18:55] [SIG] hello_ok received for query connection - ready to query agents
[19:18:55] [SIG] get_agents request sent for sessionId=ILUIWU
[19:18:55] [SIG] get_agents request sent for sessionId=iosILUIWU
[19:18:55] [SERVER] Stopped reconnect polling
[19:18:55] [SIG] agents_list received: []
[19:18:55] [SIG] agents_list received: []
[19:18:55] [COMBINED_FETCH] Loaded 7196 read receipts, 873 messages with reactions
[19:18:55] [READBY_ENRICH] Enriched 50 messages with readBy data
[19:18:56] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:18:56] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:18:56] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:18:56] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:18:56] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[19:18:56] [GIF] msgId=18430 CONTINUE animation (elapsed=0.6007089614868164s)
[19:18:56] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:18:56] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:18:56] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:18:57] [MENU] dismissAnyExistingMenu called
[19:18:57] [MENU] dismissAnyExistingMenu completed
[19:18:57] [MENU] Created button 'Reply' at index 0
[19:18:57] [MENU] Created button 'Edit' at index 1
[19:18:57] [MENU] Created button 'Copy' at index 2
[19:18:57] [MENU] Created button 'Delete' at index 3
[19:18:57] [MENU] Menu added at y=487.0
[19:18:58] [MENU] menuButtonTouchDown - button title: Edit, tag: 1
[19:18:59] [MENU] menuButtonTapped - button title: Edit, tag: 1
[19:18:59] [MENU] Button frame: (0.0, 44.0, 120.0, 44.0), superview: true
[19:18:59] [MENU] Found action closure, dismissing menu first
[19:18:59] [MENU] dismissAnyExistingMenu called
[19:18:59] [MENU] Found menu with tag 9999, removing
[19:18:59] [MENU] Removing blur effect
[19:18:59] [MENU] Removing floating message snapshot
[19:18:59] [MENU] Recorded dismissal time for debounce
[19:18:59] [MENU] dismissAnyExistingMenu completed
[19:18:59] [MENU] Menu dismissed, executing action
[19:18:59] [MENU] Action executed
[19:18:59] [SCROLL_BTN] Showing button - 384pt from bottom > half 186pt
[19:19:19] ReloadData 11 - applying tab 0 filtering after message edit
[19:19:19] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:19:19] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:19:19] [GIF] SKIP - same msg, completed
[19:19:20] [MENU] dismissAnyExistingMenu called
[19:19:20] [MENU] dismissAnyExistingMenu completed
[19:19:20] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:19:20] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:19:20] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:19:21] [CLIENT_SIG] Event received: type=2 messageId=18429
[19:19:21] [CHAT] edit_message.php HTTP 200
── Body ──
{"ok":true,"message":"Message updated","session_id":"ILUIWU","message_id":18429,"event_type":2}
[19:19:21] [WS_EVENT] Received event: type=2, messageId=18429
[19:19:21] [WS_EVENT] Message edited/updated: 18429
[19:19:21] [COMBINED_FETCH] Loaded 7196 read receipts, 873 messages with reactions
[19:19:21] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:19:22] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:19:22] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:19:22] [GIF] SKIP - same msg, completed
[19:19:24] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:19:24] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:19:24] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:19:24] [LOCK] Lock button tapped - locking app immediately
[19:19:24] [LOCK] Received lock app notification
[19:19:24] [LIFECYCLE] App resigning active - cleared crash flag
[19:19:25] [SECURITY] sceneDidEnterBackground - isAuthenticated=false
[19:19:25] [SECURITY] ⚠️ NOT saving timestamp - isAuthenticated is false
[19:19:25] [LIFECYCLE] App entering background - cleared crash flag
[19:19:25] [CLIENT_SIG] Disconnecting
[19:19:25] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[19:19:25] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[19:19:25] [WS] Canceling WebSocket for query connection to iosILUIWU
[19:19:25] In cleanupPeer
[19:19:25] In cleanupPeer
[19:19:25] [LIFECYCLE] WebRTC audio disabled
[19:19:25] [LIFECYCLE] AVAudioSession deactivated
[19:19:25] [LIFECYCLE] All connections stopped
[19:19:25] [SERVER] Stopped reconnect polling
[19:19:25] Will request stop of video 0
[19:19:25] Will request stop of video 0
[19:19:25] [CLIENT_SIG] WebSocket closed with code 1001
[19:19:25] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[19:19:25] [WS] WebSocket ACTUALLY CLOSED - isQueryOnly=true, connectionStr=iosILUIWU, closeCode=1001
[19:19:25] [WS] Query connection to iosILUIWU closed - cleaning up all agent connections and views
[19:19:25] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[19:19:25] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[19:19:25] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[19:19:25] [WS] Query connection failed - cleaning up all agent connections and views
[19:19:25] [APP_DISCONNECT] Scene disconnecting - logging pending uploads...
[19:19:25] [APP_TERMINATE] ⚠️ 2 pending uploads in DB queue:
[19:19:25] [APP_TERMINATE]   - id=335, file=t_21b86ebc5e802df4.jpg, status=uploading, retries=0, size=0.0MB
[19:19:25] [APP_TERMINATE]   - id=474, file=1f0e8529cd56643f.mov, status=uploading, retries=0, size=0.0MB
[19:19:25] [LIFECYCLE] ViewController deallocated[19:37:29] [LOG] Pruned 3301 entries older than 3 hours
[19:37:29] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[19:37:29] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[19:37:29] [GIPHY] SDK not available - using REST API fallback
[19:37:29] [BACKGROUND] Background fetch enabled
[19:37:29] [AUTH] Starting PIN authentication
[19:37:29] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:37:29] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:37:29] [CLEANUP] No old timer messages to delete
[19:37:29] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[19:37:29] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[19:37:29] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:37:29] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":0,"removed_from_other_channels":0}
[19:37:29] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:37:29] [USER] ✅ User registered successfully
[19:37:29] [PUSH] User registration after token update: success
[19:37:29] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18430)...
[19:37:29] [CLIENT_SIG] WebSocket opened
[19:37:29] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:37:29] [CLIENT_SIG] Connected! clientId=VI3Bg2_V98afRl-Y
[19:37:29] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:37:29] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:37:29] [PRELOAD] No messages or parse error[19:37:30] [LOG] Pruned 32 entries older than 3 hours
[19:37:30] [SECURITY] Restored real session: ILUIWU
[19:37:30] [SECURITY] Restored real session: ILUIWU
[19:37:30] [SECURITY] Saved real session: ILUIWU
[19:37:30] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[19:37:30] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:37:30] Documents Directory: /var/mobile/Containers/Data/Application/BCEE3A1D-777A-4FA7-8430-4ADDB19C5FAA/Documents
[19:37:30] [THEME] Applying current theme
[19:37:30] [CHAT] Applied day theme (mode: day)
[19:37:30] [SECURITY] Saved real session: ILUIWU
[19:37:30] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:37:30] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:37:30] [NETWORK] Network monitor started
[19:37:30] [NETWORK] Status changed: connected
[19:37:30] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[19:37:30] Did transition
[19:37:31] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[19:37:31] [VIEWER] Screen lock enabled - normal idle behavior
[19:37:31] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[19:37:31] [VCC] ========== VideoConnectionClass INIT ==========
[19:37:31] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[19:37:31] [DATA AUDIO] ========== setupWebRTC() START ==========
[19:37:31] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[19:37:31] [DATA AUDIO] Creating encoder/decoder factories...
[19:37:31] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[19:37:31] [CODEC] Viewer selected encoder: AV1 (best quality)
[19:37:31] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[19:37:31] [DATA AUDIO] ✅ Factory created
[19:37:31] [DATA AUDIO] RTCAudioSession locked
[19:37:31] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[19:37:31] [DATA AUDIO] RTCAudioSession unlocked
[19:37:31] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[19:37:31] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[19:37:31] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[19:37:31] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:37:31] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[19:37:31] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[19:37:31] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[19:37:31] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[19:37:31] Did transition
[19:37:31] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[19:37:31] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:37:31] [CHUNK] Merged 868 reactions synchronously
[19:37:31] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:37:31] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[19:37:31] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[19:37:31] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[19:37:31] [GALLERY_DB] Raw datesent for msg 18407: '2026-01-21 15:35:55'
[19:37:31] [USER] ✅ User registered successfully
[19:37:31] [USER] User registration successful
[19:37:31] [GALLERY_DB] ✅ Loaded 476 media messages
[19:37:31] [MIGRATION] No messages need sender_name backfill
[19:37:31] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[19:37:31] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18430
[19:37:31] [INCREMENTAL_SYNC] ✅ No new messages
[19:37:31] [GALLERY] Filtered 476 -> 436 (only with local thumbnails)
[19:37:31] [GALLERY] First 5 after sort (newest first):
[19:37:31] [GALLERY]   0: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[19:37:31] [GALLERY]   1: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[19:37:31] [GALLERY]   2: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[19:37:31] [GALLERY]   3: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[19:37:31] [GALLERY]   4: id=18340, date=2026-01-21 08:29:40, file=a4f205035ad487c7.jpg
[19:37:31] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[19:37:31] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:37:31] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[19:37:31] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:37:31] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:37:31] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:37:31] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[19:37:31] [GIF] msgId=18430 START fresh animation
[19:37:31] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:37:31] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:37:31] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:37:31] [SERVER] Starting reconnect polling (5s interval)
[19:37:31] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[19:37:31] [ICONS] Offset applied: -14.6
[19:37:31] [ICONS] New left margin: 11.2, New right margin: 11.3
[19:37:31] [ICONS] Chat center: (31.2, 87.0)
[19:37:31] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[19:37:31] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[19:37:31] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[19:37:31] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[19:37:31] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[19:37:31] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[19:37:31] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[19:37:31] [ICONS] Screen width: 440.0
[19:37:31] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[19:37:31] [UNSENT_RETRY] Checking for unsent messages...
[19:37:31] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[19:37:31] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[19:37:31] [UPLOAD_RECOVERY] Session: ILUIWU
[19:37:31] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[19:37:31] [UPLOAD_RECOVERY] Checking recent media messages on server...
[19:37:31] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[19:37:31] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[19:37:31] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[19:37:31] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[19:37:31] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[19:37:31] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[19:37:31] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[19:37:31] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[19:37:31] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[19:37:31] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[19:37:31] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[19:37:31] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[19:37:31] [PENDING_UPLOAD] Total pending upload messages: 0
[19:37:31] [UNSENT_RETRY] No unsent messages found
[19:37:31] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[19:37:31] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:37:31] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:37:31] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[19:37:31] [UPLOAD_RECOVERY] ✅ All media files verified on server
[19:37:31] new_session POST ok: token len=157
[19:37:31] HELLO → sent (fetched token, role=query)
[19:37:31] [SIG] hello_ok received for query connection - ready to query agents
[19:37:31] [SIG] get_agents request sent for sessionId=ILUIWU
[19:37:31] [SIG] get_agents request sent for sessionId=iosILUIWU
[19:37:31] [SERVER] Stopped reconnect polling
[19:37:31] [SIG] agents_list received: []
[19:37:31] [SIG] agents_list received: []
[19:37:31] [COMBINED_FETCH] Loaded 7196 read receipts, 873 messages with reactions
[19:37:31] [READBY_ENRICH] Enriched 50 messages with readBy data
[19:37:31] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:37:31] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:37:31] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:37:31] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:37:31] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[19:37:31] [GIF] msgId=18430 CONTINUE animation (elapsed=0.6830060482025146s)
[19:37:31] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:37:31] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:37:31] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:37:41] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:37:41] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=50, isReloading=false
[19:37:41] [SEND_MESSAGE] ✅ Added optimistic message id=-1 to arrays, newMsgCount=51
[19:37:41] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[-1, 18430, 18429, 18428, 18427]
[19:37:41] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:37:41] [GIF] SKIP - same msg, completed
[19:37:41] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:37:41] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:37:42] [CLIENT_SIG] Event received: type=0 messageId=18431
[19:37:42] [WS_EVENT] Received event: type=0, messageId=18431
[19:37:42] [WS_EVENT] 📨 New message notification (msgId=18431) - triggering incremental refresh, currentMsgCount=51
[19:37:42] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18431,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:37:41"}
[19:37:42] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[19:37:42] [CHAT] receive_message.php JSON: ["session_id": ILUIWU, "ok": 1, "message_id": 18431, "file_name": , "message_type": 0, "datesent_utc": 2026-01-21 18:37:41]
[19:37:42] [DB_UPGRADE] Upgrading message ID: -1 → 18431, preserveOriginalDate=false
[19:37:42] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18430
[19:37:42] [DB_UPGRADE] ✅ Upgraded -1 → 18431 with send_status=0, 1 row(s) affected
[19:37:42] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -1 → 18431
[19:37:42] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -1 → 18431
[19:37:42] ReloadData 9
[19:37:42] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[19:37:42] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:37:42] [GIF] SKIP - same msg, completed
[19:37:42] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[19:37:42] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=51
[19:37:42] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:37:42] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:37:42] [GIF] SKIP - same msg, completed
[19:37:52] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:37:52] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=51, isReloading=false
[19:37:52] [SEND_MESSAGE] ✅ Added optimistic message id=-2 to arrays, newMsgCount=52
[19:37:52] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[-2, 18431, 18430, 18429, 18428]
[19:37:52] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:37:52] [GIF] SKIP - same msg, completed
[19:37:52] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:37:52] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:37:53] [CLIENT_SIG] Event received: type=0 messageId=18432
[19:37:53] [WS_EVENT] Received event: type=0, messageId=18432
[19:37:53] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18432,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:37:52"}
[19:37:53] [WS_EVENT] 📨 New message notification (msgId=18432) - triggering incremental refresh, currentMsgCount=52
[19:37:53] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=52
[19:37:53] [CHAT] receive_message.php JSON: ["ok": 1, "message_type": 0, "file_name": , "datesent_utc": 2026-01-21 18:37:52, "session_id": ILUIWU, "message_id": 18432]
[19:37:53] [DB_UPGRADE] Upgrading message ID: -2 → 18432, preserveOriginalDate=false
[19:37:53] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18431
[19:37:53] [DB_UPGRADE] ✅ Upgraded -2 → 18432 with send_status=0, 1 row(s) affected
[19:37:53] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -2 → 18432
[19:37:53] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -2 → 18432
[19:37:53] ReloadData 9
[19:37:53] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[19:37:53] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:37:53] [GIF] SKIP - same msg, completed
[19:37:53] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[19:37:53] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=52
[19:37:53] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:37:53] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:37:53] [GIF] SKIP - same msg, completed
[19:37:58] [LIFECYCLE] App resigning active - cleared crash flag
[19:37:59] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[19:37:59] [SECURITY] Saved background timestamp
[19:37:59] [LIFECYCLE] App entering background - cleared crash flag
[19:37:59] [CLIENT_SIG] Disconnecting
[19:37:59] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[19:37:59] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[19:37:59] [WS] Canceling WebSocket for query connection to iosILUIWU
[19:37:59] In cleanupPeer
[19:37:59] In cleanupPeer
[19:37:59] [LIFECYCLE] WebRTC audio disabled
[19:37:59] [LIFECYCLE] AVAudioSession deactivated
[19:37:59] [LIFECYCLE] All connections stopped
[19:37:59] [CLIENT_SIG] WebSocket closed with code 1001
[19:37:59] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[19:37:59] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[19:37:59] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[19:37:59] [SERVER] Stopped reconnect polling
[19:37:59] Will request stop of video 0
[19:37:59] Will request stop of video 0
[19:37:59] [WS] WebSocket ACTUALLY CLOSED - isQueryOnly=true, connectionStr=iosILUIWU, closeCode=1001
[19:37:59] [WS] Query connection to iosILUIWU closed - cleaning up all agent connections and views
[19:37:59] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[19:37:59] [WS] Query connection failed - cleaning up all agent connections and views
[19:37:59] [PIP] Removing 0 tracks from PiP for connection 0
[19:37:59] [PIP] ✅ All tracks removed for connection 0
[19:37:59] [PIP] Removing 0 tracks from PiP for connection 0
[19:37:59] [PIP] ✅ All tracks removed for connection 0
[19:37:59] [CLEANUP] ========================================
[19:37:59] [CLEANUP] Cleaning up all agent connections and views
[19:37:59] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:37:59] [CLEANUP] Stopped and removed 0 video connections
[19:37:59] [CLEANUP] Removed 0 video views
[19:37:59] [CLEANUP] Removed 0 feed scroll views
[19:37:59] [CLEANUP] Removed 0 status labels
[19:37:59] [CLEANUP] Reset agent query state
[19:37:59] [CLEANUP] Updated page indicator
[19:37:59] [CLEANUP] Rebuilt video layout
[19:37:59] [CLEANUP] ✅ All agent connections and views cleaned up
[19:37:59] [CLEANUP] ========================================
[19:37:59] [SERVER] Skipping reconnect polling - app is in background
[19:37:59] [WS] URLSession invalidated successfully
[19:37:59] [CLEANUP] ========================================
[19:37:59] [CLEANUP] Cleaning up all agent connections and views
[19:37:59] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:37:59] [CLEANUP] Stopped and removed 0 video connections
[19:37:59] [CLEANUP] Removed 0 video views
[19:37:59] [CLEANUP] Removed 0 feed scroll views
[19:37:59] [CLEANUP] Removed 0 status labels
[19:37:59] [CLEANUP] Reset agent query state
[19:37:59] [CLEANUP] Updated page indicator
[19:37:59] [CLEANUP] Rebuilt video layout
[19:37:59] [CLEANUP] ✅ All agent connections and views cleaned up
[19:37:59] [CLEANUP] ========================================
[19:37:59] [SERVER] Skipping reconnect polling - app is in background
[19:38:14] [SECURITY] Timeout check: elapsed=15.124987125396729s, timeout=300.0s
[19:38:14] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:38:14] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:38:14] [LIFECYCLE] App entering foreground - restoring connections
[19:38:14] [UPLOAD_RETRY] No pending uploads to retry
[19:38:14] [LIFECYCLE] Merged 868 reactions from local DB
[19:38:14] [LIFECYCLE] WebRTC audio re-enabled
[19:38:14] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:38:14] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:38:14] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:38:14] [VIEWER] Reconnecting after background - querying agents
[19:38:14] [UNSENT_RETRY] Checking for unsent messages...
[19:38:14] [PENDING_UPLOAD] Total pending upload messages: 0
[19:38:14] [UNSENT_RETRY] No unsent messages found
[19:38:14] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[19:38:14] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:38:14] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:38:14] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:38:14] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:38:14] [GIF] SKIP - same msg, completed
[19:38:14] [SECURITY] sceneDidBecomeActive - isAuthenticated=true, didEnterBackground=true
[19:38:14] [SECURITY] Within timeout - cleared background flag
[19:38:14] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:38:14] [PUSH] handlePollEventsNotification userInfo: [:]
[19:38:14] [PUSH] No message_id in userInfo
[19:38:14] [PUSH] No operation_type in userInfo
[19:38:14] [FAST_REFRESH] Evolution disabled - performing incremental sync
[19:38:14] [FAST_REFRESH] Already have 52 messages - skipping local DB load
[19:38:14] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[19:38:14] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[19:38:14] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=52
[19:38:14] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18432
[19:38:14] [CLIENT_SIG] WebSocket opened
[19:38:14] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:38:14] [CLIENT_SIG] Connected! clientId=OzMnp7SBu7sw3gRl
[19:38:14] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:38:14] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:38:14] [INCREMENTAL_SYNC] ✅ No new messages
[19:38:14] [FAST_REFRESH] Incremental sync complete - 52 messages
[19:38:14] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[19:38:14] HELLO → sent (cached token, role=query)
[19:38:14] [SIG] hello_ok received for query connection - ready to query agents
[19:38:14] [SIG] get_agents request sent for sessionId=ILUIWU
[19:38:14] [SIG] get_agents request sent for sessionId=iosILUIWU
[19:38:14] [SERVER] Stopped reconnect polling
[19:38:14] [SIG] agents_list received: []
[19:38:14] [SIG] agents_list received: []
[19:38:15] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:38:15] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:38:15] [GIF] SKIP - same msg, completed
[19:38:15] [COMBINED_FETCH] Loaded 7198 read receipts, 873 messages with reactions
[19:38:15] [FOREGROUND] Enriched 0 messages with readBy data from server
[19:38:15] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:38:15] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:38:15] [GIF] SKIP - same msg, completed
[19:38:15] [COMBINED_FETCH] Loaded 7198 read receipts, 873 messages with reactions
[19:38:15] [FAST_REFRESH] Enriched 52 messages with readBy data
[19:38:15] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:38:15] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:38:15] [GIF] SKIP - same msg, completed
[19:38:24] [WS] WebSocket task completed with error - isQueryOnly=true: The request timed out.
[19:38:24] [WS] Query connection error - cleaning up all agent connections and views
[19:38:24] [CLEANUP] ========================================
[19:38:24] [CLEANUP] Cleaning up all agent connections and views
[19:38:24] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:38:24] [CLEANUP] Stopped and removed 0 video connections
[19:38:24] [CLEANUP] Removed 0 video views
[19:38:24] [CLEANUP] Removed 0 feed scroll views
[19:38:24] [CLEANUP] Removed 0 status labels
[19:38:24] [CLEANUP] Reset agent query state
[19:38:24] [CLEANUP] Updated page indicator
[19:38:24] [CLEANUP] Rebuilt video layout
[19:38:24] [CLEANUP] ✅ All agent connections and views cleaned up
[19:38:24] [CLEANUP] ========================================
[19:38:24] [SERVER] Starting reconnect polling (5s interval)
[19:38:29] [SERVER] Polling - attempting to reconnect...
[19:38:34] [SERVER] Polling - attempting to reconnect...
[19:38:39] [SERVER] Polling - attempting to reconnect...
[19:38:44] [SERVER] Polling - attempting to reconnect...
[19:38:47] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:38:47] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=52, isReloading=false
[19:38:47] [SEND_MESSAGE] ✅ Added optimistic message id=-3 to arrays, newMsgCount=53
[19:38:47] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[-3, 18432, 18431, 18430, 18429]
[19:38:47] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:38:47] [GIF] SKIP - same msg, completed
[19:38:47] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:38:47] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:38:48] [CLIENT_SIG] Event received: type=0 messageId=18433
[19:38:48] [WS_EVENT] Received event: type=0, messageId=18433
[19:38:48] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18433,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:38:47"}
[19:38:48] [WS_EVENT] 📨 New message notification (msgId=18433) - triggering incremental refresh, currentMsgCount=53
[19:38:48] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=53
[19:38:48] [CHAT] receive_message.php JSON: ["datesent_utc": 2026-01-21 18:38:47, "ok": 1, "message_type": 0, "file_name": , "session_id": ILUIWU, "message_id": 18433]
[19:38:48] [DB_UPGRADE] Upgrading message ID: -3 → 18433, preserveOriginalDate=false
[19:38:48] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18432
[19:38:48] [DB_UPGRADE] ✅ Upgraded -3 → 18433 with send_status=0, 1 row(s) affected
[19:38:48] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -3 → 18433
[19:38:48] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -3 → 18433
[19:38:48] ReloadData 9
[19:38:48] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[19:38:48] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:38:48] [GIF] SKIP - same msg, completed
[19:38:48] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[19:38:48] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=53
[19:38:48] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:38:48] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:38:48] [GIF] SKIP - same msg, completed
[19:38:49] [LOCK] Lock button tapped - locking app immediately
[19:38:49] [LOCK] Received lock app notification
[19:38:49] [LIFECYCLE] App resigning active - cleared crash flag
[19:38:49] [SERVER] Polling - attempting to reconnect...
[19:38:50] [SECURITY] sceneDidEnterBackground - isAuthenticated=false
[19:38:50] [SECURITY] ⚠️ NOT saving timestamp - isAuthenticated is false
[19:38:50] [LIFECYCLE] App entering background - cleared crash flag
[19:38:50] [CLIENT_SIG] Disconnecting
[19:38:50] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[19:38:50] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=3
[19:38:50] [WS] Canceling WebSocket for query connection to iosILUIWU
[19:38:50] In cleanupPeer
[19:38:50] In cleanupPeer
[19:38:50] [LIFECYCLE] WebRTC audio disabled
[19:38:50] [LIFECYCLE] AVAudioSession deactivated
[19:38:50] [LIFECYCLE] All connections stopped
[19:38:50] [CLIENT_SIG] WebSocket closed with code 1001
[19:38:50] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[19:38:50] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[19:38:50] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[19:38:50] [SERVER] Stopped reconnect polling
[19:38:50] Will request stop of video 0
[19:38:50] Will request stop of video 0
[19:38:50] [WS] URLSession invalidated successfully
[19:38:50] [PIP] Removing 0 tracks from PiP for connection 0
[19:38:50] [PIP] ✅ All tracks removed for connection 0
[19:38:50] [PIP] Removing 0 tracks from PiP for connection 0
[19:38:50] [PIP] ✅ All tracks removed for connection 0
[19:38:51] [WS] Connection failed: The operation couldn’t be completed. Software caused connection abort
[19:38:51] [WS] Query connection failed - cleaning up all agent connections and views
[19:38:51] [CLEANUP] ========================================
[19:38:51] [CLEANUP] Cleaning up all agent connections and views
[19:38:51] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:38:51] [CLEANUP] Stopped and removed 0 video connections
[19:38:51] [CLEANUP] Removed 0 video views
[19:38:51] [CLEANUP] Removed 0 feed scroll views
[19:38:51] [CLEANUP] Removed 0 status labels
[19:38:51] [CLEANUP] Reset agent query state
[19:38:51] [CLEANUP] Updated page indicator
[19:38:51] [CLEANUP] Rebuilt video layout
[19:38:51] [CLEANUP] ✅ All agent connections and views cleaned up
[19:38:51] [CLEANUP] ========================================
[19:38:51] [SERVER] Skipping reconnect polling - app is in background
[19:41:22] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:41:22] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:41:22] [LIFECYCLE] App entering foreground - restoring connections
[19:41:22] [LIFECYCLE] Away > 2 minutes (152s) - will scroll to bottom
[19:41:22] [UPLOAD_RETRY] No pending uploads to retry
[19:41:22] [LIFECYCLE] Merged 868 reactions from local DB
[19:41:22] [LIFECYCLE] WebRTC audio re-enabled
[19:41:22] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:41:22] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:41:22] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:41:22] [VIEWER] Reconnecting after background - querying agents
[19:41:22] [UNSENT_RETRY] Checking for unsent messages...
[19:41:22] [PENDING_UPLOAD] Total pending upload messages: 0
[19:41:22] [UNSENT_RETRY] No unsent messages found
[19:41:22] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[19:41:22] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:41:22] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:41:22] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:41:22] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:41:22] [GIF] SKIP - same msg, completed
[19:41:22] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[19:41:22] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:41:22] [PUSH] handlePollEventsNotification userInfo: [:]
[19:41:22] [PUSH] No message_id in userInfo
[19:41:22] [PUSH] No operation_type in userInfo
[19:41:22] [FAST_REFRESH] Evolution disabled - performing incremental sync
[19:41:22] [FAST_REFRESH] Already have 53 messages - skipping local DB load
[19:41:22] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[19:41:22] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[19:41:22] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=53
[19:41:22] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18433
[19:41:22] [CLIENT_SIG] WebSocket opened
[19:41:22] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:41:22] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[19:41:22] HELLO → sent (cached token, role=query)
[19:41:22] [CLIENT_SIG] Connected! clientId=_mLD25ac8zu0MaxU
[19:41:22] [SIG] hello_ok received for query connection - ready to query agents
[19:41:22] [SIG] get_agents request sent for sessionId=ILUIWU
[19:41:22] [SIG] get_agents request sent for sessionId=iosILUIWU
[19:41:22] [SERVER] Stopped reconnect polling
[19:41:22] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:41:22] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:41:22] [SIG] agents_list received: []
[19:41:22] [SIG] agents_list received: []
[19:41:22] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:41:22] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:41:22] [GIF] SKIP - same msg, completed
[19:41:22] [INCREMENTAL_SYNC] ✅ No new messages
[19:41:22] [FAST_REFRESH] Incremental sync complete - 53 messages
[19:41:23] [COMBINED_FETCH] Loaded 7199 read receipts, 873 messages with reactions
[19:41:23] [FAST_REFRESH] Enriched 53 messages with readBy data
[19:41:23] [COMBINED_FETCH] Loaded 7199 read receipts, 873 messages with reactions
[19:41:23] [FOREGROUND] Enriched 0 messages with readBy data from server
[19:41:23] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:41:23] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[18381, 18382, 18383, 18384, 18385]
[19:41:23] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:41:23] [GIF] SKIP - same msg, completed[19:41:23] [LOG] Pruned 93 entries older than 3 hours
[19:41:23] [SECURITY] Restored real session: ILUIWU
[19:41:23] [SECURITY] Restored real session: ILUIWU
[19:41:24] [LOCK] ✅ PIN auth callback - setting isAuthenticated = true
[19:41:24] [AUTH] Authentication completed - updating UI only (data already fetched in foreground handler)
[19:41:24] [AUTH] UI update complete
[19:41:24] [FAKE MODE] Exiting fake mode, restoring real session
[19:41:24] [SECURITY] Restored real session: ILUIWU
[19:41:24] [SECURITY] Saved real session: ILUIWU
[19:41:24] [FAKE MODE] ✅ Restored real session: ILUIWU
[19:41:24] [FAKE MODE] Loaded 50 messages (limited to page size)
[19:41:24] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:41:24] [GIF] SKIP - same msg, completed
[19:41:24] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":0,"removed_from_other_channels":0}
[19:41:24] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:41:24] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18384, 18385, 18386, 18387, 18388]
[19:41:24] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:41:24] [GIF] SKIP - same msg, completed
[19:41:24] [USER] ✅ User registered successfully
[19:41:24] [PUSH] User registration after token update: success
[19:41:24] [COMBINED_FETCH] Loaded 7199 read receipts, 873 messages with reactions
[19:41:24] [FAKE MODE] Enriched 50 messages with readBy data
[19:41:24] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18384, 18385, 18386, 18387, 18388]
[19:41:25] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:41:25] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:41:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:41:25] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=true
[19:41:25] [GIF] msgId=18430 globally completed - showing static frame
[19:41:25] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:41:25] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:41:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:41:26] [MENU] dismissAnyExistingMenu called
[19:41:26] [MENU] dismissAnyExistingMenu completed
[19:41:26] [MENU] Created button 'Reply' at index 0
[19:41:26] [MENU] Created button 'Edit' at index 1
[19:41:26] [MENU] Created button 'Copy' at index 2
[19:41:26] [MENU] Created button 'Delete' at index 3
[19:41:26] [MENU] Menu added at y=454.5
[19:41:27] [MENU] menuButtonTouchDown - button title: Edit, tag: 1
[19:41:27] [MENU] menuButtonTapped - button title: Edit, tag: 1
[19:41:27] [MENU] Button frame: (0.0, 44.0, 120.0, 44.0), superview: true
[19:41:27] [MENU] Found action closure, dismissing menu first
[19:41:27] [MENU] dismissAnyExistingMenu called
[19:41:27] [MENU] Found menu with tag 9999, removing
[19:41:27] [MENU] Removing blur effect
[19:41:27] [MENU] Removing floating message snapshot
[19:41:27] [MENU] Recorded dismissal time for debounce
[19:41:27] [MENU] dismissAnyExistingMenu completed
[19:41:27] [MENU] Menu dismissed, executing action
[19:41:27] [MENU] Action executed
[19:41:27] [SCROLL_BTN] Showing button - 327pt from bottom > half 214pt
[19:41:32] [WS] WebSocket task completed with error - isQueryOnly=true: The request timed out.
[19:41:32] [WS] Query connection error - cleaning up all agent connections and views
[19:41:32] [CLEANUP] ========================================
[19:41:32] [CLEANUP] Cleaning up all agent connections and views
[19:41:32] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:41:32] [CLEANUP] Stopped and removed 0 video connections
[19:41:32] [CLEANUP] Removed 0 video views
[19:41:32] [CLEANUP] Removed 0 feed scroll views
[19:41:32] [CLEANUP] Removed 0 status labels
[19:41:32] [CLEANUP] Reset agent query state
[19:41:32] [CLEANUP] Updated page indicator
[19:41:32] [CLEANUP] Rebuilt video layout
[19:41:32] [CLEANUP] ✅ All agent connections and views cleaned up
[19:41:32] [CLEANUP] ========================================
[19:41:32] [SERVER] Starting reconnect polling (5s interval)
[19:41:37] [SERVER] Polling - attempting to reconnect...
[19:41:42] [SERVER] Polling - attempting to reconnect...
[19:41:44] ReloadData 11 - applying tab 0 filtering after message edit
[19:41:44] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18384, 18385, 18386, 18387, 18388]
[19:41:44] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:41:44] [GIF] SKIP - same msg, completed
[19:41:45] [CLIENT_SIG] Event received: type=2 messageId=18432
[19:41:45] [CHAT] edit_message.php HTTP 200
── Body ──
{"ok":true,"message":"Message updated","session_id":"ILUIWU","message_id":18432,"event_type":2}
[19:41:45] [WS_EVENT] Received event: type=2, messageId=18432
[19:41:45] [WS_EVENT] Message edited/updated: 18432
[19:41:45] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18384, 18385, 18386, 18387, 18388]
[19:41:45] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:41:45] [GIF] SKIP - same msg, completed
[19:41:46] [COMBINED_FETCH] Loaded 7199 read receipts, 873 messages with reactions
[19:41:46] [LOCK] Lock button tapped - locking app immediately
[19:41:46] [LOCK] Received lock app notification
[19:41:46] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18384, 18385, 18386, 18387, 18388]
[19:41:46] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:41:46] [GIF] SKIP - same msg, completed
[19:41:46] [LIFECYCLE] App resigning active - cleared crash flag
[19:41:47] [SERVER] Polling - attempting to reconnect...
[19:41:47] [SECURITY] sceneDidEnterBackground - isAuthenticated=false
[19:41:47] [SECURITY] ⚠️ NOT saving timestamp - isAuthenticated is false
[19:41:47] [LIFECYCLE] App entering background - cleared crash flag
[19:41:47] [CLIENT_SIG] Disconnecting
[19:41:47] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[19:41:47] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=3
[19:41:47] [WS] Canceling WebSocket for query connection to iosILUIWU
[19:41:47] In cleanupPeer
[19:41:47] In cleanupPeer
[19:41:47] [LIFECYCLE] WebRTC audio disabled
[19:41:47] [LIFECYCLE] AVAudioSession deactivated
[19:41:47] [LIFECYCLE] All connections stopped
[19:41:47] [CLIENT_SIG] WebSocket closed with code 1001
[19:41:47] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[19:41:47] [SERVER] Stopped reconnect polling
[19:41:47] [WS] URLSession invalidated successfully
[19:41:47] Will request stop of video 0
[19:41:47] Will request stop of video 0
[19:41:47] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[19:41:47] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[19:41:47] [PIP] Removing 0 tracks from PiP for connection 0
[19:41:47] [PIP] ✅ All tracks removed for connection 0
[19:41:47] [PIP] Removing 0 tracks from PiP for connection 0
[19:41:47] [PIP] ✅ All tracks removed for connection 0
[19:49:01] [CRASH] No crash detected
[19:49:01] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[19:49:01] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[19:49:01] [GIPHY] SDK not available - using REST API fallback
[19:49:01] [BACKGROUND] Background fetch enabled
[19:49:01] [AUTH] Starting PIN authentication
[19:49:01] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:49:01] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:49:01] [CLEANUP] No old timer messages to delete
[19:49:01] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[19:49:01] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:49:01] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[19:49:01] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18433)...
[19:49:01] [CLIENT_SIG] WebSocket opened
[19:49:01] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:49:01] [CLIENT_SIG] Connected! clientId=bp7vD3reGk4yNAl_
[19:49:01] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:49:01] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:49:01] [PRELOAD] No messages or parse error
[19:49:01] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":0,"removed_from_other_channels":0}
[19:49:01] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:49:01] [USER] ✅ User registered successfully
[19:49:01] [PUSH] User registration after token update: success
[19:49:04] [PIN_AUTH] Correct PIN
[19:49:04] [SECURITY] Restored real session: ILUIWU
[19:49:04] [SECURITY] Restored real session: ILUIWU
[19:49:04] [SECURITY] Saved real session: ILUIWU
[19:49:04] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[19:49:04] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:49:04] Documents Directory: /var/mobile/Containers/Data/Application/BBFC9F60-CAC6-4879-97D2-CF4DDD0C5899/Documents
[19:49:04] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[19:49:04] [THEME] Applying current theme
[19:49:04] [CHAT] Applied day theme (mode: day)
[19:49:04] [SECURITY] Saved real session: ILUIWU
[19:49:04] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:49:04] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:49:04] [NETWORK] Network monitor started
[19:49:04] [NETWORK] Status changed: connected
[19:49:04] Did transition
[19:49:04] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[19:49:04] [VIEWER] Screen lock enabled - normal idle behavior
[19:49:04] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[19:49:04] [VCC] ========== VideoConnectionClass INIT ==========
[19:49:04] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[19:49:04] [DATA AUDIO] ========== setupWebRTC() START ==========
[19:49:04] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[19:49:04] [DATA AUDIO] Creating encoder/decoder factories...
[19:49:04] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[19:49:04] [CODEC] Viewer selected encoder: AV1 (best quality)
[19:49:04] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[19:49:04] [DATA AUDIO] ✅ Factory created
[19:49:04] [DATA AUDIO] RTCAudioSession locked
[19:49:04] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[19:49:04] [DATA AUDIO] RTCAudioSession unlocked
[19:49:04] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[19:49:04] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[19:49:04] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[19:49:04] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:49:04] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[19:49:04] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[19:49:04] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[19:49:04] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[19:49:04] Did transition
[19:49:04] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[19:49:04] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:49:04] [CHUNK] Merged 868 reactions synchronously
[19:49:04] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:49:04] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[19:49:04] [MIGRATION] No messages need sender_name backfill
[19:49:04] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[19:49:04] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[19:49:04] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[19:49:04] [GALLERY_DB] Raw datesent for msg 18407: '2026-01-21 15:35:55'
[19:49:04] [GALLERY_DB] ✅ Loaded 476 media messages
[19:49:04] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18433
[19:49:04] [GALLERY] Filtered 476 -> 436 (only with local thumbnails)
[19:49:04] [GALLERY] First 5 after sort (newest first):
[19:49:04] [GALLERY]   0: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[19:49:04] [GALLERY]   1: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[19:49:04] [GALLERY]   2: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[19:49:04] [GALLERY]   3: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[19:49:04] [GALLERY]   4: id=18340, date=2026-01-21 08:29:40, file=a4f205035ad487c7.jpg
[19:49:04] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[19:49:04] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18384, 18385, 18386, 18387, 18388]
[19:49:05] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[19:49:05] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[19:49:05] [GIF] msgId=18430 START fresh animation
[19:49:05] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:49:05] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:49:05] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:49:05] [USER] ✅ User registered successfully
[19:49:05] [USER] User registration successful
[19:49:05] [SERVER] Starting reconnect polling (5s interval)
[19:49:05] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[19:49:05] [ICONS] Offset applied: -14.6
[19:49:05] [ICONS] New left margin: 11.2, New right margin: 11.3
[19:49:05] [ICONS] Chat center: (31.2, 87.0)
[19:49:05] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[19:49:05] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[19:49:05] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[19:49:05] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[19:49:05] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[19:49:05] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[19:49:05] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[19:49:05] [ICONS] Screen width: 440.0
[19:49:05] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[19:49:05] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:49:05] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:49:05] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[19:49:05] [INCREMENTAL_SYNC] ✅ No new messages
[19:49:05] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[19:49:05] [UNSENT_RETRY] Checking for unsent messages...
[19:49:05] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[19:49:05] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[19:49:05] [UPLOAD_RECOVERY] Session: ILUIWU
[19:49:05] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[19:49:05] [UPLOAD_RECOVERY] Checking recent media messages on server...
[19:49:05] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[19:49:05] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[19:49:05] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[19:49:05] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[19:49:05] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[19:49:05] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[19:49:05] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[19:49:05] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[19:49:05] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[19:49:05] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[19:49:05] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[19:49:05] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[19:49:05] [PENDING_UPLOAD] Total pending upload messages: 0
[19:49:05] [UNSENT_RETRY] No unsent messages found
[19:49:05] new_session POST ok: token len=157
[19:49:05] HELLO → sent (fetched token, role=query)
[19:49:05] [SIG] hello_ok received for query connection - ready to query agents
[19:49:05] [SIG] get_agents request sent for sessionId=ILUIWU
[19:49:05] [SIG] get_agents request sent for sessionId=iosILUIWU
[19:49:05] [SERVER] Stopped reconnect polling
[19:49:05] [SIG] agents_list received: []
[19:49:05] [SIG] agents_list received: []
[19:49:05] [UPLOAD_RECOVERY] ✅ All media files verified on server
[19:49:05] [COMBINED_FETCH] Loaded 7199 read receipts, 873 messages with reactions
[19:49:05] [READBY_ENRICH] Enriched 50 messages with readBy data
[19:49:05] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18384, 18385, 18386, 18387, 18388]
[19:49:05] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:49:05] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:49:05] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:49:05] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[19:49:05] [GIF] msgId=18430 CONTINUE animation (elapsed=0.6893410682678223s)
[19:49:05] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:49:05] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:49:05] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:49:14] [MENU] dismissAnyExistingMenu called
[19:49:14] [MENU] dismissAnyExistingMenu completed
[19:49:14] [SCROLL_BTN] Showing button - 380pt from bottom > half 379pt
[19:49:15] [MENU] dismissAnyExistingMenu called
[19:49:15] [MENU] dismissAnyExistingMenu completed
[19:49:17] [LOCK] Lock button tapped - locking app immediately
[19:49:17] [LOCK] Received lock app notification
[19:49:18] [LIFECYCLE] App resigning active - cleared crash flag
[19:49:19] [NETWORK] Status changed: connected
[19:49:19] [SECURITY] sceneDidEnterBackground - isAuthenticated=false
[19:51:59] [CRASH] No crash detected
[19:51:59] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[19:51:59] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[19:51:59] [GIPHY] SDK not available - using REST API fallback
[19:51:59] [BACKGROUND] Background fetch enabled
[19:51:59] [AUTH] Starting PIN authentication
[19:51:59] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:51:59] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:51:59] [CLEANUP] No old timer messages to delete
[19:51:59] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[19:51:59] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:51:59] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[19:51:59] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":0,"removed_from_other_channels":0}
[19:51:59] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:51:59] [USER] ✅ User registered successfully
[19:51:59] [PUSH] User registration after token update: success
[19:51:59] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18433)...
[19:51:59] [PRELOAD] No messages or parse error
[19:52:00] [CLIENT_SIG] WebSocket opened
[19:52:00] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:52:00] [CLIENT_SIG] Connected! clientId=MNOpdpeBWrsnuXzl
[19:52:00] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:52:00] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:52:02] [PIN_AUTH] Correct PIN
[19:52:02] [SECURITY] Restored real session: ILUIWU
[19:52:02] [SECURITY] Restored real session: ILUIWU
[19:52:02] [SECURITY] Saved real session: ILUIWU
[19:52:02] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[19:52:02] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:52:02] Documents Directory: /var/mobile/Containers/Data/Application/FEAD2E1F-C4A1-4969-9070-16A67DA77312/Documents
[19:52:02] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[19:52:02] [THEME] Applying current theme
[19:52:02] [CHAT] Applied day theme (mode: day)
[19:52:02] [SECURITY] Saved real session: ILUIWU
[19:52:02] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:52:02] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:52:02] [NETWORK] Network monitor started
[19:52:02] [NETWORK] Status changed: connected
[19:52:02] Did transition
[19:52:02] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[19:52:02] [VIEWER] Screen lock enabled - normal idle behavior
[19:52:02] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[19:52:02] [VCC] ========== VideoConnectionClass INIT ==========
[19:52:02] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[19:52:02] [DATA AUDIO] ========== setupWebRTC() START ==========
[19:52:02] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[19:52:02] [DATA AUDIO] Creating encoder/decoder factories...
[19:52:02] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[19:52:02] [CODEC] Viewer selected encoder: AV1 (best quality)
[19:52:02] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[19:52:02] [DATA AUDIO] ✅ Factory created
[19:52:02] [DATA AUDIO] RTCAudioSession locked
[19:52:02] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[19:52:02] [DATA AUDIO] RTCAudioSession unlocked
[19:52:02] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[19:52:02] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[19:52:02] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[19:52:02] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:52:02] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[19:52:02] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[19:52:02] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[19:52:02] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[19:52:02] Did transition
[19:52:02] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[19:52:02] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:52:02] [CHUNK] Merged 868 reactions synchronously
[19:52:02] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:52:02] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[19:52:02] [MIGRATION] No messages need sender_name backfill
[19:52:02] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[19:52:02] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[19:52:02] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[19:52:02] [GALLERY_DB] Raw datesent for msg 18407: '2026-01-21 15:35:55'
[19:52:02] [USER] ✅ User registered successfully
[19:52:02] [USER] User registration successful
[19:52:02] [GALLERY_DB] ✅ Loaded 476 media messages
[19:52:02] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18433
[19:52:02] [INCREMENTAL_SYNC] ✅ No new messages
[19:52:02] [GALLERY] Filtered 476 -> 436 (only with local thumbnails)
[19:52:02] [GALLERY] First 5 after sort (newest first):
[19:52:02] [GALLERY]   0: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[19:52:02] [GALLERY]   1: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[19:52:02] [GALLERY]   2: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[19:52:02] [GALLERY]   3: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[19:52:02] [GALLERY]   4: id=18340, date=2026-01-21 08:29:40, file=a4f205035ad487c7.jpg
[19:52:02] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[19:52:02] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18384, 18385, 18386, 18387, 18388]
[19:52:02] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[19:52:02] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[19:52:02] [GIF] msgId=18430 START fresh animation
[19:52:02] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:52:02] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:52:02] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:52:02] [SERVER] Starting reconnect polling (5s interval)
[19:52:02] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[19:52:02] [ICONS] Offset applied: -14.6
[19:52:02] [ICONS] New left margin: 11.2, New right margin: 11.3
[19:52:02] [ICONS] Chat center: (31.2, 87.0)
[19:52:02] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[19:52:02] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[19:52:02] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[19:52:02] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[19:52:02] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[19:52:02] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[19:52:02] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[19:52:02] [ICONS] Screen width: 440.0
[19:52:02] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[19:52:02] [UNSENT_RETRY] Checking for unsent messages...
[19:52:02] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[19:52:02] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[19:52:02] [UPLOAD_RECOVERY] Session: ILUIWU
[19:52:02] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[19:52:02] [UPLOAD_RECOVERY] Checking recent media messages on server...
[19:52:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[19:52:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[19:52:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[19:52:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[19:52:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[19:52:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[19:52:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[19:52:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[19:52:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[19:52:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[19:52:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[19:52:02] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[19:52:02] [PENDING_UPLOAD] Total pending upload messages: 0
[19:52:02] [UNSENT_RETRY] No unsent messages found
[19:52:02] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[19:52:02] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:52:02] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:52:02] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[19:52:02] [UPLOAD_RECOVERY] ✅ All media files verified on server
[19:52:02] new_session POST ok: token len=157
[19:52:02] HELLO → sent (fetched token, role=query)
[19:52:02] [SIG] hello_ok received for query connection - ready to query agents
[19:52:02] [SIG] get_agents request sent for sessionId=ILUIWU
[19:52:02] [SIG] get_agents request sent for sessionId=iosILUIWU
[19:52:02] [SERVER] Stopped reconnect polling
[19:52:02] [SIG] agents_list received: []
[19:52:02] [SIG] agents_list received: []
[19:52:03] [COMBINED_FETCH] Loaded 7199 read receipts, 873 messages with reactions
[19:52:03] [READBY_ENRICH] Enriched 50 messages with readBy data
[19:52:03] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18384, 18385, 18386, 18387, 18388]
[19:52:03] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[19:52:03] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[19:52:03] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[19:52:03] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[19:52:03] [GIF] msgId=18430 CONTINUE animation (elapsed=1.0060440301895142s)
[19:52:03] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:52:03] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:52:03] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:52:05] [LOCK] Lock button tapped - locking app immediately
[19:52:05] [LOCK] Received lock app notification
[19:52:05] [LIFECYCLE] App resigning active - cleared crash flag
[19:52:06] [SECURITY] sceneDidEnterBackground - isAuthenticated=false
[19:52:06] [SECURITY] ⚠️ NOT saving timestamp - isAuthenticated is false
[19:52:06] [LIFECYCLE] App entering background - cleared crash flag
[19:52:06] [CLIENT_SIG] Disconnecting
[19:52:06] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[19:52:06] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[19:52:06] [WS] Canceling WebSocket for query connection to iosILUIWU
[19:52:06] In cleanupPeer
[19:52:06] In cleanupPeer
[19:52:06] [LIFECYCLE] WebRTC audio disabled
[19:52:06] [LIFECYCLE] AVAudioSession deactivated
[19:52:06] [LIFECYCLE] All connections stopped
[19:52:06] [CLIENT_SIG] WebSocket closed with code 1001
[19:52:06] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[19:52:06] [SERVER] Stopped reconnect polling
[19:52:06] [WS] WebSocket ACTUALLY CLOSED - isQueryOnly=true, connectionStr=iosILUIWU, closeCode=1001
[19:52:06] [WS] Query connection to iosILUIWU closed - cleaning up all agent connections and views
[19:52:06] Will request stop of video 0
[19:52:06] Will request stop of video 0
[19:52:06] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[19:52:06] [WS] Query connection failed - cleaning up all agent connections and views
[19:52:06] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[19:52:06] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[19:52:06] [CLEANUP] ========================================
[19:52:06] [CLEANUP] Cleaning up all agent connections and views
[19:52:06] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:52:06] [CLEANUP] Stopped and removed 0 video connections
[19:52:06] [CLEANUP] Removed 0 video views
[19:52:06] [CLEANUP] Removed 0 feed scroll views
[19:52:06] [CLEANUP] Removed 0 status labels
[19:52:06] [CLEANUP] Reset agent query state
[19:52:06] [CLEANUP] Updated page indicator
[19:52:06] [CLEANUP] Rebuilt video layout
[19:52:06] [CLEANUP] ✅ All agent connections and views cleaned up
[19:52:06] [CLEANUP] ========================================
[19:52:06] [SERVER] Skipping reconnect polling - app is in background
[19:52:06] [WS] URLSession invalidated successfully
[19:52:06] [PIP] Removing 0 tracks from PiP for connection 0
[19:52:06] [PIP] ✅ All tracks removed for connection 0
[19:52:06] [PIP] Removing 0 tracks from PiP for connection 0
[19:52:06] [PIP] ✅ All tracks removed for connection 0
[19:52:06] [CLEANUP] ========================================
[19:52:06] [CLEANUP] Cleaning up all agent connections and views
[19:52:06] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:52:06] [CLEANUP] Stopped and removed 0 video connections
[19:52:06] [CLEANUP] Removed 0 video views
[19:52:06] [CLEANUP] Removed 0 feed scroll views
[19:52:06] [CLEANUP] Removed 0 status labels
[19:52:06] [CLEANUP] Reset agent query state
[19:52:06] [CLEANUP] Updated page indicator
[19:52:06] [CLEANUP] Rebuilt video layout
[19:52:06] [CLEANUP] ✅ All agent connections and views cleaned up
[19:52:06] [CLEANUP] ========================================
[19:52:06] [SERVER] Skipping reconnect polling - app is in background
[19:54:05] [CRASH] No crash detected
[19:54:05] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[19:54:05] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[19:54:05] [GIPHY] SDK not available - using REST API fallback
[19:54:05] [BACKGROUND] Background fetch enabled
[19:54:05] [CLEANUP] No old timer messages to delete
[19:54:05] [AUTH] Starting PIN authentication
[19:54:05] [PUSH] Notification tapped - session_id: ILUIWU
[19:54:05] [PUSH] Max message_id before tap: 18433
[19:54:05] [PUSH] Stored pending session: ILUIWU
[19:54:05] [PUSH_EMBED] 📩 Received embedded message: id=18434, type=0, sender=Esra
[19:54:05] [PUSH_EMBED] ✅ Saved message 18434 to local DB (sync)
[19:54:05] [PUSH_EMBED] Created new cache with embedded message 18434
[19:54:05] [PUSH_EMBED] Fetching evolution data for message 18434 in background
[19:54:05] [PUSH_EMBED] ✅ Fully processed message 18434
[19:54:05] [PUSH] Embedded message handled instantly on tap
[19:54:05] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:54:05] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:54:05] [PUSH] Fetching server messages since_id=18433 to catch coalesced notifications on tap
[19:54:05] [PUSH_PRELOAD] Fetching up to 50 messages since_id=18433 to catch coalesced notifications
[19:54:05] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:54:05] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[19:54:05] [PUSH_EMBED] Got evolution data for message 18434, saving to local DB
[19:54:05] [PUSH_EMBED] Saved evolution data for message 18434
[19:54:05] [PRELOAD] Cache has only 1 messages (from push) - will load full history
[19:54:05] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":0,"removed_from_other_channels":0}
[19:54:05] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:54:05] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18434)...
[19:54:05] [USER] ✅ User registered successfully
[19:54:05] [PUSH] User registration after token update: success
[19:54:05] [PUSH_PRELOAD] Fetched 1 messages - caching for instant display
[19:54:05] [PUSH_PRELOAD] ⚡ Pre-cached 1 messages for instant display (preserved 0 from push)
[19:54:05] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:54:05] [PUSH] Server fetch on tap completed (success=true)
[19:54:05] [PRELOAD] No messages or parse error
[19:54:05] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[19:54:05] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:54:05] [CLIENT_SIG] WebSocket opened
[19:54:05] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:54:05] [CLIENT_SIG] Connected! clientId=Dm5pL2J7D3Cr_dBT
[19:54:06] [CLIENT_SIG] Received 2 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:54:06] [CLIENT_SIG]   - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:54:06] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:54:06] [PUSH] Silent push received
[19:54:06] [PUSH_EMBED] 📩 Received embedded message: id=18434, type=0, sender=Esra
[19:54:06] [PUSH_EMBED] ✅ Saved message 18434 to local DB (sync)
[19:54:06] [PUSH_EMBED] Created new cache with embedded message 18434
[19:54:06] [PUSH_EMBED] Fetching evolution data for message 18434 in background
[19:54:06] [PUSH_EMBED] ✅ Fully processed message 18434
[19:54:06] [PUSH] Embedded message handled instantly from silent push
[19:54:06] [PUSH_EMBED] Got evolution data for message 18434, saving to local DB
[19:54:06] [PUSH_EMBED] Saved evolution data for message 18434
[19:54:07] [PIN_AUTH] Correct PIN
[19:54:07] [SECURITY] Restored real session: ILUIWU
[19:54:07] [SECURITY] Restored real session: ILUIWU
[19:54:07] [SECURITY] Saved real session: ILUIWU
[19:54:07] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[19:54:07] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:54:07] Documents Directory: /var/mobile/Containers/Data/Application/FEAD2E1F-C4A1-4969-9070-16A67DA77312/Documents
[19:54:07] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[19:54:07] [THEME] Applying current theme
[19:54:07] [CHAT] Applied day theme (mode: day)
[19:54:07] [SECURITY] Saved real session: ILUIWU
[19:54:07] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:54:07] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:54:07] [NETWORK] Network monitor started
[19:54:07] [NETWORK] Status changed: connected
[19:54:07] Did transition
[19:54:07] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[19:54:07] [VIEWER] Screen lock enabled - normal idle behavior
[19:54:07] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[19:54:07] [VCC] ========== VideoConnectionClass INIT ==========
[19:54:07] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[19:54:07] [DATA AUDIO] ========== setupWebRTC() START ==========
[19:54:07] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[19:54:07] [DATA AUDIO] Creating encoder/decoder factories...
[19:54:07] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[19:54:07] [CODEC] Viewer selected encoder: AV1 (best quality)
[19:54:07] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[19:54:07] [DATA AUDIO] ✅ Factory created
[19:54:07] [DATA AUDIO] RTCAudioSession locked
[19:54:07] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[19:54:07] [DATA AUDIO] RTCAudioSession unlocked
[19:54:07] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[19:54:07] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[19:54:07] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[19:54:07] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:54:07] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[19:54:07] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[19:54:07] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[19:54:07] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[19:54:07] Did transition
[19:54:07] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[19:54:07] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:54:07] [CHUNK] Merged 868 reactions synchronously
[19:54:07] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:54:07] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[19:54:07] [MIGRATION] No messages need sender_name backfill
[19:54:07] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[19:54:07] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[19:54:07] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[19:54:07] [GALLERY_DB] Raw datesent for msg 18407: '2026-01-21 15:35:55'
[19:54:07] [USER] ✅ User registered successfully
[19:54:07] [USER] User registration successful
[19:54:07] [GALLERY_DB] ✅ Loaded 476 media messages
[19:54:07] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18434
[19:54:07] [INCREMENTAL_SYNC] ✅ No new messages
[19:54:07] [GALLERY] Filtered 476 -> 436 (only with local thumbnails)
[19:54:07] [GALLERY] First 5 after sort (newest first):
[19:54:07] [GALLERY]   0: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[19:54:07] [GALLERY]   1: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[19:54:07] [GALLERY]   2: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[19:54:07] [GALLERY]   3: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[19:54:07] [GALLERY]   4: id=18340, date=2026-01-21 08:29:40, file=a4f205035ad487c7.jpg
[19:54:07] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[19:54:07] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18385, 18386, 18387, 18388, 18389]
[19:54:07] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[19:54:07] [SERVER] Starting reconnect polling (5s interval)
[19:54:07] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[19:54:07] [ICONS] Offset applied: -14.6
[19:54:07] [ICONS] New left margin: 11.2, New right margin: 11.3
[19:54:07] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[19:54:07] [GIF] msgId=18430 START fresh animation
[19:54:07] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:54:07] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:54:07] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:54:07] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18433 → 18434
[19:54:07] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[19:54:07] [UNSENT_RETRY] Checking for unsent messages...
[19:54:07] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[19:54:07] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[19:54:07] [UPLOAD_RECOVERY] Session: ILUIWU
[19:54:07] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[19:54:07] [UPLOAD_RECOVERY] Checking recent media messages on server...
[19:54:07] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[19:54:07] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[19:54:07] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[19:54:07] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[19:54:07] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[19:54:07] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[19:54:07] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[19:54:07] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[19:54:07] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[19:54:07] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[19:54:07] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[19:54:07] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[19:54:07] [PENDING_UPLOAD] Total pending upload messages: 0
[19:54:07] [UNSENT_RETRY] No unsent messages found
[19:54:07] [ICONS] Chat center: (31.2, 87.0)
[19:54:07] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[19:54:07] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[19:54:07] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[19:54:07] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[19:54:07] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[19:54:07] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[19:54:07] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[19:54:07] [ICONS] Screen width: 440.0
[19:54:07] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[19:54:07] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:54:07] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[19:54:07] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[19:54:07] [UPLOAD_RECOVERY] ✅ All media files verified on server
[19:54:07] new_session POST ok: token len=157
[19:54:07] HELLO → sent (fetched token, role=query)
[19:54:07] [SIG] hello_ok received for query connection - ready to query agents
[19:54:07] [SIG] get_agents request sent for sessionId=ILUIWU
[19:54:07] [SIG] get_agents request sent for sessionId=iosILUIWU
[19:54:07] [SERVER] Stopped reconnect polling
[19:54:07] [SIG] agents_list received: []
[19:54:07] [SIG] agents_list received: []
[19:54:08] [COMBINED_FETCH] Loaded 7200 read receipts, 875 messages with reactions
[19:54:08] [READBY_ENRICH] Enriched 50 messages with readBy data
[19:54:08] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18385, 18386, 18387, 18388, 18389]
[19:54:08] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=true animating=false completed=false
[19:54:08] [GIF] msgId=18430 CONTINUE animation (elapsed=0.6861100196838379s)
[19:54:08] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[19:54:08] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[19:54:08] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[19:54:10] [PUSH] Silent push received
[19:54:10] [PUSH_EMBED] No embedded message_data in notification
[19:54:10] [PUSH] No embedded data, pre-loading messages from server
[19:54:10] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:54:10] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:54:10] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[19:54:10] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:54:10] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18434, AnyHashable("aps"): {
    "content-available" = 1;
}]
[19:54:10] [PUSH] Parsed message_id: 18434
[19:54:10] [PUSH] Parsed operation_type: 3
[19:54:10] [PUSH] Taking direct action: opType=3, messageId=18434
[19:54:10] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18434
[19:54:11] [CLIENT_SIG] Event received: type=3 messageId=18434
[19:54:11] [WS_EVENT] Received event: type=3, messageId=18434
[19:54:11] [WS_EVENT] Read receipt for message 18434 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:54:13] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:54:14] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:54:14] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=50, isReloading=false
[19:54:14] [SEND_MESSAGE] ✅ Added optimistic message id=-1 to arrays, newMsgCount=51
[19:54:14] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[-1, 18434, 18433, 18432, 18431]
[19:54:14] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:54:14] [GIF] SKIP - same msg, completed
[19:54:14] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:54:14] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:54:16] [CLIENT_SIG] Event received: type=0 messageId=18435
[19:54:16] [WS_EVENT] Received event: type=0, messageId=18435
[19:54:16] [WS_EVENT] 📨 New message notification (msgId=18435) - triggering incremental refresh, currentMsgCount=51
[19:54:16] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[19:54:16] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18434
[19:54:16] [PUSH_DEBUG] ⬇️ PUSH RECEIVED at 2026-01-21 18:54:16 +0000 - type: unknown, operation_type: 0, message_id: 18435, session_id: ILUIWU, state: 0
[19:54:16] [PUSH_DEBUG] Full userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 0, AnyHashable("message_id"): 18435, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 18:54:13";
    "file_name" = "";
    message = "Oki Im not gonna say but.. \Ud83e\Udd13\Ud83e\Udd23";
    "message_id" = 18435;
    "message_type" = 0;
    "prev_session_message_id" = 18434;
    "replied_message" = "But please when you reconnect I don't want you to be sorry. If you tell sorry a single time, you'll get punished \Ud83d\Ude08";
    "replied_sender_id" = "3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF";
    "replied_sender_name" = Laurent;
    "reply_to_id" = 18432;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}]
[19:54:16] [PUSH] App active - suppressing notification UI, posting internal event
[19:54:16] [PUSH_EMBED] 📩 Received embedded message: id=18435, type=0, sender=Esra
[19:54:16] [PUSH_EMBED] ✅ Saved message 18435 to local DB (sync)
[19:54:16] [PUSH_EMBED] Inserted message 18435 into existing cache (now 51 messages)
[19:54:16] [PUSH_EMBED] Fetching evolution data for message 18435 in background
[19:54:16] [PUSH_EMBED] ✅ Fully processed message 18435
[19:54:16] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 0, AnyHashable("message_id"): 18435, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 18:54:13";
    "file_name" = "";
    message = "Oki Im not gonna say but.. \Ud83e\Udd13\Ud83e\Udd23";
    "message_id" = 18435;
    "message_type" = 0;
    "prev_session_message_id" = 18434;
    "replied_message" = "But please when you reconnect I don't want you to be sorry. If you tell sorry a single time, you'll get punished \Ud83d\Ude08";
    "replied_sender_id" = "3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF";
    "replied_sender_name" = Laurent;
    "reply_to_id" = 18432;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}]
[19:54:16] [PUSH_EMBED_VC] Processing embedded message: id=18435, type=0, sender=Esra, prevId=18434
[19:54:16] [PUSH_EMBED_VC] Inserted message 18435 into allMessagesWithReadBy (now 52 messages)
[19:54:16] [PUSH_EMBED_VC] ✅ Previous message 18434 exists in memory
[19:54:16] [PUSH] ⚡ Embedded message handled directly in ViewController
[19:54:16] [PUSH] Parsed message_id: 18435
[19:54:16] [PUSH] Parsed operation_type: 0
[19:54:16] [PUSH] Taking direct action: opType=0, messageId=18435
[19:54:16] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18435
[19:54:16] [PUSH] ⚡ Message 18435 already in memory - skipping duplicate notification entirely
[19:54:16] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[19:54:16] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[19:54:16] [PUSH_UI] Message 18435 already in memory - skipping insert
[19:54:16] [PUSH_EMBED_VC] Saved message 18435 to local DB
[19:54:16] [PUSH] Silent push received
[19:54:16] [PUSH_EMBED] 📩 Received embedded message: id=18435, type=0, sender=Esra
[19:54:16] [INCREMENTAL_SYNC] ✅ Found 2 new messages
[19:54:16] [PUSH_EMBED] ✅ Saved message 18435 to local DB (sync)
[19:54:16] [PUSH_EMBED] Fetching evolution data for message 18435 in background
[19:54:16] [PUSH_EMBED] ✅ Fully processed message 18435
[19:54:16] [PUSH] Embedded message handled instantly from silent push
[19:54:16] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[19:54:16] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[19:54:16] [PUSH_UI] Message 18435 already in memory - skipping insert
[19:54:16] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 0, AnyHashable("message_id"): 18435, AnyHashable("message_data"): {
    datesent = "2026-01-21 18:54:13";
    "file_name" = "";
    message = "Oki Im not gonna say but.. \Ud83e\Udd13\Ud83e\Udd23";
    "message_id" = 18435;
    "message_type" = 0;
    "prev_session_message_id" = 18434;
    "replied_message" = "But please when you reconnect I don't want you to be sorry. If you tell sorry a single time, you'll get punished \Ud83d\Ude08";
    "replied_sender_id" = "3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF";
    "replied_sender_name" = Laurent;
    "reply_to_id" = 18432;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}]
[19:54:16] [PUSH_EMBED_VC] Message 18435 already in memory - skipping
[19:54:16] [PUSH] ⚡ Embedded message handled directly in ViewController
[19:54:16] [PUSH] Parsed message_id: 18435
[19:54:16] [PUSH] Parsed operation_type: 0
[19:54:16] [PUSH] Taking direct action: opType=0, messageId=18435
[19:54:16] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18435
[19:54:16] [PUSH] ⚡ Message 18435 already in memory - skipping duplicate notification entirely
[19:54:16] [INCREMENTAL_SYNC] Replaced optimistic message (id=-1) with server message (id=18436)
[19:54:16] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=2
[19:54:16] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:54:16] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=52
[19:54:16] [PUSH_EMBED] Got evolution data for message 18435, saving to local DB
[19:54:16] [PUSH_EMBED] Saved evolution data for message 18435
[19:54:16] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[18385, 18386, 18387, 18388, 18389]
[19:54:16] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18434 → 18435
[19:54:16] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:54:16] [GIF] SKIP - same msg, completed
[19:54:18] [CLIENT_SIG] Event received: type=0 messageId=18436
[19:54:18] [WS_EVENT] Received event: type=0, messageId=18436
[19:54:18] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18436,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:54:15"}
[19:54:18] [WS_EVENT] 📨 New message notification (msgId=18436) - triggering incremental refresh, currentMsgCount=52
[19:54:18] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=52
[19:54:18] [CHAT] receive_message.php JSON: ["ok": 1, "message_id": 18436, "message_type": 0, "session_id": ILUIWU, "datesent_utc": 2026-01-21 18:54:15, "file_name": ]
[19:54:18] [DB_UPGRADE] Upgrading message ID: -1 → 18436, preserveOriginalDate=false
[19:54:18] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18436
[19:54:18] [DB_UPGRADE] ⚠️ No rows affected - message -1 not found in DB
[19:54:18] [SEND_UPGRADE] ⚠️ Server ID 18436 already exists - removing provisional entry -1
[19:54:18] ReloadData 9
[19:54:18] [PUSH_EMBED] Got evolution data for message 18435, saving to local DB
[19:54:18] [PUSH_EMBED] Saved evolution data for message 18435
[19:54:18] [INCREMENTAL_SYNC] ✅ No new messages
[19:54:18] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=52
[19:54:21] [PUSH] Silent push received
[19:54:21] [PUSH_EMBED] No embedded message_data in notification
[19:54:21] [PUSH] No embedded data, pre-loading messages from server
[19:54:21] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:54:21] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:54:21] [PRELOAD_CACHE] Preserving 2 push-inserted messages: [18386, 18385]
[19:54:21] [PUSH_PRELOAD] ⚡ Pre-cached 52 messages for instant display (preserved 2 from push)
[19:54:21] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:54:21] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18435, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU]
[19:54:21] [PUSH] Parsed message_id: 18435
[19:54:21] [PUSH] Parsed operation_type: 3
[19:54:21] [PUSH] Taking direct action: opType=3, messageId=18435
[19:54:21] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18435
[19:54:21] [PUSH] Silent push received
[19:54:21] [PUSH_EMBED] No embedded message_data in notification
[19:54:21] [PUSH] No embedded data, pre-loading messages from server
[19:54:21] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:54:21] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:54:21] [PRELOAD_CACHE] Preserving 2 push-inserted messages: [18386, 18385]
[19:54:21] [PUSH_PRELOAD] ⚡ Pre-cached 52 messages for instant display (preserved 2 from push)
[19:54:21] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:54:21] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18436, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU]
[19:54:21] [PUSH] Parsed message_id: 18436
[19:54:21] [PUSH] Parsed operation_type: 3
[19:54:21] [PUSH] Taking direct action: opType=3, messageId=18436
[19:54:21] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18436
[19:54:22] [CLIENT_SIG] Event received: type=3 messageId=18435
[19:54:22] [WS_EVENT] Received event: type=3, messageId=18435
[19:54:22] [WS_EVENT] Read receipt for message 18435 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:54:22] [CLIENT_SIG] Event received: type=3 messageId=18436
[19:54:22] [WS_EVENT] Received event: type=3, messageId=18436
[19:54:22] [WS_EVENT] Read receipt for message 18436 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:54:33] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:54:33] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=52, isReloading=false
[19:54:33] [SEND_MESSAGE] ✅ Added optimistic message id=-2 to arrays, newMsgCount=53
[19:54:33] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[-2, 18436, 18435, 18434, 18433]
[19:54:33] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:54:33] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:54:35] [CLIENT_SIG] Event received: type=0 messageId=18437
[19:54:35] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18437,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:54:33"}
[19:54:35] [WS_EVENT] Received event: type=0, messageId=18437
[19:54:35] [WS_EVENT] 📨 New message notification (msgId=18437) - triggering incremental refresh, currentMsgCount=53
[19:54:35] [CHAT] receive_message.php JSON: ["ok": 1, "session_id": ILUIWU, "file_name": , "message_type": 0, "message_id": 18437, "datesent_utc": 2026-01-21 18:54:33]
[19:54:35] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=53
[19:54:35] [DB_UPGRADE] Upgrading message ID: -2 → 18437, preserveOriginalDate=false
[19:54:35] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18436
[19:54:35] [DB_UPGRADE] ✅ Upgraded -2 → 18437 with send_status=0, 1 row(s) affected
[19:54:35] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -2 → 18437
[19:54:35] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -2 → 18437
[19:54:35] ReloadData 9
[19:54:35] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[19:54:35] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[19:54:35] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=53
[19:54:35] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[18385, 18386, 18387, 18388, 18389]
[19:54:49] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:54:49] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=53, isReloading=false
[19:54:49] [SEND_MESSAGE] ✅ Added optimistic message id=-3 to arrays, newMsgCount=54
[19:54:49] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[-3, 18437, 18436, 18435, 18434]
[19:54:49] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:54:49] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:54:51] [CLIENT_SIG] Event received: type=0 messageId=18438
[19:54:51] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18438,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:54:49"}
[19:54:51] [WS_EVENT] Received event: type=0, messageId=18438
[19:54:51] [WS_EVENT] 📨 New message notification (msgId=18438) - triggering incremental refresh, currentMsgCount=54
[19:54:51] [CHAT] receive_message.php JSON: ["session_id": ILUIWU, "file_name": , "datesent_utc": 2026-01-21 18:54:49, "ok": 1, "message_type": 0, "message_id": 18438]
[19:54:51] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=54
[19:54:51] [DB_UPGRADE] Upgrading message ID: -3 → 18438, preserveOriginalDate=false
[19:54:51] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18437
[19:54:51] [DB_UPGRADE] ✅ Upgraded -3 → 18438 with send_status=0, 1 row(s) affected
[19:54:51] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -3 → 18438
[19:54:51] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -3 → 18438
[19:54:51] ReloadData 9
[19:54:51] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[19:54:51] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:54:51] [GIF] SKIP - same msg, completed
[19:54:51] [LOCK] Lock button tapped - locking app immediately
[19:54:51] [LOCK] Received lock app notification
[19:54:51] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[19:54:51] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=54
[19:54:51] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[18385, 18386, 18387, 18388, 18389]
[19:54:51] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:54:51] [GIF] SKIP - same msg, completed
[19:54:51] [LIFECYCLE] App resigning active - cleared crash flag
[19:54:52] [SECURITY] sceneDidEnterBackground - isAuthenticated=false
[19:54:52] [SECURITY] ⚠️ NOT saving timestamp - isAuthenticated is false
[19:54:52] [LIFECYCLE] App entering background - cleared crash flag
[19:54:52] [CLIENT_SIG] Disconnecting
[19:54:52] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[19:54:52] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[19:54:52] [WS] Canceling WebSocket for query connection to iosILUIWU
[19:54:52] In cleanupPeer
[19:54:52] In cleanupPeer
[19:54:52] [LIFECYCLE] WebRTC audio disabled
[19:54:52] [LIFECYCLE] AVAudioSession deactivated
[19:54:52] [LIFECYCLE] All connections stopped
[19:54:52] [CLIENT_SIG] WebSocket closed with code 1001
[19:54:52] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[19:54:52] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[19:54:52] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[19:54:52] [SERVER] Stopped reconnect polling
[19:54:52] Will request stop of video 0
[19:54:52] [WS] WebSocket task completed with error - isQueryOnly=true: cancelled
[19:54:52] [WS] Query connection error - cleaning up all agent connections and views
[19:54:52] Will request stop of video 0
[19:54:52] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[19:54:52] [WS] Query connection failed - cleaning up all agent connections and views
[19:54:52] [PIP] Removing 0 tracks from PiP for connection 0
[19:54:52] [PIP] ✅ All tracks removed for connection 0
[19:54:52] [CLEANUP] ========================================
[19:54:52] [CLEANUP] Cleaning up all agent connections and views
[19:54:52] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:54:52] [CLEANUP] Stopped and removed 0 video connections
[19:54:52] [CLEANUP] Removed 0 video views
[19:54:52] [CLEANUP] Removed 0 feed scroll views
[19:54:52] [CLEANUP] Removed 0 status labels
[19:54:52] [CLEANUP] Reset agent query state
[19:54:52] [CLEANUP] Updated page indicator
[19:54:52] [CLEANUP] Rebuilt video layout
[19:54:52] [CLEANUP] ✅ All agent connections and views cleaned up
[19:54:52] [CLEANUP] ========================================
[19:54:52] [SERVER] Skipping reconnect polling - app is in background
[19:54:52] [WS] URLSession invalidated successfully
[19:54:52] [PIP] Removing 0 tracks from PiP for connection 0
[19:54:52] [PIP] ✅ All tracks removed for connection 0
[19:54:52] [CLEANUP] ========================================
[19:54:52] [CLEANUP] Cleaning up all agent connections and views
[19:54:52] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:54:52] [CLEANUP] Stopped and removed 0 video connections
[19:54:52] [CLEANUP] Removed 0 video views
[19:54:52] [CLEANUP] Removed 0 feed scroll views
[19:54:52] [CLEANUP] Removed 0 status labels
[19:54:52] [CLEANUP] Reset agent query state
[19:54:52] [CLEANUP] Updated page indicator
[19:54:52] [CLEANUP] Rebuilt video layout
[19:54:52] [CLEANUP] ✅ All agent connections and views cleaned up
[19:54:52] [CLEANUP] ========================================
[19:54:52] [SERVER] Skipping reconnect polling - app is in background
[19:55:04] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[19:55:04] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:55:04] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:55:04] [PUSH] Notification tapped - session_id: ILUIWU
[19:55:04] [PUSH] Max message_id before tap: 18438
[19:55:04] [PUSH] Stored pending session: ILUIWU
[19:55:04] [PUSH_EMBED] No embedded message_data in notification
[19:55:04] [PUSH] Pre-loading messages on notification tap...
[19:55:04] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:55:04] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:55:04] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:55:04] [LIFECYCLE] App entering foreground - restoring connections
[19:55:04] [UPLOAD_RETRY] No pending uploads to retry
[19:55:04] [LIFECYCLE] Merged 868 reactions from local DB
[19:55:04] [LIFECYCLE] WebRTC audio re-enabled
[19:55:04] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:55:04] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:55:04] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:55:04] [VIEWER] Reconnecting after background - querying agents
[19:55:04] [UNSENT_RETRY] Checking for unsent messages...
[19:55:04] [PENDING_UPLOAD] Total pending upload messages: 0
[19:55:04] [UNSENT_RETRY] No unsent messages found
[19:55:04] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:55:04] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[18385, 18386, 18387, 18388, 18389]
[19:55:04] [PRELOAD_CACHE] Preserving 5 push-inserted messages: [18389, 18388, 18387, 18386, 18385]
[19:55:04] [PUSH_PRELOAD] ⚡ Pre-cached 55 messages for instant display (preserved 5 from push)
[19:55:04] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:55:04] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:55:04] [GIF] SKIP - same msg, completed
[19:55:04] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 0, AnyHashable("message_id"): 18439, AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}]
[19:55:04] [PUSH] Parsed message_id: 18439
[19:55:04] [PUSH] Parsed operation_type: 0
[19:55:04] [PUSH] Taking direct action: opType=0, messageId=18439
[19:55:04] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18439
[19:55:04] [PUSH] Handling message fetch for opType=0, messageId=18439
[19:55:04] [PUSH] Requesting URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?session_id=ILUIWU&viewer=1&messages=18439
[19:55:04] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[19:55:04] HELLO → sent (cached token, role=query)
[19:55:04] [SIG] hello_ok received for query connection - ready to query agents
[19:55:04] [SIG] get_agents request sent for sessionId=ILUIWU
[19:55:04] [SIG] get_agents request sent for sessionId=iosILUIWU
[19:55:04] [CLIENT_SIG] WebSocket opened
[19:55:04] [SERVER] Stopped reconnect polling
[19:55:04] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:55:04] [CLIENT_SIG] Connected! clientId=GoqLtFmVxl9f6qZY
[19:55:04] [SIG] agents_list received: []
[19:55:04] [SIG] agents_list received: []
[19:55:04] [CLIENT_SIG] Received 2 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:55:04] [CLIENT_SIG]   - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:55:04] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:55:04] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[19:55:04] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:55:04] [PUSH] handlePollEventsNotification userInfo: [:]
[19:55:04] [PUSH] No message_id in userInfo
[19:55:04] [PUSH] No operation_type in userInfo
[19:55:04] [FAST_REFRESH] Evolution disabled - performing incremental sync
[19:55:04] [FAST_REFRESH] Already have 54 messages - skipping local DB load
[19:55:04] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[19:55:04] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[19:55:04] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=54
[19:55:04] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18439
[19:55:04] [COMBINED_FETCH] Loaded 7205 read receipts, 875 messages with reactions
[19:55:04] [FOREGROUND] Enriched 2 messages with readBy data from server
[19:55:04] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:55:05] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[18385, 18386, 18387, 18388, 18389]
[19:55:05] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[19:55:05] [GIF] SKIP - same msg, completed
[19:55:05] [PIN_AUTH] Correct PIN
[19:55:05] [SECURITY] Restored real session: ILUIWU
[19:55:05] [SECURITY] Restored real session: ILUIWU
[19:55:06] [LOCK] ✅ PIN auth callback - setting isAuthenticated = true
[19:55:06] [AUTH] Authentication completed - updating UI only (data already fetched in foreground handler)
[19:55:06] [AUTH] Cache had 55 messages, maxExistingId=18438, inserted 1 truly new
[19:55:06] [AUTH] UI update complete
[19:55:06] [FAKE MODE] Exiting fake mode, restoring real session
[19:55:06] [SECURITY] Restored real session: ILUIWU
[19:55:06] [SECURITY] Saved real session: ILUIWU
[19:55:06] [FAKE MODE] ✅ Restored real session: ILUIWU
[19:55:06] [FAKE MODE] Loaded 50 messages (limited to page size)
[19:55:06] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:55:06] [CELL_UPLOAD] → not my message, setting complete
[19:55:06] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:55:06] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18438 → 18439
[19:55:06] DOWNLOADIIING t_41101b95fabc37ab.jpg
[19:55:06] DOWNLOADIIING 41101b95fabc37ab.jpg
[19:55:06] [MEDIA_DOWNLOAD] ✅ t_41101b95fabc37ab.jpg complete
[19:55:06] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:55:06] [MEDIA_DOWNLOAD] ✅ Set thumbnail for cell: 41101b95fabc37ab.jpg from downloaded: t_41101b95fabc37ab.jpg
[19:55:06] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:55:06] [CELL_UPLOAD] → not my message, setting complete
[19:55:06] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:55:06] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18390, 18391, 18392, 18393, 18394]
[19:55:06] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:55:06] [CELL_UPLOAD] → not my message, setting complete
[19:55:06] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:55:06] [MEDIA_DOWNLOAD] ✅ 41101b95fabc37ab.jpg complete
[19:55:06] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:55:06] [MEDIA_DOWNLOAD] ✅ Set thumbnail for cell: 41101b95fabc37ab.jpg from downloaded: 41101b95fabc37ab.jpg
[19:55:06] [PUSH] Silent push received
[19:55:06] [PUSH_EMBED] No embedded message_data in notification
[19:55:06] [PUSH] No embedded data, pre-loading messages from server
[19:55:06] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:55:06] [PUSH] Silent push received
[19:55:06] [PUSH_EMBED] No embedded message_data in notification
[19:55:06] [PUSH] No embedded data, pre-loading messages from server
[19:55:06] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:55:07] [PUSH] get_message response: HTTP 200, 640 bytes
[19:55:07] [PUSH] get_message response body: [{"message_type":1,"message_id":18439,"session_id":"ILUIWU","message":"","file_name":"41101b95fabc37ab.jpg","msgread":0,"datesent":"2026-01-21 18:54:54","timer":0,"timer_started_at":null,"timer_played":0,"sender_id":"EDAD55A1-003F-415D-AA60-672B34B504FE","sender_name":"Esra","distance":null,"link_url":null,"link_title":null,"link_description":null,"link_image_url":null,"reply_to_id":18433,"replied_message":"Just be the free lady who decides when her boyfriend deserves attention, and I want you to act as such 🥰","replied_sender_id":"3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF","replied_sender_name":"Laurent","read_by":[],"reactions":[]}]
[19:55:07] [PUSH] Updated readBy in allMessagesWithReadBy for message 18439: readBy=0
[19:55:07] [PUSH] Updated readBy in chatMessages for message 18439: readBy=0
[19:55:07] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":0,"removed_from_other_channels":0}
[19:55:07] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:55:07] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:55:07] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[19:55:07] [USER] ✅ User registered successfully
[19:55:07] [PUSH] User registration after token update: success
[19:55:07] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:55:07] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 0, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18439, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}]
[19:55:07] [PUSH] Parsed message_id: 18439
[19:55:07] [PUSH] Parsed operation_type: 0
[19:55:07] [PUSH] Taking direct action: opType=0, messageId=18439
[19:55:07] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18439
[19:55:07] [PUSH] ⚡ Message 18439 already in memory - skipping duplicate notification entirely
[19:55:07] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:55:07] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[19:55:07] [INCREMENTAL_SYNC] ✅ No new messages
[19:55:07] [FAST_REFRESH] Incremental sync complete - 50 messages
[19:55:07] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:55:07] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18439]
[19:55:07] [PUSH] Parsed message_id: 18439
[19:55:07] [PUSH] Parsed operation_type: 3
[19:55:07] [PUSH] Taking direct action: opType=3, messageId=18439
[19:55:07] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18439
[19:55:08] [COMBINED_FETCH] Loaded 7205 read receipts, 876 messages with reactions
[19:55:08] [FAST_REFRESH] Enriched 50 messages with readBy data
[19:55:08] [COMBINED_FETCH] Loaded 7205 read receipts, 876 messages with reactions
[19:55:08] [FAKE MODE] Enriched 50 messages with readBy data
[19:55:08] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:55:08] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18390, 18391, 18392, 18393, 18394]
[19:55:08] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:55:08] [CELL_UPLOAD] → not my message, setting complete
[19:55:08] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:55:10] [CLIENT_SIG] Event received: type=3 messageId=18439
[19:55:10] [WS_EVENT] Received event: type=3, messageId=18439
[19:55:10] [WS_EVENT] Read receipt for message 18439 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:55:10] [PUSH] Silent push received
[19:55:10] [PUSH_EMBED] No embedded message_data in notification
[19:55:10] [PUSH] No embedded data, pre-loading messages from server
[19:55:10] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:55:10] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:55:10] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[19:55:10] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:55:10] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18439]
[19:55:10] [PUSH] Parsed message_id: 18439
[19:55:10] [PUSH] Parsed operation_type: 3
[19:55:10] [PUSH] Taking direct action: opType=3, messageId=18439
[19:55:10] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18439
[19:55:14] [WS] WebSocket task completed with error - isQueryOnly=true: The request timed out.
[19:55:14] [WS] Query connection error - cleaning up all agent connections and views
[19:55:14] [CLEANUP] ========================================
[19:55:14] [CLEANUP] Cleaning up all agent connections and views
[19:55:14] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:55:14] [CLEANUP] Stopped and removed 0 video connections
[19:55:14] [CLEANUP] Removed 0 video views
[19:55:14] [CLEANUP] Removed 0 feed scroll views
[19:55:14] [CLEANUP] Removed 0 status labels
[19:55:14] [CLEANUP] Reset agent query state
[19:55:14] [CLEANUP] Updated page indicator
[19:55:14] [CLEANUP] Rebuilt video layout
[19:55:14] [CLEANUP] ✅ All agent connections and views cleaned up
[19:55:14] [CLEANUP] ========================================
[19:55:14] [SERVER] Starting reconnect polling (5s interval)
[19:55:18] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:55:18] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=50, isReloading=false
[19:55:18] [SEND_MESSAGE] ✅ Added optimistic message id=-4 to arrays, newMsgCount=51
[19:55:18] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[-4, 18439, 18438, 18437, 18436]
[19:55:18] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:55:18] [CELL_UPLOAD] → not my message, setting complete
[19:55:18] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:55:18] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:55:18] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:55:19] [SERVER] Polling - attempting to reconnect...
[19:55:20] [CLIENT_SIG] Event received: type=0 messageId=18440
[19:55:20] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18440,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:55:18"}
[19:55:20] [WS_EVENT] Received event: type=0, messageId=18440
[19:55:20] [WS_EVENT] 📨 New message notification (msgId=18440) - triggering incremental refresh, currentMsgCount=51
[19:55:20] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[19:55:20] [CHAT] receive_message.php JSON: ["ok": 1, "session_id": ILUIWU, "file_name": , "message_type": 0, "message_id": 18440, "datesent_utc": 2026-01-21 18:55:18]
[19:55:20] [DB_UPGRADE] Upgrading message ID: -4 → 18440, preserveOriginalDate=false
[19:55:20] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18439
[19:55:20] [DB_UPGRADE] ✅ Upgraded -4 → 18440 with send_status=0, 1 row(s) affected
[19:55:20] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -4 → 18440
[19:55:20] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -4 → 18440
[19:55:20] ReloadData 9
[19:55:20] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:55:20] [CELL_UPLOAD] → not my message, setting complete
[19:55:20] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:55:20] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[19:55:20] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[19:55:20] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=51
[19:55:20] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[18390, 18391, 18392, 18393, 18394]
[19:55:20] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:55:20] [CELL_UPLOAD] → not my message, setting complete
[19:55:20] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:55:22] [PUSH] Silent push received
[19:55:22] [PUSH_EMBED] No embedded message_data in notification
[19:55:22] [PUSH] No embedded data, pre-loading messages from server
[19:55:22] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:55:22] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:55:23] [PRELOAD_CACHE] Preserving 1 push-inserted messages: [18390]
[19:55:23] [PUSH_PRELOAD] ⚡ Pre-cached 51 messages for instant display (preserved 1 from push)
[19:55:23] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:55:23] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18440, AnyHashable("session_id"): ILUIWU]
[19:55:23] [PUSH] Parsed message_id: 18440
[19:55:23] [PUSH] Parsed operation_type: 3
[19:55:23] [PUSH] Taking direct action: opType=3, messageId=18440
[19:55:23] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18440
[19:55:23] [CLIENT_SIG] Event received: type=3 messageId=18440
[19:55:23] [WS_EVENT] Received event: type=3, messageId=18440
[19:55:23] [WS_EVENT] Read receipt for message 18440 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:55:24] [SERVER] Polling - attempting to reconnect...
[19:55:25] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:55:25] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=51, isReloading=false
[19:55:25] [SEND_MESSAGE] ✅ Added optimistic message id=-5 to arrays, newMsgCount=52
[19:55:25] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[-5, 18440, 18439, 18438, 18437]
[19:55:25] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:55:25] [CELL_UPLOAD] → not my message, setting complete
[19:55:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:55:25] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:55:25] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:55:26] [CLIENT_SIG] Event received: type=0 messageId=18441
[19:55:26] [WS_EVENT] Received event: type=0, messageId=18441
[19:55:26] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18441,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:55:25"}
[19:55:26] [WS_EVENT] 📨 New message notification (msgId=18441) - triggering incremental refresh, currentMsgCount=52
[19:55:26] [CHAT] receive_message.php JSON: ["message_id": 18441, "ok": 1, "file_name": , "message_type": 0, "session_id": ILUIWU, "datesent_utc": 2026-01-21 18:55:25]
[19:55:26] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=52
[19:55:26] [DB_UPGRADE] Upgrading message ID: -5 → 18441, preserveOriginalDate=false
[19:55:26] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18440
[19:55:26] [DB_UPGRADE] ✅ Upgraded -5 → 18441 with send_status=0, 1 row(s) affected
[19:55:26] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -5 → 18441
[19:55:26] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -5 → 18441
[19:55:26] ReloadData 9
[19:55:26] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[19:55:27] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:55:27] [CELL_UPLOAD] → not my message, setting complete
[19:55:27] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:55:27] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[19:55:27] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=52
[19:55:27] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[18390, 18391, 18392, 18393, 18394]
[19:55:27] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:55:27] [CELL_UPLOAD] → not my message, setting complete
[19:55:27] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:55:29] [SERVER] Polling - attempting to reconnect...
[19:55:30] [PUSH] Silent push received
[19:55:30] [PUSH_EMBED] No embedded message_data in notification
[19:55:30] [PUSH] No embedded data, pre-loading messages from server
[19:55:30] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:55:30] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:55:30] [PRELOAD_CACHE] Preserving 2 push-inserted messages: [18391, 18390]
[19:55:30] [PUSH_PRELOAD] ⚡ Pre-cached 52 messages for instant display (preserved 2 from push)
[19:55:30] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:55:30] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18441]
[19:55:30] [PUSH] Parsed message_id: 18441
[19:55:30] [PUSH] Parsed operation_type: 3
[19:55:30] [PUSH] Taking direct action: opType=3, messageId=18441
[19:55:30] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18441
[19:55:30] [CLIENT_SIG] Event received: type=3 messageId=18441
[19:55:30] [WS_EVENT] Received event: type=3, messageId=18441
[19:55:30] [WS_EVENT] Read receipt for message 18441 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:55:34] [SERVER] Polling - attempting to reconnect...
[19:55:36] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:55:38] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:55:39] [SERVER] Polling - attempting to reconnect...
[19:55:40] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:55:41] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:55:42] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:55:44] [SERVER] Polling - attempting to reconnect...
[19:55:49] [SERVER] Polling - attempting to reconnect...
[19:55:54] [SERVER] Polling - attempting to reconnect...
[19:55:56] [LIFECYCLE] App resigning active - cleared crash flag
[19:55:56] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[19:55:56] [SECURITY] Saved background timestamp
[19:55:56] [LIFECYCLE] App entering background - cleared crash flag
[19:55:56] [CLIENT_SIG] Disconnecting
[19:55:56] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[19:55:56] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=3
[19:55:56] [WS] Canceling WebSocket for query connection to iosILUIWU
[19:55:56] In cleanupPeer
[19:55:56] In cleanupPeer
[19:55:56] [LIFECYCLE] WebRTC audio disabled
[19:55:56] [LIFECYCLE] AVAudioSession deactivated
[19:55:56] [LIFECYCLE] All connections stopped
[19:55:56] [CLIENT_SIG] WebSocket closed with code 1001
[19:55:56] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[19:55:56] [SERVER] Stopped reconnect polling
[19:55:56] [WS] URLSession invalidated successfully
[19:55:56] Will request stop of video 0
[19:55:56] Will request stop of video 0
[19:55:56] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[19:55:56] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[19:55:56] [PIP] Removing 0 tracks from PiP for connection 0
[19:55:56] [PIP] ✅ All tracks removed for connection 0
[19:55:56] [PIP] Removing 0 tracks from PiP for connection 0
[19:55:56] [PIP] ✅ All tracks removed for connection 0
[19:56:29] [WS] Connection failed: The operation couldn’t be completed. Software caused connection abort
[19:56:29] [WS] Query connection failed - cleaning up all agent connections and views
[19:56:29] [CLEANUP] ========================================
[19:56:29] [CLEANUP] Cleaning up all agent connections and views
[19:56:29] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:56:29] [CLEANUP] Stopped and removed 0 video connections
[19:56:29] [CLEANUP] Removed 0 video views
[19:56:29] [CLEANUP] Removed 0 feed scroll views
[19:56:29] [CLEANUP] Removed 0 status labels
[19:56:29] [CLEANUP] Reset agent query state
[19:56:29] [CLEANUP] Updated page indicator
[19:56:29] [CLEANUP] Rebuilt video layout
[19:56:29] [CLEANUP] ✅ All agent connections and views cleaned up
[19:56:29] [CLEANUP] ========================================
[19:56:29] [SERVER] Skipping reconnect polling - app is in background
[19:56:30] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:56:30] [SECURITY] Timeout check: elapsed=34.30516290664673s, timeout=300.0s
[19:56:30] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:56:30] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:56:30] [LIFECYCLE] App entering foreground - restoring connections
[19:56:30] [UPLOAD_RETRY] No pending uploads to retry
[19:56:30] [LIFECYCLE] Merged 868 reactions from local DB
[19:56:30] [LIFECYCLE] WebRTC audio re-enabled
[19:56:30] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:56:30] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:56:30] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:56:30] [VIEWER] Reconnecting after background - querying agents
[19:56:30] [UNSENT_RETRY] Checking for unsent messages...
[19:56:30] [PENDING_UPLOAD] Total pending upload messages: 0
[19:56:30] [UNSENT_RETRY] No unsent messages found
[19:56:30] [PUSH] Notification tapped - session_id: ILUIWU
[19:56:30] [PUSH] Max message_id before tap: 18441
[19:56:30] [PUSH] Stored pending session: ILUIWU
[19:56:30] [PUSH_EMBED] 📩 Received embedded message: id=18442, type=0, sender=Esra
[19:56:30] [PUSH_EMBED] ✅ Saved message 18442 to local DB (sync)
[19:56:30] [PUSH_EMBED] Inserted message 18442 into existing cache (now 53 messages)
[19:56:30] [PUSH_EMBED] Fetching evolution data for message 18442 in background
[19:56:30] [PUSH_EMBED] ✅ Fully processed message 18442
[19:56:30] [PUSH] Embedded message handled instantly on tap
[19:56:30] [PUSH] Fetching server messages since_id=18441 to catch coalesced notifications on tap
[19:56:30] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[19:56:30] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[19:56:30] [PUSH_PRELOAD] Fetching up to 50 messages since_id=18441 to catch coalesced notifications
[19:56:30] [PUSH_UI] Inserted message 18442 into UI (now 53 messages)
[19:56:30] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:56:30] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:56:30] [PUSH_EMBED] Got evolution data for message 18442, saving to local DB
[19:56:30] [PUSH_EMBED] Saved evolution data for message 18442
[19:56:30] [PUSH_PRELOAD] Fetched 1 messages - caching for instant display
[19:56:30] [PRELOAD_CACHE] Preserving 52 push-inserted messages: [18441, 18440, 18439, 18438, 18437, 18436, 18435, 18434, 18433, 18432, 18431, 18430, 18429, 18428, 18427, 18426, 18425, 18424, 18423, 18422, 18421, 18420, 18419, 18418, 18417, 18416, 18415, 18414, 18413, 18412, 18411, 18410, 18409, 18408, 18407, 18406, 18405, 18404, 18403, 18402, 18401, 18400, 18399, 18398, 18397, 18396, 18395, 18394, 18393, 18392, 18391, 18390]
[19:56:30] [PUSH_PRELOAD] ⚡ Pre-cached 53 messages for instant display (preserved 52 from push)
[19:56:30] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:56:30] [PUSH] Server fetch on tap completed (success=true)
[19:56:30] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("operation_type"): 0, AnyHashable("message_id"): 18442, AnyHashable("message_data"): {
    datesent = "2026-01-21 18:56:25";
    "file_name" = "";
    message = "I want you to do 5 1-0s until tomorrow lunch time\Ud83d\Ude0f";
    "message_id" = 18442;
    "message_type" = 0;
    "prev_session_message_id" = 18441;
    "replied_message" = "If my baby is in the mood and wants to give me orders for tonight in bed and / or tomorrow morning at wake up and / or under shower, her slave will have no other choice than to obey. If my baby is less in the mood, then absolutely no problem \U2764\Ufe0f";
    "replied_sender_id" = "3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF";
    "replied_sender_name" = Laurent;
    "reply_to_id" = 18429;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("session_id"): ILUIWU]
[19:56:30] [PUSH_EMBED_VC] Message 18442 already in memory - skipping
[19:56:30] [PUSH] ⚡ Embedded message handled directly in ViewController
[19:56:30] [PUSH] Parsed message_id: 18442
[19:56:30] [PUSH] Parsed operation_type: 0
[19:56:30] [PUSH] Taking direct action: opType=0, messageId=18442
[19:56:30] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18442
[19:56:30] [PUSH] ⚡ Message 18442 already in memory - skipping duplicate notification entirely
[19:56:30] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[18442, 18390, 18391, 18392, 18393]
[19:56:30] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:56:30] [CELL_UPLOAD] → not my message, setting complete
[19:56:30] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:56:30] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18441 → 18442
[19:56:30] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[19:56:30] [WS] Opening session at ws://crivello.dyndns.org:8081/
[19:56:30] [CLIENT_SIG] WebSocket opened
[19:56:30] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:56:30] [CLIENT_SIG] Connected! clientId=8IRSrYLE6c7uftd0
[19:56:30] [CLIENT_SIG] Received 2 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:56:30] [CLIENT_SIG]   - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:56:30] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:56:31] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[19:56:31] HELLO → sent (cached token, role=query)
[19:56:31] [SIG] hello_ok received for query connection - ready to query agents
[19:56:31] [SIG] get_agents request sent for sessionId=ILUIWU
[19:56:31] [SIG] get_agents request sent for sessionId=iosILUIWU
[19:56:31] [SERVER] Stopped reconnect polling
[19:56:31] [SIG] agents_list received: []
[19:56:31] [SIG] agents_list received: []
[19:56:31] [COMBINED_FETCH] Loaded 7208 read receipts, 877 messages with reactions
[19:56:31] [FOREGROUND] Enriched 1 messages with readBy data from server
[19:56:31] [SECURITY] sceneDidBecomeActive - isAuthenticated=true, didEnterBackground=true
[19:56:31] [SECURITY] Within timeout - cleared background flag
[19:56:31] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:56:31] [PUSH] handlePollEventsNotification userInfo: [:]
[19:56:31] [PUSH] No message_id in userInfo
[19:56:31] [PUSH] No operation_type in userInfo
[19:56:31] [FAST_REFRESH] Evolution disabled - performing incremental sync
[19:56:31] [FAST_REFRESH] Already have 53 messages - skipping local DB load
[19:56:31] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[19:56:31] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:56:31] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[19:56:31] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=53
[19:56:31] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18442
[19:56:31] [INCREMENTAL_SYNC] ✅ No new messages
[19:56:31] [FAST_REFRESH] Incremental sync complete - 53 messages
[19:56:31] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[18442, 18390, 18391, 18392, 18393]
[19:56:31] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:56:31] [CELL_UPLOAD] → not my message, setting complete
[19:56:31] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:56:31] [COMBINED_FETCH] Loaded 7208 read receipts, 877 messages with reactions
[19:56:31] [FAST_REFRESH] Enriched 53 messages with readBy data
[19:56:31] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[18442, 18390, 18391, 18392, 18393]
[19:56:31] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:56:31] [CELL_UPLOAD] → not my message, setting complete
[19:56:31] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:56:32] [CLIENT_SIG] Client disconnected: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE) on session 'ILUIWU' (my session: 'ILUIWU')
[19:56:32] [CLIENT_SIG] Client disconnected: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE) on session 'ILUIWU' (my session: 'ILUIWU')
[19:56:32] [PUSH] Silent push received
[19:56:32] [PUSH_EMBED] 📩 Received embedded message: id=18442, type=0, sender=Esra
[19:56:32] [PUSH_EMBED] ✅ Saved message 18442 to local DB (sync)
[19:56:32] [PUSH_EMBED] Fetching evolution data for message 18442 in background
[19:56:32] [PUSH_EMBED] ✅ Fully processed message 18442
[19:56:32] [PUSH] Embedded message handled instantly from silent push
[19:56:32] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[19:56:32] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[19:56:32] [PUSH_UI] Message 18442 already in memory - skipping insert
[19:56:32] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 0, AnyHashable("message_id"): 18442, AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 18:56:25";
    "file_name" = "";
    message = "I want you to do 5 1-0s until tomorrow lunch time\Ud83d\Ude0f";
    "message_id" = 18442;
    "message_type" = 0;
    "prev_session_message_id" = 18441;
    "replied_message" = "If my baby is in the mood and wants to give me orders for tonight in bed and / or tomorrow morning at wake up and / or under shower, her slave will have no other choice than to obey. If my baby is less in the mood, then absolutely no problem \U2764\Ufe0f";
    "replied_sender_id" = "3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF";
    "replied_sender_name" = Laurent;
    "reply_to_id" = 18429;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}]
[19:56:32] [PUSH_EMBED_VC] Message 18442 already in memory - skipping
[19:56:32] [PUSH] ⚡ Embedded message handled directly in ViewController
[19:56:32] [PUSH] Parsed message_id: 18442
[19:56:32] [PUSH] Parsed operation_type: 0
[19:56:32] [PUSH] Taking direct action: opType=0, messageId=18442
[19:56:32] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18442
[19:56:32] [PUSH] ⚡ Message 18442 already in memory - skipping duplicate notification entirely
[19:56:32] [PUSH_EMBED] Got evolution data for message 18442, saving to local DB
[19:56:32] [PUSH_EMBED] Saved evolution data for message 18442
[19:56:32] [PUSH] Silent push received
[19:56:32] [PUSH_EMBED] No embedded message_data in notification
[19:56:32] [PUSH] No embedded data, pre-loading messages from server
[19:56:32] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:56:33] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:56:33] [PRELOAD_CACHE] Preserving 3 push-inserted messages: [18392, 18391, 18390]
[19:56:33] [PUSH_PRELOAD] ⚡ Pre-cached 53 messages for instant display (preserved 3 from push)
[19:56:33] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:56:33] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 18442, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}]
[19:56:33] [PUSH] Parsed message_id: 18442
[19:56:33] [PUSH] Parsed operation_type: 3
[19:56:33] [PUSH] Taking direct action: opType=3, messageId=18442
[19:56:33] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18442
[19:56:33] [CLIENT_SIG] Event received: type=3 messageId=18442
[19:56:33] [WS_EVENT] Received event: type=3, messageId=18442
[19:56:33] [WS_EVENT] Read receipt for message 18442 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:56:40] [WS] WebSocket task completed with error - isQueryOnly=true: The request timed out.
[19:56:40] [WS] Query connection error - cleaning up all agent connections and views
[19:56:40] [CLEANUP] ========================================
[19:56:40] [CLEANUP] Cleaning up all agent connections and views
[19:56:40] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[19:56:40] [CLEANUP] Stopped and removed 0 video connections
[19:56:40] [CLEANUP] Removed 0 video views
[19:56:40] [CLEANUP] Removed 0 feed scroll views
[19:56:40] [CLEANUP] Removed 0 status labels
[19:56:40] [CLEANUP] Reset agent query state
[19:56:40] [CLEANUP] Updated page indicator
[19:56:40] [CLEANUP] Rebuilt video layout
[19:56:40] [CLEANUP] ✅ All agent connections and views cleaned up
[19:56:40] [CLEANUP] ========================================
[19:56:40] [SERVER] Starting reconnect polling (5s interval)
[19:56:45] [SERVER] Polling - attempting to reconnect...
[19:56:48] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:56:48] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=53, isReloading=false
[19:56:48] [SEND_MESSAGE] ✅ Added optimistic message id=-6 to arrays, newMsgCount=54
[19:56:48] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[-6, 18442, 18441, 18440, 18439]
[19:56:48] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:56:48] [CELL_UPLOAD] → not my message, setting complete
[19:56:48] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:56:48] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:56:48] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:56:50] [CLIENT_SIG] Event received: type=0 messageId=18443
[19:56:50] [WS_EVENT] Received event: type=0, messageId=18443
[19:56:50] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18443,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:56:48"}
[19:56:50] [WS_EVENT] 📨 New message notification (msgId=18443) - triggering incremental refresh, currentMsgCount=54
[19:56:50] [CHAT] receive_message.php JSON: ["session_id": ILUIWU, "file_name": , "datesent_utc": 2026-01-21 18:56:48, "message_id": 18443, "ok": 1, "message_type": 0]
[19:56:50] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=54
[19:56:50] [DB_UPGRADE] Upgrading message ID: -6 → 18443, preserveOriginalDate=false
[19:56:50] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18442
[19:56:50] [DB_UPGRADE] ✅ Upgraded -6 → 18443 with send_status=0, 1 row(s) affected
[19:56:50] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -6 → 18443
[19:56:50] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -6 → 18443
[19:56:50] ReloadData 9
[19:56:50] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[19:56:50] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:56:50] [CELL_UPLOAD] → not my message, setting complete
[19:56:50] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:56:50] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[19:56:50] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=54
[19:56:50] [MENU] dismissAnyExistingMenu called
[19:56:50] [MENU] dismissAnyExistingMenu completed
[19:56:50] [EMOJI_PICKER] Starting emoji picker for message 18442
[19:56:50] [MENU] Created button 'Reply' at index 0
[19:56:50] [MENU] Created button 'Copy' at index 1
[19:56:50] [MENU] Created button 'Delete' at index 2
[19:56:50] [MENU] Menu added at y=539.0
[19:56:50] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[18390, 18391, 18392, 18393, 18394]
[19:56:50] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:56:50] [CELL_UPLOAD] → not my message, setting complete
[19:56:50] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:56:50] [EMOJI_PICKER] ✅ Fetched 6 recent emojis
[19:56:50] [EMOJI_PICKER] ✅ Creating picker with 6 recent emojis
[19:56:50] [EMOJI_PICKER] ✅ Picker shown at y=337.0
[19:56:50] [SERVER] Polling - attempting to reconnect...
[19:56:51] [REACTION] add 👄 to message 18442 (alreadyReacted: false)
[19:56:51] [MENU] dismissAnyExistingMenu called
[19:56:51] [MENU] Found menu with tag 9999, removing
[19:56:51] [MENU] Removing blur effect
[19:56:51] [MENU] Removing floating message snapshot
[19:56:51] [MENU] Dismissing emoji picker
[19:56:51] [MENU] Recorded dismissal time for debounce
[19:56:51] [MENU] dismissAnyExistingMenu completed
[19:56:52] [REACTION] Added 👄 reaction to message 18442
[19:56:54] [MENU] dismissAnyExistingMenu called
[19:56:54] [MENU] dismissAnyExistingMenu completed
[19:56:55] [SERVER] Polling - attempting to reconnect...
[19:56:58] [LOCK] Lock button tapped - locking app immediately
[19:56:58] [LOCK] Received lock app notification
[19:56:58] [LIFECYCLE] App resigning active - cleared crash flag
[19:56:59] [SECURITY] sceneDidEnterBackground - isAuthenticated=false
[19:56:59] [SECURITY] ⚠️ NOT saving timestamp - isAuthenticated is false
[19:56:59] [LIFECYCLE] App entering background - cleared crash flag
[19:56:59] [CLIENT_SIG] Disconnecting
[19:56:59] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[19:56:59] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=3
[19:56:59] [WS] Canceling WebSocket for query connection to iosILUIWU
[19:56:59] In cleanupPeer
[19:56:59] In cleanupPeer
[19:56:59] [LIFECYCLE] WebRTC audio disabled
[19:56:59] [LIFECYCLE] AVAudioSession deactivated
[19:56:59] [LIFECYCLE] All connections stopped
[19:56:59] [CLIENT_SIG] WebSocket closed with code 1001
[19:56:59] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[19:56:59] [SERVER] Stopped reconnect polling
[19:56:59] [WS] URLSession invalidated successfully
[19:56:59] Will request stop of video 0
[19:56:59] Will request stop of video 0
[19:56:59] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[19:56:59] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[19:56:59] [PIP] Removing 0 tracks from PiP for connection 0
[19:56:59] [PIP] ✅ All tracks removed for connection 0
[19:56:59] [PIP] Removing 0 tracks from PiP for connection 0
[19:56:59] [PIP] ✅ All tracks removed for connection 0
[19:57:42] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:57:42] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:57:42] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:57:42] [LIFECYCLE] App entering foreground - restoring connections
[19:57:42] [UPLOAD_RETRY] No pending uploads to retry
[19:57:42] [LIFECYCLE] Merged 869 reactions from local DB
[19:57:42] [LIFECYCLE] WebRTC audio re-enabled
[19:57:42] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:57:42] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:57:42] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:57:42] [VIEWER] Reconnecting after background - querying agents
[19:57:42] [UNSENT_RETRY] Checking for unsent messages...
[19:57:42] [PENDING_UPLOAD] Total pending upload messages: 0
[19:57:42] [UNSENT_RETRY] No unsent messages found
[19:57:43] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[18390, 18391, 18392, 18393, 18394]
[19:57:43] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:57:43] [CELL_UPLOAD] → not my message, setting complete
[19:57:43] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:57:43] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[19:57:43] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:57:43] [PUSH] handlePollEventsNotification userInfo: [:]
[19:57:43] [PUSH] No message_id in userInfo
[19:57:43] [PUSH] No operation_type in userInfo
[19:57:43] [FAST_REFRESH] Evolution disabled - performing incremental sync
[19:57:43] [FAST_REFRESH] Already have 54 messages - skipping local DB load
[19:57:43] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[19:57:43] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[19:57:43] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=54
[19:57:43] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18443
[19:57:43] [CLIENT_SIG] WebSocket opened
[19:57:43] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:57:43] [CLIENT_SIG] Connected! clientId=lBQOtIB-_p04CUVO
[19:57:43] [CLIENT_SIG] Received 2 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:57:43] [CLIENT_SIG]   - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:57:43] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:57:43] [INCREMENTAL_SYNC] ✅ No new messages
[19:57:43] [FAST_REFRESH] Incremental sync complete - 54 messages
[19:57:43] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[18390, 18391, 18392, 18393, 18394]
[19:57:43] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:57:43] [CELL_UPLOAD] → not my message, setting complete
[19:57:43] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:57:43] [PUSH] Silent push received
[19:57:43] [PUSH_EMBED] No embedded message_data in notification
[19:57:43] [PUSH] No embedded data, pre-loading messages from server
[19:57:43] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:57:43] [COMBINED_FETCH] Loaded 7209 read receipts, 878 messages with reactions
[19:57:43] [FOREGROUND] Enriched 1 messages with readBy data from server
[19:57:43] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:57:43] [PRELOAD_CACHE] Preserving 4 push-inserted messages: [18393, 18392, 18391, 18390]
[19:57:43] [PUSH_PRELOAD] ⚡ Pre-cached 54 messages for instant display (preserved 4 from push)
[19:57:43] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:57:43] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18443]
[19:57:43] [PUSH] Parsed message_id: 18443
[19:57:43] [PUSH] Parsed operation_type: 3
[19:57:43] [PUSH] Taking direct action: opType=3, messageId=18443
[19:57:43] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18443
[19:57:43] [COMBINED_FETCH] Loaded 7209 read receipts, 878 messages with reactions
[19:57:43] [FAST_REFRESH] Enriched 54 messages with readBy data
[19:57:43] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:57:43] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[18390, 18391, 18392, 18393, 18394]
[19:57:43] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:57:43] [CELL_UPLOAD] → not my message, setting complete
[19:57:43] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:57:44] [PIN_AUTH] Correct PIN
[19:57:44] [SECURITY] Restored real session: ILUIWU
[19:57:44] [SECURITY] Restored real session: ILUIWU
[19:57:44] [LOCK] ✅ PIN auth callback - setting isAuthenticated = true
[19:57:44] [AUTH] Authentication completed - updating UI only (data already fetched in foreground handler)
[19:57:44] [AUTH] Cache had 54 messages, maxExistingId=18443, inserted 0 truly new
[19:57:44] [AUTH] UI update complete
[19:57:44] [FAKE MODE] Exiting fake mode, restoring real session
[19:57:44] [SECURITY] Restored real session: ILUIWU
[19:57:44] [SECURITY] Saved real session: ILUIWU
[19:57:44] [FAKE MODE] ✅ Restored real session: ILUIWU
[19:57:44] [FAKE MODE] Loaded 50 messages (limited to page size)
[19:57:44] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":0,"removed_from_other_channels":0}
[19:57:44] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[19:57:44] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:57:44] [CELL_UPLOAD] → not my message, setting complete
[19:57:44] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:57:44] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18394, 18395, 18396, 18397, 18398]
[19:57:44] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:57:44] [CELL_UPLOAD] → not my message, setting complete
[19:57:44] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:57:44] [USER] ✅ User registered successfully
[19:57:44] [PUSH] User registration after token update: success
[19:57:45] [COMBINED_FETCH] Loaded 7209 read receipts, 878 messages with reactions
[19:57:45] [FAKE MODE] Enriched 50 messages with readBy data
[19:57:45] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18394, 18395, 18396, 18397, 18398]
[19:57:45] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:57:45] [CELL_UPLOAD] → not my message, setting complete
[19:57:45] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:57:47] [MENU] dismissAnyExistingMenu called
[19:57:47] [MENU] dismissAnyExistingMenu completed
[19:57:49] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:57:49] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:57:50] [CLIENT_SIG] Event received: type=0 messageId=18444
[19:57:50] [WS_EVENT] Received event: type=0, messageId=18444
[19:57:50] [WS_EVENT] 📨 New message notification (msgId=18444) - triggering incremental refresh, currentMsgCount=50
[19:57:50] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[19:57:50] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18443
[19:57:50] [PUSH_DEBUG] ⬇️ PUSH RECEIVED at 2026-01-21 18:57:50 +0000 - type: unknown, operation_type: 0, message_id: 18444, session_id: ILUIWU, state: 0
[19:57:50] [PUSH_DEBUG] Full userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 0, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 18:57:49";
    "file_name" = "";
    message = "You should start in 1 hr";
    "message_id" = 18444;
    "message_type" = 0;
    "prev_session_message_id" = 18443;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("message_id"): 18444]
[19:57:50] [PUSH] App active - suppressing notification UI, posting internal event
[19:57:50] [PUSH_EMBED] 📩 Received embedded message: id=18444, type=0, sender=Esra
[19:57:50] [PUSH_EMBED] ✅ Saved message 18444 to local DB (sync)
[19:57:50] [PUSH_EMBED] Created new cache with embedded message 18444
[19:57:50] [PUSH_EMBED] Fetching evolution data for message 18444 in background
[19:57:50] [PUSH_EMBED] ✅ Fully processed message 18444
[19:57:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 0, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 18:57:49";
    "file_name" = "";
    message = "You should start in 1 hr";
    "message_id" = 18444;
    "message_type" = 0;
    "prev_session_message_id" = 18443;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("message_id"): 18444]
[19:57:50] [PUSH_EMBED_VC] Processing embedded message: id=18444, type=0, sender=Esra, prevId=18443
[19:57:50] [PUSH_EMBED_VC] Inserted message 18444 into allMessagesWithReadBy (now 51 messages)
[19:57:50] [PUSH_EMBED_VC] ✅ Previous message 18443 exists in memory
[19:57:50] [PUSH] ⚡ Embedded message handled directly in ViewController
[19:57:50] [PUSH] Parsed message_id: 18444
[19:57:50] [PUSH] Parsed operation_type: 0
[19:57:50] [PUSH] Taking direct action: opType=0, messageId=18444
[19:57:50] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18444
[19:57:50] [PUSH] ⚡ Message 18444 already in memory - skipping duplicate notification entirely
[19:57:50] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[19:57:50] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[19:57:50] [PUSH_UI] Message 18444 already in memory - skipping insert
[19:57:50] [PUSH_EMBED_VC] Saved message 18444 to local DB
[19:57:50] [PUSH] Silent push received
[19:57:50] [PUSH_EMBED] 📩 Received embedded message: id=18444, type=0, sender=Esra
[19:57:50] [PUSH_EMBED] ✅ Saved message 18444 to local DB (sync)
[19:57:50] [PUSH_EMBED] Created new cache with embedded message 18444
[19:57:50] [PUSH_EMBED] Fetching evolution data for message 18444 in background
[19:57:50] [PUSH_EMBED] ✅ Fully processed message 18444
[19:57:50] [PUSH] Embedded message handled instantly from silent push
[19:57:50] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[19:57:50] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[19:57:50] [PUSH_UI] Message 18444 already in memory - skipping insert
[19:57:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 0, AnyHashable("aps"): {
    alert =     {
        body = "New message received";
        title = Eye;
    };
    badge = 1;
    "content-available" = 1;
    sound = default;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 18:57:49";
    "file_name" = "";
    message = "You should start in 1 hr";
    "message_id" = 18444;
    "message_type" = 0;
    "prev_session_message_id" = 18443;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("message_id"): 18444]
[19:57:50] [PUSH_EMBED_VC] Message 18444 already in memory - skipping
[19:57:50] [PUSH] ⚡ Embedded message handled directly in ViewController
[19:57:50] [PUSH] Parsed message_id: 18444
[19:57:50] [PUSH] Parsed operation_type: 0
[19:57:50] [PUSH] Taking direct action: opType=0, messageId=18444
[19:57:50] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18444
[19:57:50] [PUSH] ⚡ Message 18444 already in memory - skipping duplicate notification entirely
[19:57:50] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[19:57:50] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[19:57:50] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[19:57:50] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=51
[19:57:50] [PUSH_EMBED] Got evolution data for message 18444, saving to local DB
[19:57:50] [PUSH_EMBED] Saved evolution data for message 18444
[19:57:50] [PUSH_EMBED] Got evolution data for message 18444, saving to local DB
[19:57:50] [PUSH_EMBED] Saved evolution data for message 18444
[19:57:50] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[18394, 18395, 18396, 18397, 18398]
[19:57:50] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:57:50] [CELL_UPLOAD] → not my message, setting complete
[19:57:50] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:57:50] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18443 → 18444
[19:57:52] [PUSH] Silent push received
[19:57:52] [PUSH_EMBED] No embedded message_data in notification
[19:57:52] [PUSH] No embedded data, pre-loading messages from server
[19:57:52] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:57:52] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:57:52] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[19:57:52] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:57:52] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18444]
[19:57:52] [PUSH] Parsed message_id: 18444
[19:57:52] [PUSH] Parsed operation_type: 3
[19:57:52] [PUSH] Taking direct action: opType=3, messageId=18444
[19:57:52] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18444
[19:57:52] [CLIENT_SIG] Event received: type=3 messageId=18444
[19:57:52] [WS_EVENT] Received event: type=3, messageId=18444
[19:57:52] [WS_EVENT] Read receipt for message 18444 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:57:52] [SCROLL_BTN] Showing button - 310pt from bottom > half 223pt
[19:57:58] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:57:58] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=51, isReloading=false
[19:57:58] [SEND_MESSAGE] ✅ Added optimistic message id=-7 to arrays, newMsgCount=52
[19:57:58] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[-7, 18444, 18443, 18442, 18441]
[19:57:58] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:57:58] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:57:58] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[19:57:58] [CELL_UPLOAD] → not my message, setting complete
[19:57:58] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[19:58:00] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:58:00] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=52, isReloading=false
[19:58:00] [SEND_MESSAGE] ✅ Added optimistic message id=-8 to arrays, newMsgCount=53
[19:58:00] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[-8, -7, 18444, 18443, 18442]
[19:58:00] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:58:00] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:58:00] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18445,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:57:58"}
[19:58:00] [CHAT] receive_message.php JSON: ["datesent_utc": 2026-01-21 18:57:58, "message_type": 0, "file_name": , "ok": 1, "session_id": ILUIWU, "message_id": 18445]
[19:58:00] [DB_UPGRADE] Upgrading message ID: -7 → 18445, preserveOriginalDate=false
[19:58:00] [DB_UPGRADE] ✅ Upgraded -7 → 18445 with send_status=0, 1 row(s) affected
[19:58:00] [CLIENT_SIG] Event received: type=0 messageId=18445
[19:58:00] [WS_EVENT] Received event: type=0, messageId=18445
[19:58:00] [WS_EVENT] 📨 New message notification (msgId=18445) - triggering incremental refresh, currentMsgCount=53
[19:58:00] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=53
[19:58:00] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18445
[19:58:00] [SEND_UPGRADE] ✅ Updated chatMessages[1].id: -7 → 18445
[19:58:00] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[1].id: -7 → 18445
[19:58:00] ReloadData 9
[19:58:01] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[19:58:01] [INCREMENTAL_SYNC] Replaced optimistic message (id=-8) with server message (id=18446)
[19:58:01] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[19:58:01] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=53
[19:58:01] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[18394, 18395, 18396, 18397, 18398]
[19:58:02] [CLIENT_SIG] Event received: type=0 messageId=18446
[19:58:02] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18446,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:58:00"}
[19:58:02] [WS_EVENT] Received event: type=0, messageId=18446
[19:58:02] [WS_EVENT] 📨 New message notification (msgId=18446) - triggering incremental refresh, currentMsgCount=53
[19:58:02] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=53
[19:58:02] [CHAT] receive_message.php JSON: ["file_name": , "ok": 1, "datesent_utc": 2026-01-21 18:58:00, "session_id": ILUIWU, "message_id": 18446, "message_type": 0]
[19:58:02] [DB_UPGRADE] Upgrading message ID: -8 → 18446, preserveOriginalDate=false
[19:58:02] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18446
[19:58:02] [DB_UPGRADE] ⚠️ No rows affected - message -8 not found in DB
[19:58:02] [SEND_UPGRADE] ⚠️ Server ID 18446 already exists - removing provisional entry -8
[19:58:02] ReloadData 9
[19:58:02] [INCREMENTAL_SYNC] ✅ No new messages
[19:58:02] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=53
[19:58:03] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:58:03] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=53, isReloading=false
[19:58:03] [SEND_MESSAGE] ✅ Added optimistic message id=-9 to arrays, newMsgCount=54
[19:58:03] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[-9, 18446, 18445, 18444, 18443]
[19:58:03] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:58:03] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:58:05] [PUSH] Silent push received
[19:58:05] [PUSH_EMBED] No embedded message_data in notification
[19:58:05] [PUSH] No embedded data, pre-loading messages from server
[19:58:05] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:58:05] [PUSH] Silent push received
[19:58:05] [PUSH_EMBED] No embedded message_data in notification
[19:58:05] [PUSH] No embedded data, pre-loading messages from server
[19:58:05] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:58:05] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:58:05] [CLIENT_SIG] Event received: type=0 messageId=18447
[19:58:05] [WS_EVENT] Received event: type=0, messageId=18447
[19:58:05] [WS_EVENT] 📨 New message notification (msgId=18447) - triggering incremental refresh, currentMsgCount=54
[19:58:05] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=54
[19:58:05] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18447
[19:58:05] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:58:05] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=54, isReloading=true
[19:58:05] [SEND_MESSAGE] ✅ Added optimistic message id=-10 to arrays, newMsgCount=55
[19:58:05] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=55, first5Ids=[-10, -9, 18446, 18445, 18444]
[19:58:05] [PRELOAD_CACHE] Preserving 3 push-inserted messages: [18397, 18396, 18395]
[19:58:05] [PUSH_PRELOAD] ⚡ Pre-cached 53 messages for instant display (preserved 3 from push)
[19:58:05] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18447,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:58:03"}
[19:58:05] [CHAT] receive_message.php JSON: ["ok": 1, "session_id": ILUIWU, "message_id": 18447, "message_type": 0, "datesent_utc": 2026-01-21 18:58:03, "file_name": ]
[19:58:05] [DB_UPGRADE] Upgrading message ID: -9 → 18447, preserveOriginalDate=false
[19:58:05] [DB_UPGRADE] ❌ Step fail: UNIQUE constraint failed: local_messages.message_id
[19:58:05] [INCREMENTAL_SYNC] ✅ No new messages
[19:58:05] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:58:05] [PRELOAD_CACHE] Preserving 3 push-inserted messages: [18397, 18396, 18395]
[19:58:05] [PUSH_PRELOAD] ⚡ Pre-cached 53 messages for instant display (preserved 3 from push)
[19:58:05] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:58:05] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:58:05] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:58:05] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:58:05] ReloadData 9
[19:58:05] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18445, AnyHashable("session_id"): ILUIWU]
[19:58:05] [PUSH] Parsed message_id: 18445
[19:58:05] [PUSH] Parsed operation_type: 3
[19:58:05] [PUSH] Taking direct action: opType=3, messageId=18445
[19:58:05] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18445
[19:58:05] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18446, AnyHashable("aps"): {
    "content-available" = 1;
}]
[19:58:05] [PUSH] Parsed message_id: 18446
[19:58:05] [PUSH] Parsed operation_type: 3
[19:58:05] [PUSH] Taking direct action: opType=3, messageId=18446
[19:58:05] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18446
[19:58:05] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=55
[19:58:07] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[19:58:07] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=55, isReloading=false
[19:58:07] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18448,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:58:05"}
[19:58:07] [CHAT] receive_message.php JSON: ["message_id": 18448, "message_type": 0, "session_id": ILUIWU, "datesent_utc": 2026-01-21 18:58:05, "file_name": , "ok": 1]
[19:58:07] [DB_UPGRADE] Upgrading message ID: -10 → 18448, preserveOriginalDate=false
[19:58:07] [DB_UPGRADE] ✅ Upgraded -10 → 18448 with send_status=0, 1 row(s) affected
[19:58:07] [SEND_MESSAGE] ✅ Added optimistic message id=-11 to arrays, newMsgCount=56
[19:58:07] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=56, first5Ids=[-11, -10, 18447, 18446, 18445]
[19:58:07] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[19:58:07] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[19:58:07] [CLIENT_SIG] Event received: type=0 messageId=18448
[19:58:07] [WS_EVENT] Received event: type=0, messageId=18448
[19:58:07] [WS_EVENT] 📨 New message notification (msgId=18448) - triggering incremental refresh, currentMsgCount=56
[19:58:07] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=56
[19:58:07] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18448
[19:58:07] [SEND_UPGRADE] ✅ Updated chatMessages[1].id: -10 → 18448
[19:58:07] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[1].id: -10 → 18448
[19:58:07] ReloadData 9
[19:58:08] [CLIENT_SIG] Event received: type=3 messageId=18445
[19:58:08] [WS_EVENT] Received event: type=3, messageId=18445
[19:58:08] [WS_EVENT] Read receipt for message 18445 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:58:08] [INCREMENTAL_SYNC] ✅ No new messages
[19:58:08] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=56
[19:58:08] [CLIENT_SIG] Event received: type=3 messageId=18446
[19:58:08] [WS_EVENT] Received event: type=3, messageId=18446
[19:58:08] [WS_EVENT] Read receipt for message 18446 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:58:09] [LIFECYCLE] App resigning active - cleared crash flag
[19:58:09] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[19:58:09] [SECURITY] Saved background timestamp
[19:58:09] [LIFECYCLE] App entering background - cleared crash flag
[19:58:09] [CLIENT_SIG] Disconnecting
[19:58:09] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[19:58:09] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=-1
[19:58:09] In cleanupPeer
[19:58:09] In cleanupPeer
[19:58:09] [LIFECYCLE] WebRTC audio disabled
[19:58:09] [LIFECYCLE] AVAudioSession deactivated
[19:58:09] [LIFECYCLE] All connections stopped
[19:58:09] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18449,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 18:58:08"}
[19:58:09] [CHAT] receive_message.php JSON: ["datesent_utc": 2026-01-21 18:58:08, "ok": 1, "session_id": ILUIWU, "message_type": 0, "message_id": 18449, "file_name": ]
[19:58:09] [DB_UPGRADE] Upgrading message ID: -11 → 18449, preserveOriginalDate=false
[19:58:09] [DB_UPGRADE] ⚠️ No rows affected - message -11 not found in DB
[19:58:10] [CLIENT_SIG] WebSocket closed with code 1001
[19:58:10] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[19:58:10] [SERVER] Stopped reconnect polling
[19:58:10] Will request stop of video 0
[19:58:10] Will request stop of video 0
[19:58:10] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[19:58:10] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[19:58:10] ReloadData 9
[19:58:10] [PIP] Removing 0 tracks from PiP for connection 0
[19:58:10] [PIP] ✅ All tracks removed for connection 0
[19:58:10] [PIP] Removing 0 tracks from PiP for connection 0
[19:58:10] [PIP] ✅ All tracks removed for connection 0
[19:58:10] [PUSH] Silent push received
[19:58:10] [PUSH_EMBED] No embedded message_data in notification
[19:58:10] [PUSH] No embedded data, pre-loading messages from server
[19:58:10] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:58:10] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:58:10] [PRELOAD_CACHE] Preserving 5 push-inserted messages: [18399, 18398, 18397, 18396, 18395]
[19:58:10] [PUSH_PRELOAD] ⚡ Pre-cached 55 messages for instant display (preserved 5 from push)
[19:58:10] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:58:10] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 18448, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU]
[19:58:10] [PUSH] Parsed message_id: 18448
[19:58:10] [PUSH] Parsed operation_type: 3
[19:58:10] [PUSH] Taking direct action: opType=3, messageId=18448
[19:58:10] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18448
[19:58:11] [SECURITY] Timeout check: elapsed=1.158776044845581s, timeout=300.0s
[19:58:11] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[19:58:11] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:58:11] [LIFECYCLE] App entering foreground - restoring connections
[19:58:11] [UPLOAD_RETRY] No pending uploads to retry
[19:58:11] [LIFECYCLE] Merged 869 reactions from local DB
[19:58:11] [LIFECYCLE] WebRTC audio re-enabled
[19:58:11] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[19:58:11] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[19:58:11] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:58:11] [VIEWER] Reconnecting after background - querying agents
[19:58:11] [UNSENT_RETRY] Checking for unsent messages...
[19:58:11] [PENDING_UPLOAD] Total pending upload messages: 0
[19:58:11] [UNSENT_RETRY] No unsent messages found
[19:58:11] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=56, first5Ids=[18449, 18448, 18447, 18446, 18445]
[19:58:11] [SECURITY] sceneDidBecomeActive - isAuthenticated=true, didEnterBackground=true
[19:58:11] [SECURITY] Within timeout - cleared background flag
[19:58:11] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[19:58:11] [PUSH] handlePollEventsNotification userInfo: [:]
[19:58:11] [PUSH] No message_id in userInfo
[19:58:11] [PUSH] No operation_type in userInfo
[19:58:11] [FAST_REFRESH] Evolution disabled - performing incremental sync
[19:58:11] [FAST_REFRESH] Already have 56 messages - skipping local DB load
[19:58:11] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[19:58:11] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[19:58:11] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=56
[19:58:11] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18449
[19:58:11] [CLIENT_SIG] WebSocket opened
[19:58:11] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:58:11] [CLIENT_SIG] Connected! clientId=5KHq4QHIBphAc-Vv
[19:58:11] [CLIENT_SIG] Received 2 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:58:11] [CLIENT_SIG]   - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:58:11] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:58:11] [INCREMENTAL_SYNC] ✅ No new messages
[19:58:11] [FAST_REFRESH] Incremental sync complete - 56 messages
[19:58:11] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=56, first5Ids=[18449, 18448, 18447, 18446, 18445]
[19:58:11] [CLIENT_SIG] Event received: type=3 messageId=18448
[19:58:11] [WS_EVENT] Received event: type=3, messageId=18448
[19:58:11] [WS_EVENT] Read receipt for message 18448 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:58:11] [COMBINED_FETCH] Loaded 7215 read receipts, 878 messages with reactions
[19:58:11] [FOREGROUND] Enriched 2 messages with readBy data from server
[19:58:11] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=56, first5Ids=[18449, 18448, 18447, 18446, 18445]
[19:58:11] [COMBINED_FETCH] Loaded 7215 read receipts, 878 messages with reactions
[19:58:11] [FAST_REFRESH] Enriched 56 messages with readBy data
[19:58:12] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=56, first5Ids=[18449, 18448, 18447, 18446, 18445]
[19:58:12] [MUTE] Status sent to server: muted=1, response code=200
[19:58:12] [MUTE] Status sent to server: muted=1, response code=200
[19:58:12] [PUSH] Silent push received
[19:58:12] [PUSH_EMBED] No embedded message_data in notification
[19:58:12] [PUSH] No embedded data, pre-loading messages from server
[19:58:12] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:58:12] [PUSH] Silent push received
[19:58:12] [PUSH_EMBED] No embedded message_data in notification
[19:58:12] [PUSH] No embedded data, pre-loading messages from server
[19:58:12] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:58:12] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:58:12] [PRELOAD_CACHE] Preserving 5 push-inserted messages: [18399, 18398, 18397, 18396, 18395]
[19:58:12] [PUSH_PRELOAD] ⚡ Pre-cached 55 messages for instant display (preserved 5 from push)
[19:58:12] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:58:12] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18447, AnyHashable("aps"): {
    "content-available" = 1;
}]
[19:58:12] [PUSH] Parsed message_id: 18447
[19:58:12] [PUSH] Parsed operation_type: 3
[19:58:12] [PUSH] Taking direct action: opType=3, messageId=18447
[19:58:12] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18447
[19:58:12] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:58:12] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:58:12] [PRELOAD_CACHE] Preserving 5 push-inserted messages: [18399, 18398, 18397, 18396, 18395]
[19:58:12] [PUSH_PRELOAD] ⚡ Pre-cached 55 messages for instant display (preserved 5 from push)
[19:58:12] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:58:12] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 18449, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3]
[19:58:12] [PUSH] Parsed message_id: 18449
[19:58:12] [PUSH] Parsed operation_type: 3
[19:58:12] [PUSH] Taking direct action: opType=3, messageId=18449
[19:58:12] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18449
[19:58:13] [LOCK] Lock button tapped - locking app immediately
[19:58:13] [LOCK] Received lock app notification
[19:58:13] [CLIENT_SIG] Event received: type=3 messageId=18447
[19:58:13] [WS_EVENT] Received event: type=3, messageId=18447
[19:58:13] [WS_EVENT] Read receipt for message 18447 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:58:13] [CLIENT_SIG] Event received: type=3 messageId=18449
[19:58:13] [WS_EVENT] Received event: type=3, messageId=18449
[19:58:13] [WS_EVENT] Read receipt for message 18449 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:58:13] [LIFECYCLE] App resigning active - cleared crash flag
[19:58:14] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[19:58:14] [SECURITY] sceneDidEnterBackground - isAuthenticated=false
[19:58:14] [SECURITY] ⚠️ NOT saving timestamp - isAuthenticated is false
[19:58:14] [LIFECYCLE] App entering background - cleared crash flag
[19:58:14] [CLIENT_SIG] Disconnecting
[19:58:14] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[19:58:14] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=-1
[19:58:14] In cleanupPeer
[19:58:14] In cleanupPeer
[19:58:14] [LIFECYCLE] WebRTC audio disabled
[19:58:14] [LIFECYCLE] AVAudioSession deactivated
[19:58:14] [LIFECYCLE] All connections stopped
[19:58:14] [CLIENT_SIG] WebSocket closed with code 1001
[19:58:14] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[19:58:14] [SERVER] Stopped reconnect polling
[19:58:14] Will request stop of video 0
[19:58:14] Will request stop of video 0
[19:58:14] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[19:58:14] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[19:58:14] [PIP] Removing 0 tracks from PiP for connection 0
[19:58:14] [PIP] ✅ All tracks removed for connection 0
[19:58:14] [PIP] Removing 0 tracks from PiP for connection 0
[19:58:14] [PIP] ✅ All tracks removed for connection 0
[19:58:15] [PUSH] Silent push received
[19:58:15] [PUSH_EMBED] 📩 Received embedded message: id=18450, type=0, sender=Esra
[19:58:15] [PUSH_EMBED] ✅ Saved message 18450 to local DB (sync)
[19:58:15] [PUSH_EMBED] Inserted message 18450 into existing cache (now 56 messages)
[19:58:15] [PUSH_EMBED] Fetching evolution data for message 18450 in background
[19:58:15] [PUSH_EMBED] ✅ Fully processed message 18450
[19:58:15] [PUSH] Embedded message handled instantly from silent push
[19:58:15] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[19:58:15] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[19:58:15] [PUSH_UI] Inserted message 18450 into UI (now 57 messages)
[19:58:15] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 0, AnyHashable("message_data"): {
    datesent = "2026-01-21 18:58:12";
    "file_name" = "";
    message = "For the next sessions I\U2019ll let you know \Ud83d\Ude0f";
    "message_id" = 18450;
    "message_type" = 0;
    "prev_session_message_id" = 18449;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("message_id"): 18450, AnyHashable("session_id"): ILUIWU]
[19:58:15] [PUSH_EMBED_VC] Message 18450 already in memory - skipping
[19:58:15] [PUSH] ⚡ Embedded message handled directly in ViewController
[19:58:15] [PUSH] Parsed message_id: 18450
[19:58:15] [PUSH] Parsed operation_type: 0
[19:58:15] [PUSH] Taking direct action: opType=0, messageId=18450
[19:58:15] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18450
[19:58:15] [PUSH] ⚡ Message 18450 already in memory - skipping duplicate notification entirely
[19:58:15] [PUSH_EMBED] Got evolution data for message 18450, saving to local DB
[19:58:15] [PUSH_EMBED] Saved evolution data for message 18450
[19:58:16] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=57, first5Ids=[18450, 18449, 18448, 18447, 18446]
[19:58:16] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18449 → 18450
[19:58:19] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:58:19] [PUSH] Silent push received
[19:58:19] [PUSH_EMBED] No embedded message_data in notification
[19:58:19] [PUSH] No embedded data, pre-loading messages from server
[19:58:19] [PUSH_PRELOAD] Fetching messages for instant display cache
[19:58:19] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[19:58:19] [PRELOAD_CACHE] Preserving 6 push-inserted messages: [18400, 18399, 18398, 18397, 18396, 18395]
[19:58:19] [PUSH_PRELOAD] ⚡ Pre-cached 56 messages for instant display (preserved 6 from push)
[19:58:19] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[19:58:19] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 18450, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3]
[19:58:19] [PUSH] Parsed message_id: 18450
[19:58:19] [PUSH] Parsed operation_type: 3
[19:58:19] [PUSH] Taking direct action: opType=3, messageId=18450
[19:58:19] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18450
[19:58:19] [CLIENT_SIG] WebSocket opened
[19:58:19] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[19:58:19] [CLIENT_SIG] Connected! clientId=wYUFmhOjUWwRE-JO
[19:58:19] [CLIENT_SIG] Received 2 clients for session 'ILUIWU' (my session: 'ILUIWU')
[19:58:19] [CLIENT_SIG]   - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[19:58:19] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[19:58:19] [CLIENT_SIG] Event received: type=3 messageId=18450
[19:58:19] [WS_EVENT] Received event: type=3, messageId=18450
[19:58:19] [WS_EVENT] Read receipt for message 18450 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:00:49] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[20:00:49] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[20:00:49] [LIFECYCLE] App entering foreground - restoring connections
[20:00:49] [LIFECYCLE] Away > 2 minutes (154s) - will scroll to bottom
[20:00:49] [UPLOAD_RETRY] No pending uploads to retry
[20:00:49] [LIFECYCLE] Merged 869 reactions from local DB
[20:00:49] [LIFECYCLE] WebRTC audio re-enabled
[20:00:49] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[20:00:49] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[20:00:49] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[20:00:49] [VIEWER] Reconnecting after background - querying agents
[20:00:49] [UNSENT_RETRY] Checking for unsent messages...
[20:00:49] [PENDING_UPLOAD] Total pending upload messages: 0
[20:00:49] [UNSENT_RETRY] No unsent messages found
[20:00:49] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSDescription=Software caused connection abort}
[20:00:49] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[20:00:49] [CLIENT_SIG] Task completed with error: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSDescription=Software caused connection abort, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalWebSocketTask <993FA04D-7827-4411-B1BC-9A841D07A0D8>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <993FA04D-7827-4411-B1BC-9A841D07A0D8>.<1>}
[20:00:49] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[20:00:49] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=57, first5Ids=[18450, 18449, 18448, 18447, 18446]
[20:00:49] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[20:00:49] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[20:00:49] [PUSH] handlePollEventsNotification userInfo: [:]
[20:00:49] [PUSH] No message_id in userInfo
[20:00:49] [PUSH] No operation_type in userInfo
[20:00:49] [FAST_REFRESH] Evolution disabled - performing incremental sync
[20:00:49] [FAST_REFRESH] Already have 57 messages - skipping local DB load
[20:00:49] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[20:00:49] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[20:00:49] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=57
[20:00:49] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18450
[20:00:49] [INCREMENTAL_SYNC] ✅ No new messages
[20:00:49] [FAST_REFRESH] Incremental sync complete - 57 messages
[20:00:49] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=57, first5Ids=[18450, 18449, 18448, 18447, 18446]
[20:00:49] [COMBINED_FETCH] Loaded 7216 read receipts, 878 messages with reactions
[20:00:49] [FOREGROUND] Enriched 0 messages with readBy data from server
[20:00:49] [COMBINED_FETCH] Loaded 7216 read receipts, 878 messages with reactions
[20:00:49] [FAST_REFRESH] Enriched 57 messages with readBy data
[20:00:49] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[20:00:50] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=57, first5Ids=[18450, 18449, 18448, 18447, 18446]
[20:00:50] [PIN_AUTH] Correct PIN
[20:00:50] [SECURITY] Restored real session: ILUIWU
[20:00:50] [SECURITY] Restored real session: ILUIWU
[20:00:50] [LOCK] ✅ PIN auth callback - setting isAuthenticated = true
[20:00:50] [AUTH] Authentication completed - updating UI only (data already fetched in foreground handler)
[20:00:50] [AUTH] Cache had 56 messages, maxExistingId=18450, inserted 0 truly new
[20:00:50] [AUTH] UI update complete
[20:00:50] [FAKE MODE] Exiting fake mode, restoring real session
[20:00:50] [SECURITY] Restored real session: ILUIWU
[20:00:50] [SECURITY] Saved real session: ILUIWU
[20:00:50] [FAKE MODE] ✅ Restored real session: ILUIWU
[20:00:50] [FAKE MODE] Loaded 0 messages (limited to page size)
[20:00:50] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:00:50] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[20:00:50] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[20:00:50] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[20:00:50] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:00:50] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[20:00:50] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:00:50] [USER] ✅ User registered successfully
[20:00:50] [PUSH] User registration after token update: success
[20:00:51] [COMBINED_FETCH] Loaded 7216 read receipts, 878 messages with reactions
[20:00:51] [FAKE MODE] Enriched 0 messages with readBy data
[20:00:51] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[20:00:51] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[20:00:51] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[20:00:51] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:00:52] [MENU] dismissAnyExistingMenu called
[20:00:52] [MENU] dismissAnyExistingMenu completed
[20:00:53] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:00:53] [CLIENT_SIG] WebSocket opened
[20:00:53] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[20:00:53] [CLIENT_SIG] Connected! clientId=okkxCZ77TkCADLU0
[20:00:53] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[20:00:53] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:00:54] [MENU] dismissAnyExistingMenu called
[20:00:54] [MENU] dismissAnyExistingMenu completed
[20:00:54] [CHAT] top pull-to-refresh triggered on tab 0
[20:00:54] [REFRESH_ALL] 🔄 refreshAllFromServer called from: pullToRefresh, currentMsgCount=0
[20:00:54] [REFRESH_ALL] 📸 Captured 0 message IDs before request
[20:00:54] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:00:54] [REFRESH_ALL] 🔄 refreshAllFromServer called from: editMessage, currentMsgCount=0
[20:00:54] [REFRESH_ALL] ⚠️ Already reloading - skipping request from: editMessage
[20:00:54] [PENDING_UPLOAD] Total pending upload messages: 0
[20:00:54] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[20:00:54] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[20:00:54] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[20:00:54] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[20:00:54] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:00:55] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[20:00:55] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[20:00:55] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[20:00:55] DOWNLOADIIING t_bae538c2a3076c11.jpg
[20:00:55] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[20:00:55] DOWNLOADIIING t_5cfd84d52271d308.jpg
[20:00:55] DOWNLOADIIING t_919f4df51be24b2c.jpg
[20:00:55] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[20:00:55] DOWNLOADIIING t_32675c319a37fee7.jpg
[20:00:55] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[20:00:55] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[20:00:55] DOWNLOADIIING t_abb65f630e55dc61.jpg
[20:00:55] DOWNLOADIIING t_2a4c7380908d6595.jpg
[20:00:55] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[20:00:55] DOWNLOADIIING t_02f48c94671cc64e.jpg
[20:00:55] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[20:00:55] DOWNLOADIIING t_364b0669ed2f3378.jpg
[20:00:55] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[20:00:55] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[20:00:55] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[20:00:55] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[20:00:55] DOWNLOADIIING t_722d39e0d91dd954.jpg
[20:00:55] DOWNLOADIIING t_97828ef5de49a612.jpg
[20:00:55] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[20:00:55] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7216
[20:00:55] [REFRESH_ALL] 📊 Server returned 7216 messages
[20:00:55] [REFRESH_ALL] 📊 Final merge: server=7216, preserved=0, total=7216
[20:00:55] [REFRESH_ALL] 📊 Displaying 50 of 7216 messages, hasMore=true
[20:00:55] [PULL_REFRESH] Loaded 50 messages (first page), displaying 50 for tab 0, hasMore: true
[20:00:55] ReloadData 15 (pull-to-refresh completed)
[20:00:55] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18401, 18402, 18403, 18404, 18405]
[20:00:55] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:00:55] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:00:55] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[20:00:55] [SCROLL_BTN] Showing button - 4813pt from bottom > half 379pt
[20:00:56] [COMBINED_FETCH] Loaded 7216 read receipts, 878 messages with reactions
[20:00:58] [SCROLL_BTN] Showing button - 310pt from bottom > half 223pt
[20:00:59] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[20:00:59] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18401, 18402, 18403, 18404, 18405]
[20:01:11] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[20:01:11] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=50, isReloading=false
[20:01:11] [SEND_MESSAGE] ✅ Added optimistic message id=-12 to arrays, newMsgCount=51
[20:01:11] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[-12, 18450, 18449, 18448, 18447]
[20:01:11] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[20:01:11] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[20:01:13] [CLIENT_SIG] Event received: type=0 messageId=18451
[20:01:13] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18451,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 19:01:11"}
[20:01:13] [WS_EVENT] Received event: type=0, messageId=18451
[20:01:13] [CHAT] receive_message.php JSON: ["ok": 1, "datesent_utc": 2026-01-21 19:01:11, "message_id": 18451, "message_type": 0, "session_id": ILUIWU, "file_name": ]
[20:01:13] [WS_EVENT] 📨 New message notification (msgId=18451) - triggering incremental refresh, currentMsgCount=51
[20:01:13] [DB_UPGRADE] Upgrading message ID: -12 → 18451, preserveOriginalDate=false
[20:01:13] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[20:01:13] [DB_UPGRADE] ✅ Upgraded -12 → 18451 with send_status=0, 1 row(s) affected
[20:01:13] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18451
[20:01:13] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -12 → 18451
[20:01:13] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -12 → 18451
[20:01:13] ReloadData 9
[20:01:13] [INCREMENTAL_SYNC] ✅ No new messages
[20:01:13] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=51
[20:01:13] [LOCK] Lock button tapped - locking app immediately
[20:01:13] [LOCK] Received lock app notification
[20:01:14] [LIFECYCLE] App resigning active - cleared crash flag
[20:01:15] [SECURITY] sceneDidEnterBackground - isAuthenticated=false
[20:01:15] [SECURITY] ⚠️ NOT saving timestamp - isAuthenticated is false
[20:01:15] [LIFECYCLE] App entering background - cleared crash flag
[20:01:15] [CLIENT_SIG] Disconnecting
[20:01:15] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[20:01:15] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=-1
[20:01:15] In cleanupPeer
[20:01:15] In cleanupPeer
[20:01:15] [LIFECYCLE] WebRTC audio disabled
[20:01:15] [LIFECYCLE] AVAudioSession deactivated
[20:01:15] [LIFECYCLE] All connections stopped
[20:01:15] [CLIENT_SIG] WebSocket closed with code 1001
[20:01:15] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[20:01:15] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}[20:27:54] [LOG] Pruned 1247 entries older than 3 hours
[20:27:54] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[20:27:54] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[20:27:54] [GIPHY] SDK not available - using REST API fallback
[20:27:54] [BACKGROUND] Background fetch enabled
[20:27:54] [AUTH] Starting PIN authentication
[20:27:54] [BACKGROUND] Background fetch triggered
[20:27:54] [BACKGROUND] Fetching recent messages for pre-cache
[20:27:54] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[20:27:54] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[20:27:54] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[20:27:54] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:27:54] [USER] ✅ User registered successfully
[20:27:54] [PUSH] User registration after token update: success
[20:27:54] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18451)...
[20:27:54] [BACKGROUND] Fetched 50 messages - saving to DB and pre-caching
[20:27:54] [BACKGROUND] Pre-cached 50 ChatMessage objects for instant display (preserved 0 from push)
[20:27:54] [PRELOAD] No messages or parse error
[20:27:54] [BACKGROUND] Pre-downloaded 0 thumbnails
[20:27:54] [BACKGROUND] ✅ Background fetch complete with thumbnail pre-download
[20:32:45] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[20:32:45] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:32:45] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[20:32:45] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[20:32:45] [CLIENT_SIG] WebSocket opened
[20:32:45] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[20:32:45] [CLIENT_SIG] Connected! clientId=JAy_YtbIAiyhsc_3
[20:32:45] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[20:32:45] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)[20:32:46] [LOG] Pruned 1603 entries older than 3 hours
[20:32:46] [SECURITY] Restored real session: ILUIWU
[20:32:46] [SECURITY] Restored real session: ILUIWU
[20:32:47] [SECURITY] Saved real session: ILUIWU
[20:32:47] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[20:32:47] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[20:32:47] Documents Directory: /var/mobile/Containers/Data/Application/FEAD2E1F-C4A1-4969-9070-16A67DA77312/Documents
[20:32:47] [THEME] Applying current theme
[20:32:47] [CHAT] Applied day theme (mode: day)
[20:32:47] [SECURITY] Saved real session: ILUIWU
[20:32:47] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[20:32:47] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[20:32:47] [NETWORK] Network monitor started
[20:32:47] [NETWORK] Status changed: connected
[20:32:47] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[20:32:47] Did transition
[20:32:47] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[20:32:47] [VIEWER] Screen lock enabled - normal idle behavior
[20:32:47] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[20:32:47] [VCC] ========== VideoConnectionClass INIT ==========
[20:32:47] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[20:32:47] [DATA AUDIO] ========== setupWebRTC() START ==========
[20:32:47] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[20:32:47] [DATA AUDIO] Creating encoder/decoder factories...
[20:32:47] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[20:32:47] [CODEC] Viewer selected encoder: AV1 (best quality)
[20:32:47] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[20:32:47] [DATA AUDIO] ✅ Factory created
[20:32:47] [DATA AUDIO] RTCAudioSession locked
[20:32:47] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[20:32:47] [DATA AUDIO] RTCAudioSession unlocked
[20:32:47] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[20:32:47] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[20:32:47] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[20:32:47] [WS] Opening session at ws://crivello.dyndns.org:8081/
[20:32:47] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[20:32:47] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[20:32:47] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[20:32:47] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[20:32:47] Did transition
[20:32:47] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:32:47] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:32:47] [CHUNK] Merged 884 reactions synchronously
[20:32:47] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[20:32:47] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[20:32:47] [MIGRATION] No messages need sender_name backfill
[20:32:47] [GALLERY_DB] ✅ Loaded 0 media messages
[20:32:47] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[20:32:47] [GALLERY] Filtered 0 -> 0 (only with local thumbnails)
[20:32:47] [GALLERY] First 5 after sort (newest first):
[20:32:47] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18451
[20:32:47] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[20:32:47] [SERVER] Starting reconnect polling (5s interval)
[20:32:47] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[20:32:47] [ICONS] Offset applied: -14.6
[20:32:47] [ICONS] New left margin: 11.2, New right margin: 11.3
[20:32:47] [INCREMENTAL_SYNC] ✅ No new messages
[20:32:47] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[20:32:47] [UNSENT_RETRY] Checking for unsent messages...
[20:32:47] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[20:32:47] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:32:47] [UPLOAD_RECOVERY] Session: ILUIWU
[20:32:47] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[20:32:47] [UPLOAD_RECOVERY] Checking recent media messages on server...
[20:32:47] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[20:32:47] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[20:32:47] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[20:32:47] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[20:32:47] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[20:32:47] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[20:32:47] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[20:32:47] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[20:32:47] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[20:32:47] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[20:32:47] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[20:32:47] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[20:32:47] [PENDING_UPLOAD] Total pending upload messages: 0
[20:32:47] [UNSENT_RETRY] No unsent messages found
[20:32:47] [UPLOAD_RECOVERY] ✅ All media files verified on server
[20:32:47] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18402, 18403, 18404, 18405, 18406]
[20:32:47] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[20:32:47] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:32:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:32:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[20:32:47] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:32:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:32:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[20:32:47] [ICONS] Chat center: (31.2, 87.0)
[20:32:47] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[20:32:47] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[20:32:47] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[20:32:47] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[20:32:47] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[20:32:47] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[20:32:47] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[20:32:47] [ICONS] Screen width: 440.0
[20:32:47] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[20:32:47] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:32:47] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:32:47] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[20:32:47] [USER] ✅ User registered successfully
[20:32:47] [USER] User registration successful
[20:32:47] new_session POST ok: token len=157
[20:32:47] HELLO → sent (fetched token, role=query)
[20:32:47] [SIG] hello_ok received for query connection - ready to query agents
[20:32:47] [SIG] get_agents request sent for sessionId=ILUIWU
[20:32:47] [SIG] get_agents request sent for sessionId=iosILUIWU
[20:32:47] [SERVER] Stopped reconnect polling
[20:32:47] [SIG] agents_list received: []
[20:32:47] [SIG] agents_list received: []
[20:32:47] [COMBINED_FETCH] Loaded 7217 read receipts, 878 messages with reactions
[20:32:47] [READBY_ENRICH] Enriched 50 messages with readBy data
[20:32:47] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18402, 18403, 18404, 18405, 18406]
[20:32:52] [MENU] dismissAnyExistingMenu called
[20:32:52] [MENU] dismissAnyExistingMenu completed
[20:32:54] [MENU] dismissAnyExistingMenu called
[20:32:54] [MENU] dismissAnyExistingMenu completed
[20:33:01] [SCROLL_BTN] Showing button - 306pt from bottom > half 223pt
[20:33:07] [SCROLL_BTN] Showing button - 310pt from bottom > half 223pt
[20:33:14] [LIFECYCLE] App resigning active - cleared crash flag
[20:33:14] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[20:33:14] [SECURITY] Saved background timestamp
[20:33:14] [LIFECYCLE] App entering background - cleared crash flag
[20:33:14] [CLIENT_SIG] Disconnecting
[20:33:14] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[20:33:14] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[20:33:14] [WS] Canceling WebSocket for query connection to iosILUIWU
[20:33:14] In cleanupPeer
[20:33:14] In cleanupPeer
[20:33:14] [LIFECYCLE] WebRTC audio disabled
[20:33:14] [LIFECYCLE] AVAudioSession deactivated
[20:33:14] [LIFECYCLE] All connections stopped
[20:33:14] [CLIENT_SIG] WebSocket closed with code 1001
[20:33:14] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[20:33:14] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[20:33:14] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[20:33:14] [SERVER] Stopped reconnect polling
[20:33:14] [WS] WebSocket task completed with error - isQueryOnly=true: cancelled
[20:33:14] [WS] Query connection error - cleaning up all agent connections and views
[20:33:14] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[20:33:14] [WS] Query connection failed - cleaning up all agent connections and views
[20:33:14] Will request stop of video 0
[20:33:14] Will request stop of video 0
[20:33:14] [CLEANUP] ========================================
[20:33:14] [CLEANUP] Cleaning up all agent connections and views
[20:33:14] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[20:33:14] [CLEANUP] Stopped and removed 0 video connections
[20:33:14] [CLEANUP] Removed 0 video views
[20:33:14] [CLEANUP] Removed 0 feed scroll views
[20:33:14] [CLEANUP] Removed 0 status labels
[20:33:14] [CLEANUP] Reset agent query state
[20:33:14] [CLEANUP] Updated page indicator
[20:33:14] [CLEANUP] Rebuilt video layout
[20:33:14] [CLEANUP] ✅ All agent connections and views cleaned up
[20:33:14] [CLEANUP] ========================================
[20:33:14] [SERVER] Skipping reconnect polling - app is in background
[20:33:14] [WS] URLSession invalidated successfully
[20:33:14] [CLEANUP] ========================================
[20:33:14] [CLEANUP] Cleaning up all agent connections and views
[20:33:14] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[20:33:14] [CLEANUP] Stopped and removed 0 video connections
[20:33:14] [CLEANUP] Removed 0 video views
[20:33:14] [CLEANUP] Removed 0 feed scroll views
[20:33:14] [CLEANUP] Removed 0 status labels
[20:33:14] [CLEANUP] Reset agent query state
[20:33:14] [CLEANUP] Updated page indicator
[20:33:14] [CLEANUP] Rebuilt video layout
[20:33:14] [CLEANUP] ✅ All agent connections and views cleaned up
[20:33:14] [CLEANUP] ========================================
[20:33:14] [SERVER] Skipping reconnect polling - app is in background
[20:33:14] [PIP] Removing 0 tracks from PiP for connection 0
[20:33:14] [PIP] ✅ All tracks removed for connection 0
[20:33:14] [PIP] Removing 0 tracks from PiP for connection 0
[20:33:14] [PIP] ✅ All tracks removed for connection 0
[20:33:41] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[20:33:41] [WS] Opening session at ws://crivello.dyndns.org:8081/
[20:33:41] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:33:43] [SECURITY] Timeout check: elapsed=29.42506694793701s, timeout=300.0s
[20:33:43] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[20:33:43] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[20:33:43] [LIFECYCLE] App entering foreground - restoring connections
[20:33:43] [UPLOAD_RETRY] No pending uploads to retry
[20:33:43] [LIFECYCLE] Merged 884 reactions from local DB
[20:33:43] [LIFECYCLE] WebRTC audio re-enabled
[20:33:43] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[20:33:43] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[20:33:43] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[20:33:43] [VIEWER] Reconnecting after background - querying agents
[20:33:43] [UNSENT_RETRY] Checking for unsent messages...
[20:33:43] [PENDING_UPLOAD] Total pending upload messages: 0
[20:33:43] [UNSENT_RETRY] No unsent messages found
[20:33:43] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[20:33:43] [CLIENT_SIG] WebSocket opened
[20:33:43] HELLO → sent (cached token, role=query)
[20:33:43] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[20:33:43] [SIG] hello_ok received for query connection - ready to query agents
[20:33:43] [SIG] get_agents request sent for sessionId=ILUIWU
[20:33:43] [SIG] get_agents request sent for sessionId=iosILUIWU
[20:33:43] [CLIENT_SIG] Connected! clientId=vWGdiFgVrMOHNqjB
[20:33:43] [SERVER] Stopped reconnect polling
[20:33:43] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[20:33:43] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:33:43] [SIG] agents_list received: []
[20:33:43] [SIG] agents_list received: []
[20:33:43] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18402, 18403, 18404, 18405, 18406]
[20:33:44] [COMBINED_FETCH] Loaded 7217 read receipts, 878 messages with reactions
[20:33:44] [FOREGROUND] Enriched 0 messages with readBy data from server
[20:33:44] [SECURITY] sceneDidBecomeActive - isAuthenticated=true, didEnterBackground=true
[20:33:44] [SECURITY] Within timeout - cleared background flag
[20:33:44] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[20:33:44] [PUSH] handlePollEventsNotification userInfo: [:]
[20:33:44] [PUSH] No message_id in userInfo
[20:33:44] [PUSH] No operation_type in userInfo
[20:33:44] [FAST_REFRESH] Evolution disabled - performing incremental sync
[20:33:44] [FAST_REFRESH] Already have 50 messages - skipping local DB load
[20:33:44] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[20:33:44] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[20:33:44] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[20:33:44] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[20:33:44] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18451
[20:33:44] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18402, 18403, 18404, 18405, 18406]
[20:33:44] [INCREMENTAL_SYNC] ✅ No new messages
[20:33:44] [FAST_REFRESH] Incremental sync complete - 50 messages
[20:33:44] [COMBINED_FETCH] Loaded 7217 read receipts, 878 messages with reactions
[20:33:44] [FAST_REFRESH] Enriched 50 messages with readBy data
[20:33:45] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18402, 18403, 18404, 18405, 18406]
[20:33:47] [LOG] Long press on chat icon detected! Triggering log upload...
[20:33:47] [SCROLL_BTN] Showing button - 283pt from bottom > half 223pt
[20:33:50] [LOG] Uploading log as '2026-01-21-20-33-search-Laurent.log' (577 KB) to server...
[20:33:51] [LOG] Upload HTTP status: 200
[20:33:51] [LOG] Upload successful: 2026-01-21-20-33-search-Laurent.log
[20:33:51] [LOG] Skipping cross-device log request (description doesn't end with '2')
[20:33:52] [WS] WebSocket task completed with error - isQueryOnly=true: The request timed out.
[20:33:52] [WS] Query connection error - cleaning up all agent connections and views
[20:33:52] [CLEANUP] ========================================
[20:33:52] [CLEANUP] Cleaning up all agent connections and views
[20:33:52] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[20:33:52] [CLEANUP] Stopped and removed 0 video connections
[20:33:52] [CLEANUP] Removed 0 video views
[20:33:52] [CLEANUP] Removed 0 feed scroll views
[20:33:52] [CLEANUP] Removed 0 status labels
[20:33:52] [CLEANUP] Reset agent query state
[20:33:52] [CLEANUP] Updated page indicator
[20:33:52] [CLEANUP] Rebuilt video layout
[20:33:52] [CLEANUP] ✅ All agent connections and views cleaned up
[20:33:52] [CLEANUP] ========================================
[20:33:52] [SERVER] Starting reconnect polling (5s interval)
[20:33:52] [LOCK] Lock button tapped - locking app immediately
[20:33:52] [LOCK] Received lock app notification
[20:33:53] [LIFECYCLE] App resigning active - cleared crash flag
[20:33:53] [SECURITY] sceneDidEnterBackground - isAuthenticated=false
[20:33:53] [SECURITY] ⚠️ NOT saving timestamp - isAuthenticated is false
[20:33:53] [LIFECYCLE] App entering background - cleared crash flag
[20:33:54] [CLIENT_SIG] Disconnecting
[20:33:54] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[20:33:54] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=3
[20:33:54] [WS] Canceling WebSocket for query connection to iosILUIWU
[20:33:54] In cleanupPeer
[20:33:54] In cleanupPeer
[20:33:54] [LIFECYCLE] WebRTC audio disabled
[20:33:54] [LIFECYCLE] AVAudioSession deactivated
[20:33:54] [LIFECYCLE] All connections stopped
[20:33:54] [CLIENT_SIG] WebSocket closed with code 1001
[20:33:54] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[20:33:54] [SERVER] Stopped reconnect polling
[20:33:54] Will request stop of video 0
[20:33:54] [WS] URLSession invalidated successfully
[20:33:54] Will request stop of video 0
[20:33:54] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[20:33:54] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[20:33:54] [PIP] Removing 0 tracks from PiP for connection 0
[20:33:54] [PIP] ✅ All tracks removed for connection 0
[20:33:54] [PIP] Removing 0 tracks from PiP for connection 0
[20:33:54] [PIP] ✅ All tracks removed for connection 0[20:47:09] [LOG] Pruned 1075 entries older than 3 hours
[20:47:09] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[20:47:09] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[20:47:09] [GIPHY] SDK not available - using REST API fallback
[20:47:09] [BACKGROUND] Background fetch enabled
[20:47:09] [AUTH] Starting PIN authentication
[20:47:09] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[20:47:09] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:47:09] [CLEANUP] No old timer messages to delete
[20:47:09] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[20:47:09] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[20:47:09] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[20:47:10] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[20:47:10] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:47:10] [USER] ✅ User registered successfully
[20:47:10] [PUSH] User registration after token update: success
[20:47:10] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18451)...
[20:47:10] [CLIENT_SIG] WebSocket opened
[20:47:10] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[20:47:10] [CLIENT_SIG] Connected! clientId=P6RrC8ZbPH866voN
[20:47:10] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[20:47:10] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:47:10] [PRELOAD] Fetched 1 messages
[20:47:10] [PRELOAD] ✅ Saved 1 messages to local DB
[20:47:10] [PRELOAD] ⚡ Cached 1 messages for instant display (preserved 0 from push)
[20:47:10] [PUSH] Silent push received
[20:47:10] [PUSH_EMBED] 📩 Received embedded message: id=18452, type=0, sender=Esra
[20:47:10] [PUSH_EMBED] ✅ Saved message 18452 to local DB (sync)
[20:47:10] [PUSH_EMBED] Created new cache with embedded message 18452
[20:47:10] [PUSH_EMBED] Fetching evolution data for message 18452 in background
[20:47:10] [PUSH_EMBED] ✅ Fully processed message 18452
[20:47:10] [PUSH] Embedded message handled instantly from silent push
[20:47:10] [PUSH_EMBED] Got evolution data for message 18452, saving to local DB
[20:47:10] [PUSH_EMBED] Saved evolution data for message 18452
[20:47:11] [PIN_AUTH] Correct PIN
[20:47:11] [SECURITY] Restored real session: ILUIWU
[20:47:11] [SECURITY] Restored real session: ILUIWU
[20:47:11] [SECURITY] Saved real session: ILUIWU
[20:47:11] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[20:47:11] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[20:47:11] Documents Directory: /var/mobile/Containers/Data/Application/5A8B364B-B895-47F0-967B-C76AF1C5390B/Documents
[20:47:11] [THEME] Applying current theme
[20:47:11] [CHAT] Applied day theme (mode: day)
[20:47:11] [SECURITY] Saved real session: ILUIWU
[20:47:11] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[20:47:11] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[20:47:11] [NETWORK] Network monitor started
[20:47:11] [NETWORK] Status changed: connected
[20:47:11] Did transition
[20:47:11] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[20:47:11] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[20:47:11] [VIEWER] Screen lock enabled - normal idle behavior
[20:47:11] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[20:47:11] [VCC] ========== VideoConnectionClass INIT ==========
[20:47:11] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[20:47:11] [DATA AUDIO] ========== setupWebRTC() START ==========
[20:47:11] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[20:47:11] [DATA AUDIO] Creating encoder/decoder factories...
[20:47:11] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[20:47:11] [CODEC] Viewer selected encoder: AV1 (best quality)
[20:47:11] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[20:47:11] [DATA AUDIO] ✅ Factory created
[20:47:11] [DATA AUDIO] RTCAudioSession locked
[20:47:11] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[20:47:11] [DATA AUDIO] RTCAudioSession unlocked
[20:47:11] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[20:47:11] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[20:47:11] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[20:47:11] [WS] Opening session at ws://crivello.dyndns.org:8081/
[20:47:11] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[20:47:11] [VIEWER_INIT] No messages loaded yet - fetching from server
[20:47:11] [REFRESH_ALL] 🔄 refreshAllFromServer called from: VIEWER_INIT, currentMsgCount=0
[20:47:11] [REFRESH_ALL] 📸 Captured 0 message IDs before request
[20:47:11] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:47:11] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[20:47:11] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[20:47:11] Did transition
[20:47:11] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:47:11] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:47:11] [MIGRATION] No messages need sender_name backfill
[20:47:11] [REFRESH_ALL] 🔄 refreshAllFromServer called from: noLocalData, currentMsgCount=0
[20:47:11] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[20:47:11] [REFRESH_ALL] ⚠️ Already reloading - skipping request from: noLocalData
[20:47:11] [GALLERY_DB] ✅ Loaded 0 media messages
[20:47:11] [GALLERY] Filtered 0 -> 0 (only with local thumbnails)
[20:47:11] [GALLERY] First 5 after sort (newest first):
[20:47:11] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[20:47:11] [SERVER] Starting reconnect polling (5s interval)
[20:47:11] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[20:47:11] [ICONS] Offset applied: -14.6
[20:47:11] [ICONS] New left margin: 11.2, New right margin: 11.3
[20:47:11] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[20:47:11] [UNSENT_RETRY] Checking for unsent messages...
[20:47:11] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[20:47:11] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:47:11] [UPLOAD_RECOVERY] Session: ILUIWU
[20:47:11] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[20:47:11] [UPLOAD_RECOVERY] Checking recent media messages on server...
[20:47:11] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[20:47:11] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[20:47:11] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[20:47:11] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[20:47:11] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[20:47:11] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[20:47:11] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[20:47:11] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[20:47:11] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[20:47:11] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[20:47:11] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[20:47:11] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[20:47:11] [PENDING_UPLOAD] Total pending upload messages: 0
[20:47:11] [UNSENT_RETRY] No unsent messages found
[20:47:11] [UPLOAD_RECOVERY] ✅ All media files verified on server
[20:47:11] [USER] ✅ User registered successfully
[20:47:11] [USER] User registration successful
[20:47:11] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[20:47:11] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[20:47:11] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[20:47:11] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:47:12] [ICONS] Chat center: (31.2, 87.0)
[20:47:12] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[20:47:12] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[20:47:12] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[20:47:12] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[20:47:12] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[20:47:12] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[20:47:12] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[20:47:12] [ICONS] Screen width: 440.0
[20:47:12] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[20:47:12] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:47:12] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:47:12] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[20:47:12] new_session POST ok: token len=157
[20:47:12] HELLO → sent (fetched token, role=query)
[20:47:12] [SIG] hello_ok received for query connection - ready to query agents
[20:47:12] [SIG] get_agents request sent for sessionId=ILUIWU
[20:47:12] [SIG] get_agents request sent for sessionId=iosILUIWU
[20:47:12] [SERVER] Stopped reconnect polling
[20:47:12] [SIG] agents_list received: []
[20:47:12] [SIG] agents_list received: []
[20:47:12] [PENDING_UPLOAD] Total pending upload messages: 0
[20:47:12] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[20:47:12] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[20:47:12] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[20:47:13] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[20:47:13] DOWNLOADIIING t_bae538c2a3076c11.jpg
[20:47:13] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[20:47:13] DOWNLOADIIING t_5cfd84d52271d308.jpg
[20:47:13] DOWNLOADIIING t_919f4df51be24b2c.jpg
[20:47:13] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[20:47:13] DOWNLOADIIING t_32675c319a37fee7.jpg
[20:47:13] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[20:47:13] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[20:47:13] DOWNLOADIIING t_abb65f630e55dc61.jpg
[20:47:13] DOWNLOADIIING t_2a4c7380908d6595.jpg
[20:47:13] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[20:47:13] DOWNLOADIIING t_02f48c94671cc64e.jpg
[20:47:13] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[20:47:13] DOWNLOADIIING t_364b0669ed2f3378.jpg
[20:47:13] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[20:47:13] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[20:47:13] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[20:47:13] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[20:47:13] DOWNLOADIIING t_722d39e0d91dd954.jpg
[20:47:13] DOWNLOADIIING t_97828ef5de49a612.jpg
[20:47:13] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[20:47:13] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7218
[20:47:13] [REFRESH_ALL] 📊 Server returned 7218 messages
[20:47:13] [REFRESH_ALL] 📊 Final merge: server=7218, preserved=0, total=7218
[20:47:13] [REFRESH_ALL] 📊 Displaying 50 of 7218 messages, hasMore=true
[20:47:13] [VIEWER_INIT] Loaded 50 messages with read receipts
[20:47:13] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18403, 18404, 18405, 18406, 18407]
[20:47:13] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[20:47:13] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:47:13] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:47:13] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[20:47:13] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:47:13] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:47:13] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[20:47:15] [PUSH] Silent push received
[20:47:15] [PUSH_EMBED] No embedded message_data in notification
[20:47:15] [PUSH] No embedded data, pre-loading messages from server
[20:47:15] [PUSH_PRELOAD] Fetching messages for instant display cache
[20:47:15] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[20:47:15] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[20:47:15] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[20:47:15] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18452]
[20:47:15] [PUSH] Parsed message_id: 18452
[20:47:15] [PUSH] Parsed operation_type: 3
[20:47:15] [PUSH] Taking direct action: opType=3, messageId=18452
[20:47:15] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18452
[20:47:16] [CLIENT_SIG] Event received: type=3 messageId=18452
[20:47:16] [WS_EVENT] Received event: type=3, messageId=18452
[20:47:16] [WS_EVENT] Read receipt for message 18452 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:47:16] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[20:47:16] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18403, 18404, 18405, 18406, 18407]
[20:47:19] [MENU] dismissAnyExistingMenu called
[20:47:19] [MENU] dismissAnyExistingMenu completed
[20:47:21] [SEARCH] Found 0 messages matching 'b' in local DB (ViewerMode=0)
[20:47:21] [SEARCH] Found 0 messages matching 'ba' in local DB (ViewerMode=0)
[20:47:22] [SEARCH] Found 0 messages matching 'bab' in local DB (ViewerMode=0)
[20:47:22] [SEARCH] Found 0 messages matching 'baby' in local DB (ViewerMode=0)
[20:47:45] [SCROLL_BTN] Showing button - 310pt from bottom > half 223pt
[20:48:01] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[20:48:01] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=50, isReloading=false
[20:48:01] [SEND_MESSAGE] ✅ Added optimistic message id=-1 to arrays, newMsgCount=51
[20:48:01] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[-1, 18452, 18451, 18450, 18449]
[20:48:01] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[20:48:01] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[20:48:02] [CLIENT_SIG] Event received: type=0 messageId=18453
[20:48:02] [WS_EVENT] Received event: type=0, messageId=18453
[20:48:02] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18453,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 19:48:01"}
[20:48:02] [WS_EVENT] 📨 New message notification (msgId=18453) - triggering incremental refresh, currentMsgCount=51
[20:48:02] [CHAT] receive_message.php JSON: ["datesent_utc": 2026-01-21 19:48:01, "message_type": 0, "ok": 1, "message_id": 18453, "session_id": ILUIWU, "file_name": ]
[20:48:02] [DB_UPGRADE] Upgrading message ID: -1 → 18453, preserveOriginalDate=false
[20:48:02] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[20:48:02] [DB_UPGRADE] ✅ Upgraded -1 → 18453 with send_status=0, 1 row(s) affected
[20:48:02] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18453
[20:48:02] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -1 → 18453
[20:48:02] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -1 → 18453
[20:48:02] ReloadData 9
[20:48:02] [INCREMENTAL_SYNC] ✅ No new messages
[20:48:02] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=51
[20:49:47] [CRASH] Previous session did not exit cleanly - crash detected
[20:49:47] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[20:49:47] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[20:49:47] [GIPHY] SDK not available - using REST API fallback
[20:49:47] [BACKGROUND] Background fetch enabled
[20:49:47] [AUTH] Starting PIN authentication
[20:49:47] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[20:49:47] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:49:47] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[20:49:47] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[20:49:47] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[20:49:47] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[20:49:47] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[20:49:47] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:49:47] [USER] ✅ User registered successfully
[20:49:47] [PUSH] User registration after token update: success
[20:49:47] [CLIENT_SIG] WebSocket opened
[20:49:47] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[20:49:47] [CLIENT_SIG] Connected! clientId=JWgDdga0h5cT2irM
[20:49:47] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[20:49:47] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:49:47] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18453)...
[20:49:48] [PRELOAD] No messages or parse error
[20:49:49] [PIN_AUTH] Correct PIN
[20:49:49] [SECURITY] Restored real session: ILUIWU
[20:49:49] [SECURITY] Restored real session: ILUIWU
[20:49:49] [SECURITY] Saved real session: ILUIWU
[20:49:49] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[20:49:49] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[20:49:49] Documents Directory: /var/mobile/Containers/Data/Application/A0AF70AC-8B4D-4B42-B573-15320D902AC1/Documents
[20:49:49] [THEME] Applying current theme
[20:49:49] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[20:49:49] [CHAT] Applied day theme (mode: day)
[20:49:49] [SECURITY] Saved real session: ILUIWU
[20:49:49] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[20:49:49] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[20:49:49] [NETWORK] Network monitor started
[20:49:49] [NETWORK] Status changed: connected
[20:49:49] Did transition
[20:49:49] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[20:49:49] [VIEWER] Screen lock enabled - normal idle behavior
[20:49:49] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[20:49:49] [VCC] ========== VideoConnectionClass INIT ==========
[20:49:49] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[20:49:49] [DATA AUDIO] ========== setupWebRTC() START ==========
[20:49:49] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[20:49:49] [DATA AUDIO] Creating encoder/decoder factories...
[20:49:49] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[20:49:49] [CODEC] Viewer selected encoder: AV1 (best quality)
[20:49:49] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[20:49:49] [DATA AUDIO] ✅ Factory created
[20:49:49] [DATA AUDIO] RTCAudioSession locked
[20:49:49] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[20:49:49] [DATA AUDIO] RTCAudioSession unlocked
[20:49:49] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[20:49:49] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[20:49:49] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[20:49:49] [WS] Opening session at ws://crivello.dyndns.org:8081/
[20:49:49] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[20:49:49] [VIEWER_INIT] No messages loaded yet - fetching from server
[20:49:49] [REFRESH_ALL] 🔄 refreshAllFromServer called from: VIEWER_INIT, currentMsgCount=0
[20:49:49] [REFRESH_ALL] 📸 Captured 0 message IDs before request
[20:49:49] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:49:49] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[20:49:49] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[20:49:49] Did transition
[20:49:49] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:49:49] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:49:49] [MIGRATION] No messages need sender_name backfill
[20:49:49] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[20:49:49] [REFRESH_ALL] 🔄 refreshAllFromServer called from: noLocalData, currentMsgCount=0
[20:49:49] [REFRESH_ALL] ⚠️ Already reloading - skipping request from: noLocalData
[20:49:49] [GALLERY_DB] ✅ Loaded 0 media messages
[20:49:49] [GALLERY] Filtered 0 -> 0 (only with local thumbnails)
[20:49:49] [GALLERY] First 5 after sort (newest first):
[20:49:49] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[20:49:49] [SERVER] Starting reconnect polling (5s interval)
[20:49:49] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[20:49:49] [ICONS] Offset applied: -14.6
[20:49:49] [ICONS] New left margin: 11.2, New right margin: 11.3
[20:49:49] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[20:49:49] [UNSENT_RETRY] Checking for unsent messages...
[20:49:49] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[20:49:49] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:49:49] [UPLOAD_RECOVERY] Session: ILUIWU
[20:49:49] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[20:49:49] [UPLOAD_RECOVERY] Checking recent media messages on server...
[20:49:49] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[20:49:49] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[20:49:49] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[20:49:49] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[20:49:49] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[20:49:49] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[20:49:49] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[20:49:49] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[20:49:49] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[20:49:49] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[20:49:49] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[20:49:49] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[20:49:49] [PENDING_UPLOAD] Total pending upload messages: 0
[20:49:49] [UNSENT_RETRY] No unsent messages found
[20:49:49] [UPLOAD_RECOVERY] ✅ All media files verified on server
[20:49:49] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[20:49:49] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[20:49:49] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[20:49:49] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:49:49] [USER] ✅ User registered successfully
[20:49:49] [USER] User registration successful
[20:49:49] [ICONS] Chat center: (31.2, 87.0)
[20:49:49] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[20:49:49] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[20:49:49] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[20:49:49] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[20:49:49] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[20:49:49] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[20:49:49] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[20:49:49] [ICONS] Screen width: 440.0
[20:49:49] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[20:49:49] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:49:49] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:49:49] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[20:49:49] new_session POST ok: token len=157
[20:49:49] HELLO → sent (fetched token, role=query)
[20:49:49] [SIG] hello_ok received for query connection - ready to query agents
[20:49:49] [SIG] get_agents request sent for sessionId=ILUIWU
[20:49:49] [SIG] get_agents request sent for sessionId=iosILUIWU
[20:49:49] [SERVER] Stopped reconnect polling
[20:49:49] [SIG] agents_list received: []
[20:49:49] [SIG] agents_list received: []
[20:49:50] [PENDING_UPLOAD] Total pending upload messages: 0
[20:49:50] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[20:49:50] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[20:49:50] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[20:49:50] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[20:49:50] DOWNLOADIIING t_bae538c2a3076c11.jpg
[20:49:50] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[20:49:50] DOWNLOADIIING t_5cfd84d52271d308.jpg
[20:49:50] DOWNLOADIIING t_919f4df51be24b2c.jpg
[20:49:50] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[20:49:50] DOWNLOADIIING t_32675c319a37fee7.jpg
[20:49:50] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[20:49:50] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[20:49:50] DOWNLOADIIING t_abb65f630e55dc61.jpg
[20:49:50] DOWNLOADIIING t_2a4c7380908d6595.jpg
[20:49:51] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[20:49:51] DOWNLOADIIING t_02f48c94671cc64e.jpg
[20:49:51] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[20:49:51] DOWNLOADIIING t_364b0669ed2f3378.jpg
[20:49:51] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[20:49:51] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[20:49:51] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[20:49:51] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[20:49:51] DOWNLOADIIING t_722d39e0d91dd954.jpg
[20:49:51] DOWNLOADIIING t_97828ef5de49a612.jpg
[20:49:51] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[20:49:51] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7219
[20:49:51] [REFRESH_ALL] 📊 Server returned 7219 messages
[20:49:51] [REFRESH_ALL] 📊 Final merge: server=7219, preserved=0, total=7219
[20:49:51] [REFRESH_ALL] 📊 Displaying 50 of 7219 messages, hasMore=true
[20:49:51] [VIEWER_INIT] Loaded 50 messages with read receipts
[20:49:51] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18404, 18405, 18406, 18407, 18408]
[20:49:51] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[20:49:51] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:49:51] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:49:51] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[20:49:51] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:49:51] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:49:51] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[20:49:52] [MENU] dismissAnyExistingMenu called
[20:49:52] [MENU] dismissAnyExistingMenu completed
[20:49:53] [SEARCH] Found 0 messages matching 'b' in local DB
[20:49:53] [SEARCH] Found 0 messages matching 'ba' in local DB
[20:49:53] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[20:49:53] [SEARCH] Found 0 messages matching 'bab' in local DB
[20:49:54] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18404, 18405, 18406, 18407, 18408]
[20:49:54] [SEARCH] Found 0 messages matching 'baby' in local DB[20:50:39] [LOG] Pruned 576 entries older than 3 hours
[20:50:39] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[20:50:39] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[20:50:39] [GIPHY] SDK not available - using REST API fallback
[20:50:39] [BACKGROUND] Background fetch enabled
[20:50:39] [AUTH] Starting PIN authentication
[20:50:39] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[20:50:39] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[20:50:39] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:50:39] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[20:50:39] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[20:50:39] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:50:39] [USER] ✅ User registered successfully
[20:50:39] [PUSH] User registration after token update: success
[20:50:39] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[20:50:39] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[20:50:39] [CLIENT_SIG] WebSocket opened
[20:50:39] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[20:50:39] [CLIENT_SIG] Connected! clientId=6pv8Dg4i0QgCp0IL
[20:50:39] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[20:50:39] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:50:39] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18453)...
[20:50:39] [PRELOAD] No messages or parse error[20:50:40] [LOG] Pruned 35 entries older than 3 hours
[20:50:40] [SECURITY] Restored real session: ILUIWU
[20:50:40] [SECURITY] Restored real session: ILUIWU
[20:50:41] [SECURITY] Saved real session: ILUIWU
[20:50:41] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[20:50:41] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[20:50:41] Documents Directory: /var/mobile/Containers/Data/Application/A0AF70AC-8B4D-4B42-B573-15320D902AC1/Documents
[20:50:41] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[20:50:41] [THEME] Applying current theme
[20:50:41] [CHAT] Applied day theme (mode: day)
[20:50:41] [SECURITY] Saved real session: ILUIWU
[20:50:41] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[20:50:41] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[20:50:41] [NETWORK] Network monitor started
[20:50:41] [NETWORK] Status changed: connected
[20:50:41] Did transition
[20:50:41] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[20:50:41] [VIEWER] Screen lock enabled - normal idle behavior
[20:50:41] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[20:50:41] [VCC] ========== VideoConnectionClass INIT ==========
[20:50:41] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[20:50:41] [DATA AUDIO] ========== setupWebRTC() START ==========
[20:50:41] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[20:50:41] [DATA AUDIO] Creating encoder/decoder factories...
[20:50:41] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[20:50:41] [CODEC] Viewer selected encoder: AV1 (best quality)
[20:50:41] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[20:50:41] [DATA AUDIO] ✅ Factory created
[20:50:41] [DATA AUDIO] RTCAudioSession locked
[20:50:41] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[20:50:41] [DATA AUDIO] RTCAudioSession unlocked
[20:50:41] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[20:50:41] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[20:50:41] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[20:50:41] [WS] Opening session at ws://crivello.dyndns.org:8081/
[20:50:41] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[20:50:41] [VIEWER_INIT] No messages loaded yet - fetching from server
[20:50:41] [REFRESH_ALL] 🔄 refreshAllFromServer called from: VIEWER_INIT, currentMsgCount=0
[20:50:41] [REFRESH_ALL] 📸 Captured 0 message IDs before request
[20:50:41] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:50:41] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[20:50:41] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[20:50:41] Did transition
[20:50:41] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:50:41] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:50:41] [MIGRATION] No messages need sender_name backfill
[20:50:41] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[20:50:41] [REFRESH_ALL] 🔄 refreshAllFromServer called from: noLocalData, currentMsgCount=0
[20:50:41] [REFRESH_ALL] ⚠️ Already reloading - skipping request from: noLocalData
[20:50:41] [GALLERY_DB] ✅ Loaded 0 media messages
[20:50:41] [GALLERY] Filtered 0 -> 0 (only with local thumbnails)
[20:50:41] [GALLERY] First 5 after sort (newest first):
[20:50:41] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[20:50:41] [SERVER] Starting reconnect polling (5s interval)
[20:50:41] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[20:50:41] [ICONS] Offset applied: -14.6
[20:50:41] [ICONS] New left margin: 11.2, New right margin: 11.3
[20:50:41] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[20:50:41] [UNSENT_RETRY] Checking for unsent messages...
[20:50:41] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[20:50:41] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:50:41] [UPLOAD_RECOVERY] Session: ILUIWU
[20:50:41] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[20:50:41] [UPLOAD_RECOVERY] Checking recent media messages on server...
[20:50:41] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[20:50:41] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[20:50:41] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[20:50:41] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[20:50:41] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[20:50:41] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[20:50:41] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[20:50:41] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[20:50:41] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[20:50:41] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[20:50:41] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[20:50:41] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[20:50:41] [PENDING_UPLOAD] Total pending upload messages: 0
[20:50:41] [UNSENT_RETRY] No unsent messages found
[20:50:41] [UPLOAD_RECOVERY] ✅ All media files verified on server
[20:50:41] [USER] ✅ User registered successfully
[20:50:41] [USER] User registration successful
[20:50:41] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[20:50:41] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[20:50:41] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[20:50:41] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:50:41] [ICONS] Chat center: (31.2, 87.0)
[20:50:41] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[20:50:41] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[20:50:41] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[20:50:41] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[20:50:41] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[20:50:41] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[20:50:41] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[20:50:41] [ICONS] Screen width: 440.0
[20:50:41] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[20:50:41] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:50:41] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:50:41] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[20:50:41] new_session POST ok: token len=157
[20:50:41] HELLO → sent (fetched token, role=query)
[20:50:41] [SIG] hello_ok received for query connection - ready to query agents
[20:50:41] [SIG] get_agents request sent for sessionId=ILUIWU
[20:50:41] [SIG] get_agents request sent for sessionId=iosILUIWU
[20:50:41] [SERVER] Stopped reconnect polling
[20:50:41] [SIG] agents_list received: []
[20:50:41] [SIG] agents_list received: []
[20:50:41] [PENDING_UPLOAD] Total pending upload messages: 0
[20:50:41] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[20:50:42] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[20:50:42] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[20:50:42] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[20:50:42] DOWNLOADIIING t_bae538c2a3076c11.jpg
[20:50:42] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[20:50:42] DOWNLOADIIING t_5cfd84d52271d308.jpg
[20:50:42] DOWNLOADIIING t_919f4df51be24b2c.jpg
[20:50:42] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[20:50:42] DOWNLOADIIING t_32675c319a37fee7.jpg
[20:50:42] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[20:50:42] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[20:50:42] DOWNLOADIIING t_abb65f630e55dc61.jpg
[20:50:42] DOWNLOADIIING t_2a4c7380908d6595.jpg
[20:50:42] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[20:50:42] DOWNLOADIIING t_02f48c94671cc64e.jpg
[20:50:42] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[20:50:42] DOWNLOADIIING t_364b0669ed2f3378.jpg
[20:50:42] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[20:50:42] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[20:50:42] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[20:50:42] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[20:50:42] DOWNLOADIIING t_722d39e0d91dd954.jpg
[20:50:42] DOWNLOADIIING t_97828ef5de49a612.jpg
[20:50:42] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[20:50:42] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7219
[20:50:42] [REFRESH_ALL] 📊 Server returned 7219 messages
[20:50:42] [REFRESH_ALL] 📊 Final merge: server=7219, preserved=0, total=7219
[20:50:42] [REFRESH_ALL] 📊 Displaying 50 of 7219 messages, hasMore=true
[20:50:42] [VIEWER_INIT] Loaded 50 messages with read receipts
[20:50:42] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18404, 18405, 18406, 18407, 18408]
[20:50:42] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[20:50:42] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:50:42] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:50:42] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[20:50:46] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[20:50:46] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18404, 18405, 18406, 18407, 18408]
[20:50:52] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[20:50:52] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=50, isReloading=false
[20:50:52] [SEND_MESSAGE] ✅ Added optimistic message id=-1 to arrays, newMsgCount=51
[20:50:52] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[-1, 18453, 18452, 18451, 18450]
[20:50:52] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[20:50:52] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[20:50:54] [CLIENT_SIG] Event received: type=0 messageId=18454
[20:50:54] [WS_EVENT] Received event: type=0, messageId=18454
[20:50:54] [WS_EVENT] 📨 New message notification (msgId=18454) - triggering incremental refresh, currentMsgCount=51
[20:50:54] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[20:50:54] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18453
[20:50:54] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18454,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 19:50:52"}
[20:50:54] [CHAT] receive_message.php JSON: ["file_name": , "session_id": ILUIWU, "message_id": 18454, "ok": 1, "datesent_utc": 2026-01-21 19:50:52, "message_type": 0]
[20:50:54] [DB_UPGRADE] Upgrading message ID: -1 → 18454, preserveOriginalDate=false
[20:50:54] [DB_UPGRADE] ✅ Upgraded -1 → 18454 with send_status=0, 1 row(s) affected
[20:50:54] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -1 → 18454
[20:50:54] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -1 → 18454
[20:50:54] ReloadData 9
[20:50:54] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[20:50:54] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[20:50:54] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=51
[20:50:54] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[18404, 18405, 18406, 18407, 18408]
[20:50:54] [LIFECYCLE] App resigning active - cleared crash flag
[20:50:55] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[20:50:55] [SECURITY] Saved background timestamp
[20:50:55] [LIFECYCLE] App entering background - cleared crash flag
[20:50:55] [CLIENT_SIG] Disconnecting
[20:50:55] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[20:50:55] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[20:50:55] [WS] Canceling WebSocket for query connection to iosILUIWU
[20:50:55] In cleanupPeer
[20:50:55] In cleanupPeer
[20:50:55] [LIFECYCLE] WebRTC audio disabled
[20:50:55] [LIFECYCLE] AVAudioSession deactivated
[20:50:55] [LIFECYCLE] All connections stopped
[20:50:55] [CLIENT_SIG] WebSocket closed with code 1001
[20:50:55] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[20:50:55] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[20:50:55] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[20:50:55] [SERVER] Stopped reconnect polling
[20:50:55] [WS] WebSocket task completed with error - isQueryOnly=true: cancelled
[20:50:55] [WS] Query connection error - cleaning up all agent connections and views
[20:50:55] Will request stop of video 0
[20:50:55] Will request stop of video 0
[20:50:55] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[20:50:55] [WS] Query connection failed - cleaning up all agent connections and views
[20:50:55] [CLEANUP] ========================================
[20:50:55] [CLEANUP] Cleaning up all agent connections and views
[20:50:55] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[20:50:55] [CLEANUP] Stopped and removed 0 video connections
[20:50:55] [CLEANUP] Removed 0 video views
[20:50:55] [CLEANUP] Removed 0 feed scroll views
[20:50:55] [CLEANUP] Removed 0 status labels
[20:50:55] [CLEANUP] Reset agent query state
[20:50:55] [CLEANUP] Updated page indicator
[20:50:55] [CLEANUP] Rebuilt video layout
[20:50:55] [CLEANUP] ✅ All agent connections and views cleaned up
[20:50:55] [CLEANUP] ========================================
[20:50:55] [SERVER] Skipping reconnect polling - app is in background
[20:50:55] [WS] URLSession invalidated successfully
[20:50:55] [PIP] Removing 0 tracks from PiP for connection 0
[20:50:55] [PIP] ✅ All tracks removed for connection 0
[20:50:55] [PIP] Removing 0 tracks from PiP for connection 0
[20:50:55] [PIP] ✅ All tracks removed for connection 0
[20:50:55] [CLEANUP] ========================================
[20:50:55] [CLEANUP] Cleaning up all agent connections and views
[20:50:55] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[20:50:55] [CLEANUP] Stopped and removed 0 video connections
[20:50:55] [CLEANUP] Removed 0 video views
[20:50:55] [CLEANUP] Removed 0 feed scroll views
[20:50:55] [CLEANUP] Removed 0 status labels
[20:50:55] [CLEANUP] Reset agent query state
[20:50:55] [CLEANUP] Updated page indicator
[20:50:55] [CLEANUP] Rebuilt video layout
[20:50:55] [CLEANUP] ✅ All agent connections and views cleaned up
[20:50:55] [CLEANUP] ========================================
[20:50:55] [SERVER] Skipping reconnect polling - app is in background[20:52:33] [LOG] Pruned 1409 entries older than 3 hours
[20:52:33] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[20:52:33] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[20:52:33] [GIPHY] SDK not available - using REST API fallback
[20:52:33] [BACKGROUND] Background fetch enabled
[20:52:33] [SECURITY] Initial launch - within timeout (97.854572057724s < 300.0s)
[20:52:33] [AUTH] Starting PIN authentication
[20:52:33] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[20:52:33] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:52:33] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[20:52:33] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[20:52:33] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[20:52:33] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[20:52:33] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[20:52:33] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:52:33] [USER] ✅ User registered successfully
[20:52:33] [PUSH] User registration after token update: success
[20:52:33] [CLIENT_SIG] WebSocket opened
[20:52:33] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[20:52:33] [CLIENT_SIG] Connected! clientId=SvT3P7b_OXcoB3mm
[20:52:33] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[20:52:33] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:52:33] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18454)...
[20:52:33] [PRELOAD] No messages or parse error
[20:52:34] [PIN_AUTH] Correct PIN
[20:52:34] [SECURITY] Restored real session: ILUIWU
[20:52:34] [SECURITY] Restored real session: ILUIWU
[20:52:35] [SECURITY] Saved real session: ILUIWU
[20:52:35] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[20:52:35] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[20:52:35] Documents Directory: /var/mobile/Containers/Data/Application/EB4452D7-0A66-4BA0-A8E0-A9BB1DDD6BC6/Documents
[20:52:35] [THEME] Applying current theme
[20:52:35] [CHAT] Applied day theme (mode: day)
[20:52:35] [SECURITY] Saved real session: ILUIWU
[20:52:35] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[20:52:35] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[20:52:35] [NETWORK] Network monitor started
[20:52:35] [NETWORK] Status changed: connected
[20:52:35] Did transition
[20:52:35] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[20:52:35] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[20:52:35] [VIEWER] Screen lock enabled - normal idle behavior
[20:52:35] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[20:52:35] [VCC] ========== VideoConnectionClass INIT ==========
[20:52:35] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[20:52:35] [DATA AUDIO] ========== setupWebRTC() START ==========
[20:52:35] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[20:52:35] [DATA AUDIO] Creating encoder/decoder factories...
[20:52:35] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[20:52:35] [CODEC] Viewer selected encoder: AV1 (best quality)
[20:52:35] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[20:52:35] [DATA AUDIO] ✅ Factory created
[20:52:35] [DATA AUDIO] RTCAudioSession locked
[20:52:35] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[20:52:35] [DATA AUDIO] RTCAudioSession unlocked
[20:52:35] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[20:52:35] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[20:52:35] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[20:52:35] [WS] Opening session at ws://crivello.dyndns.org:8081/
[20:52:35] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[20:52:35] [VIEWER_INIT] No messages loaded yet - fetching from server
[20:52:35] [REFRESH_ALL] 🔄 refreshAllFromServer called from: VIEWER_INIT, currentMsgCount=0
[20:52:35] [REFRESH_ALL] 📸 Captured 0 message IDs before request
[20:52:35] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:52:35] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[20:52:35] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[20:52:35] Did transition
[20:52:35] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:52:35] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:52:35] [MIGRATION] No messages need sender_name backfill
[20:52:35] [REFRESH_ALL] 🔄 refreshAllFromServer called from: noLocalData, currentMsgCount=0
[20:52:35] [REFRESH_ALL] ⚠️ Already reloading - skipping request from: noLocalData
[20:52:35] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[20:52:35] [GALLERY_DB] ✅ Loaded 0 media messages
[20:52:35] [GALLERY] Filtered 0 -> 0 (only with local thumbnails)
[20:52:35] [GALLERY] First 5 after sort (newest first):
[20:52:35] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[20:52:35] [SERVER] Starting reconnect polling (5s interval)
[20:52:35] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[20:52:35] [ICONS] Offset applied: -14.6
[20:52:35] [ICONS] New left margin: 11.2, New right margin: 11.3
[20:52:35] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[20:52:35] [UNSENT_RETRY] Checking for unsent messages...
[20:52:35] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[20:52:35] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:52:35] [UPLOAD_RECOVERY] Session: ILUIWU
[20:52:35] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[20:52:35] [UPLOAD_RECOVERY] Checking recent media messages on server...
[20:52:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[20:52:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[20:52:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[20:52:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[20:52:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[20:52:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[20:52:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[20:52:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[20:52:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[20:52:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[20:52:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[20:52:35] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[20:52:35] [PENDING_UPLOAD] Total pending upload messages: 0
[20:52:35] [UNSENT_RETRY] No unsent messages found
[20:52:35] [UPLOAD_RECOVERY] ✅ All media files verified on server
[20:52:35] [USER] ✅ User registered successfully
[20:52:35] [USER] User registration successful
[20:52:35] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[20:52:35] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[20:52:35] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[20:52:35] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:52:35] [ICONS] Chat center: (31.2, 87.0)
[20:52:35] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[20:52:35] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[20:52:35] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[20:52:35] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[20:52:35] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[20:52:35] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[20:52:35] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[20:52:35] [ICONS] Screen width: 440.0
[20:52:35] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[20:52:35] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:52:35] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:52:35] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[20:52:35] new_session POST ok: token len=157
[20:52:35] HELLO → sent (fetched token, role=query)
[20:52:35] [SIG] hello_ok received for query connection - ready to query agents
[20:52:35] [SIG] get_agents request sent for sessionId=ILUIWU
[20:52:35] [SIG] get_agents request sent for sessionId=iosILUIWU
[20:52:35] [SERVER] Stopped reconnect polling
[20:52:35] [SIG] agents_list received: []
[20:52:35] [SIG] agents_list received: []
[20:52:35] [PENDING_UPLOAD] Total pending upload messages: 0
[20:52:35] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[20:52:35] [DB_INSERT] Starting insert of 7220 messages for session 'ILUIWU'
[20:52:35] [DB_INSERT] ✅ After insert: 7222 messages in local_messages for session 'ILUIWU'
[20:52:36] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[20:52:36] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[20:52:36] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[20:52:36] DOWNLOADIIING t_bae538c2a3076c11.jpg
[20:52:36] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[20:52:36] DOWNLOADIIING t_5cfd84d52271d308.jpg
[20:52:36] DOWNLOADIIING t_919f4df51be24b2c.jpg
[20:52:36] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[20:52:36] DOWNLOADIIING t_32675c319a37fee7.jpg
[20:52:36] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[20:52:36] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[20:52:36] DOWNLOADIIING t_abb65f630e55dc61.jpg
[20:52:36] DOWNLOADIIING t_2a4c7380908d6595.jpg
[20:52:36] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[20:52:36] DOWNLOADIIING t_02f48c94671cc64e.jpg
[20:52:36] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[20:52:36] DOWNLOADIIING t_364b0669ed2f3378.jpg
[20:52:36] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[20:52:36] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[20:52:36] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[20:52:36] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[20:52:36] DOWNLOADIIING t_722d39e0d91dd954.jpg
[20:52:36] DOWNLOADIIING t_97828ef5de49a612.jpg
[20:52:36] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[20:52:36] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7220
[20:52:36] [REFRESH_ALL] 📊 Server returned 7220 messages
[20:52:36] [REFRESH_ALL] 📊 Final merge: server=7220, preserved=0, total=7220
[20:52:36] [REFRESH_ALL] 📊 Displaying 50 of 7220 messages, hasMore=true
[20:52:36] [VIEWER_INIT] Loaded 50 messages with read receipts
[20:52:36] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[20:52:36] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[20:52:36] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:52:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:52:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[20:52:36] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:52:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:52:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[20:52:39] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[20:52:39] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[20:53:20] [CRASH] Previous session did not exit cleanly - crash detected
[20:53:20] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[20:53:20] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[20:53:20] [GIPHY] SDK not available - using REST API fallback
[20:53:20] [BACKGROUND] Background fetch enabled
[20:53:20] [AUTH] Starting PIN authentication
[20:53:20] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[20:53:20] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:53:20] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[20:53:20] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[20:53:20] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[20:53:20] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[20:53:20] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[20:53:20] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:53:20] [USER] ✅ User registered successfully
[20:53:20] [PUSH] User registration after token update: success
[20:53:20] [CLIENT_SIG] WebSocket opened
[20:53:20] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[20:53:20] [CLIENT_SIG] Connected! clientId=bEA3NLcmA4i3mMoi
[20:53:20] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[20:53:20] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:53:20] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18454)...
[20:53:20] [PRELOAD] No messages or parse error
[20:53:22] [PIN_AUTH] Correct PIN
[20:53:22] [SECURITY] Restored real session: ILUIWU
[20:53:22] [SECURITY] Restored real session: ILUIWU
[20:53:22] [SECURITY] Saved real session: ILUIWU
[20:53:22] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[20:53:22] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[20:53:22] Documents Directory: /var/mobile/Containers/Data/Application/B74B1B81-53D8-4DF9-A846-5B0203D77329/Documents
[20:53:22] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[20:53:22] [THEME] Applying current theme
[20:53:22] [CHAT] Applied day theme (mode: day)
[20:53:22] [SECURITY] Saved real session: ILUIWU
[20:53:22] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[20:53:22] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[20:53:22] [NETWORK] Network monitor started
[20:53:22] [NETWORK] Status changed: connected
[20:53:22] Did transition
[20:53:22] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[20:53:22] [VIEWER] Screen lock enabled - normal idle behavior
[20:53:22] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[20:53:22] [VCC] ========== VideoConnectionClass INIT ==========
[20:53:22] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[20:53:22] [DATA AUDIO] ========== setupWebRTC() START ==========
[20:53:22] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[20:53:22] [DATA AUDIO] Creating encoder/decoder factories...
[20:53:22] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[20:53:22] [CODEC] Viewer selected encoder: AV1 (best quality)
[20:53:22] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[20:53:22] [DATA AUDIO] ✅ Factory created
[20:53:22] [DATA AUDIO] RTCAudioSession locked
[20:53:22] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[20:53:22] [DATA AUDIO] RTCAudioSession unlocked
[20:53:22] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[20:53:22] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[20:53:22] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[20:53:22] [WS] Opening session at ws://crivello.dyndns.org:8081/
[20:53:22] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[20:53:22] [VIEWER_INIT] No messages loaded yet - fetching from server
[20:53:22] [REFRESH_ALL] 🔄 refreshAllFromServer called from: VIEWER_INIT, currentMsgCount=0
[20:53:22] [REFRESH_ALL] 📸 Captured 0 message IDs before request
[20:53:22] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:53:22] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[20:53:22] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[20:53:22] Did transition
[20:53:22] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:53:22] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:53:22] [MIGRATION] No messages need sender_name backfill
[20:53:22] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[20:53:22] [REFRESH_ALL] 🔄 refreshAllFromServer called from: noLocalData, currentMsgCount=0
[20:53:22] [REFRESH_ALL] ⚠️ Already reloading - skipping request from: noLocalData
[20:53:22] [GALLERY_DB] ✅ Loaded 0 media messages
[20:53:22] [GALLERY] Filtered 0 -> 0 (only with local thumbnails)
[20:53:22] [GALLERY] First 5 after sort (newest first):
[20:53:22] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[20:53:22] [SERVER] Starting reconnect polling (5s interval)
[20:53:22] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[20:53:22] [ICONS] Offset applied: -14.6
[20:53:22] [ICONS] New left margin: 11.2, New right margin: 11.3
[20:53:22] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[20:53:22] [UNSENT_RETRY] Checking for unsent messages...
[20:53:22] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[20:53:22] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:53:22] [UPLOAD_RECOVERY] Session: ILUIWU
[20:53:22] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[20:53:22] [UPLOAD_RECOVERY] Checking recent media messages on server...
[20:53:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[20:53:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[20:53:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[20:53:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[20:53:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[20:53:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[20:53:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[20:53:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[20:53:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[20:53:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[20:53:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[20:53:22] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[20:53:22] [PENDING_UPLOAD] Total pending upload messages: 0
[20:53:22] [UNSENT_RETRY] No unsent messages found
[20:53:22] [UPLOAD_RECOVERY] ✅ All media files verified on server
[20:53:22] [USER] ✅ User registered successfully
[20:53:22] [USER] User registration successful
[20:53:22] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[20:53:22] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[20:53:22] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[20:53:22] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:53:22] [ICONS] Chat center: (31.2, 87.0)
[20:53:22] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[20:53:22] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[20:53:22] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[20:53:22] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[20:53:22] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[20:53:22] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[20:53:22] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[20:53:22] [ICONS] Screen width: 440.0
[20:53:22] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[20:53:22] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:53:22] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:53:22] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[20:53:22] new_session POST ok: token len=157
[20:53:22] HELLO → sent (fetched token, role=query)
[20:53:22] [SIG] hello_ok received for query connection - ready to query agents
[20:53:22] [SIG] get_agents request sent for sessionId=ILUIWU
[20:53:22] [SIG] get_agents request sent for sessionId=iosILUIWU
[20:53:22] [SERVER] Stopped reconnect polling
[20:53:22] [SIG] agents_list received: []
[20:53:22] [SIG] agents_list received: []
[20:53:22] [PENDING_UPLOAD] Total pending upload messages: 0
[20:53:22] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[20:53:22] [DB_INSERT] Starting insert of 7220 messages for session 'ILUIWU'
[20:53:22] [DB_INSERT] ✅ After insert: 7222 messages in local_messages for session 'ILUIWU'
[20:53:23] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[20:53:23] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[20:53:23] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[20:53:23] DOWNLOADIIING t_bae538c2a3076c11.jpg
[20:53:23] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[20:53:23] DOWNLOADIIING t_5cfd84d52271d308.jpg
[20:53:23] DOWNLOADIIING t_919f4df51be24b2c.jpg
[20:53:23] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[20:53:23] DOWNLOADIIING t_32675c319a37fee7.jpg
[20:53:23] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[20:53:23] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[20:53:23] DOWNLOADIIING t_abb65f630e55dc61.jpg
[20:53:23] DOWNLOADIIING t_2a4c7380908d6595.jpg
[20:53:23] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[20:53:23] DOWNLOADIIING t_02f48c94671cc64e.jpg
[20:53:23] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[20:53:23] DOWNLOADIIING t_364b0669ed2f3378.jpg
[20:53:23] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[20:53:23] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[20:53:23] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[20:53:23] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[20:53:23] DOWNLOADIIING t_722d39e0d91dd954.jpg
[20:53:23] DOWNLOADIIING t_97828ef5de49a612.jpg
[20:53:23] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[20:53:23] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7220
[20:53:23] [REFRESH_ALL] 📊 Server returned 7220 messages
[20:53:23] [REFRESH_ALL] 📊 Final merge: server=7220, preserved=0, total=7220
[20:53:23] [REFRESH_ALL] 📊 Displaying 50 of 7220 messages, hasMore=true
[20:53:23] [VIEWER_INIT] Loaded 50 messages with read receipts
[20:53:23] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[20:53:23] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[20:53:23] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:53:23] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:53:23] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[20:53:23] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:53:23] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:53:23] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[20:53:25] [MENU] dismissAnyExistingMenu called
[20:53:25] [MENU] dismissAnyExistingMenu completed
[20:53:26] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[20:53:26] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[20:53:27] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:53:27] [SEARCH] Found 0 messages matching 'b' in local DB
[20:53:27] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:53:27] [SEARCH] Found 0 messages matching 'ba' in local DB
[20:53:27] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:53:27] [SEARCH] Found 0 messages matching 'bab' in local DB
[20:53:27] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:53:27] [SEARCH] Found 0 messages matching 'baby' in local DB
[20:54:16] [CRASH] Previous session did not exit cleanly - crash detected
[20:54:16] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[20:54:16] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[20:54:16] [GIPHY] SDK not available - using REST API fallback
[20:54:16] [BACKGROUND] Background fetch enabled
[20:54:16] [AUTH] Starting PIN authentication
[20:54:16] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[20:54:16] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:54:16] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[20:54:16] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[20:54:16] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[20:54:16] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[20:54:16] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[20:54:16] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:54:16] [USER] ✅ User registered successfully
[20:54:16] [PUSH] User registration after token update: success
[20:54:16] [CLIENT_SIG] WebSocket opened
[20:54:16] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[20:54:16] [CLIENT_SIG] Connected! clientId=SuJCAdtYrMIJXht1
[20:54:16] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[20:54:16] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:54:16] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18454)...
[20:54:16] [PRELOAD] No messages or parse error
[20:54:19] [PIN_AUTH] Correct PIN
[20:54:19] [SECURITY] Restored real session: ILUIWU
[20:54:19] [SECURITY] Restored real session: ILUIWU
[20:54:20] [SECURITY] Saved real session: ILUIWU
[20:54:20] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[20:54:20] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[20:54:20] Documents Directory: /var/mobile/Containers/Data/Application/2DFD1A5A-EA06-439B-9990-608041FD7628/Documents
[20:54:20] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[20:54:20] [THEME] Applying current theme
[20:54:20] [CHAT] Applied day theme (mode: day)
[20:54:20] [SECURITY] Saved real session: ILUIWU
[20:54:20] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[20:54:20] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[20:54:20] [NETWORK] Network monitor started
[20:54:20] [NETWORK] Status changed: connected
[20:54:20] Did transition
[20:54:20] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[20:54:20] [VIEWER] Screen lock enabled - normal idle behavior
[20:54:20] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[20:54:20] [VCC] ========== VideoConnectionClass INIT ==========
[20:54:20] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[20:54:20] [DATA AUDIO] ========== setupWebRTC() START ==========
[20:54:20] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[20:54:20] [DATA AUDIO] Creating encoder/decoder factories...
[20:54:20] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[20:54:20] [CODEC] Viewer selected encoder: AV1 (best quality)
[20:54:20] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[20:54:20] [DATA AUDIO] ✅ Factory created
[20:54:20] [DATA AUDIO] RTCAudioSession locked
[20:54:20] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[20:54:20] [DATA AUDIO] RTCAudioSession unlocked
[20:54:20] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[20:54:20] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[20:54:20] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[20:54:20] [WS] Opening session at ws://crivello.dyndns.org:8081/
[20:54:20] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[20:54:20] [VIEWER_INIT] No messages loaded yet - fetching from server
[20:54:20] [REFRESH_ALL] 🔄 refreshAllFromServer called from: VIEWER_INIT, currentMsgCount=0
[20:54:20] [REFRESH_ALL] 📸 Captured 0 message IDs before request
[20:54:20] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:54:20] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[20:54:20] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[20:54:20] Did transition
[20:54:20] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:54:20] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:54:20] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[20:54:20] [MIGRATION] No messages need sender_name backfill
[20:54:20] [REFRESH_ALL] 🔄 refreshAllFromServer called from: noLocalData, currentMsgCount=0
[20:54:20] [REFRESH_ALL] ⚠️ Already reloading - skipping request from: noLocalData
[20:54:20] [GALLERY_DB] ✅ Loaded 0 media messages
[20:54:20] [GALLERY] Filtered 0 -> 0 (only with local thumbnails)
[20:54:20] [GALLERY] First 5 after sort (newest first):
[20:54:20] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[20:54:20] [SERVER] Starting reconnect polling (5s interval)
[20:54:20] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[20:54:20] [ICONS] Offset applied: -14.6
[20:54:20] [ICONS] New left margin: 11.2, New right margin: 11.3
[20:54:20] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[20:54:20] [UNSENT_RETRY] Checking for unsent messages...
[20:54:20] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[20:54:20] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:54:20] [UPLOAD_RECOVERY] Session: ILUIWU
[20:54:20] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[20:54:20] [UPLOAD_RECOVERY] Checking recent media messages on server...
[20:54:20] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[20:54:20] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[20:54:20] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[20:54:20] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[20:54:20] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[20:54:20] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[20:54:20] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[20:54:20] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[20:54:20] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[20:54:20] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[20:54:20] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[20:54:20] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[20:54:20] [PENDING_UPLOAD] Total pending upload messages: 0
[20:54:20] [UNSENT_RETRY] No unsent messages found
[20:54:20] [UPLOAD_RECOVERY] ✅ All media files verified on server
[20:54:20] [USER] ✅ User registered successfully
[20:54:20] [USER] User registration successful
[20:54:20] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[20:54:20] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[20:54:20] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[20:54:20] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:54:20] [ICONS] Chat center: (31.2, 87.0)
[20:54:20] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[20:54:20] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[20:54:20] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[20:54:20] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[20:54:20] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[20:54:20] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[20:54:20] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[20:54:20] [ICONS] Screen width: 440.0
[20:54:20] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[20:54:20] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:54:20] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:54:20] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[20:54:20] new_session POST ok: token len=157
[20:54:20] HELLO → sent (fetched token, role=query)
[20:54:20] [SIG] hello_ok received for query connection - ready to query agents
[20:54:20] [SIG] get_agents request sent for sessionId=ILUIWU
[20:54:20] [SIG] get_agents request sent for sessionId=iosILUIWU
[20:54:20] [SERVER] Stopped reconnect polling
[20:54:20] [SIG] agents_list received: []
[20:54:20] [SIG] agents_list received: []
[20:54:20] [PENDING_UPLOAD] Total pending upload messages: 0
[20:54:20] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[20:54:20] [DB_INSERT] Starting insert of 7220 messages for session 'ILUIWU'
[20:54:20] [DB_INSERT] ✅ After insert: 7222 messages in local_messages for session 'ILUIWU'
[20:54:21] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[20:54:21] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[20:54:21] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[20:54:21] DOWNLOADIIING t_bae538c2a3076c11.jpg
[20:54:21] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[20:54:21] DOWNLOADIIING t_5cfd84d52271d308.jpg
[20:54:21] DOWNLOADIIING t_919f4df51be24b2c.jpg
[20:54:21] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[20:54:21] DOWNLOADIIING t_32675c319a37fee7.jpg
[20:54:21] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[20:54:21] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[20:54:21] DOWNLOADIIING t_abb65f630e55dc61.jpg
[20:54:21] DOWNLOADIIING t_2a4c7380908d6595.jpg
[20:54:21] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[20:54:21] DOWNLOADIIING t_02f48c94671cc64e.jpg
[20:54:21] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[20:54:21] DOWNLOADIIING t_364b0669ed2f3378.jpg
[20:54:21] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[20:54:21] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[20:54:21] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[20:54:21] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[20:54:21] DOWNLOADIIING t_722d39e0d91dd954.jpg
[20:54:21] DOWNLOADIIING t_97828ef5de49a612.jpg
[20:54:21] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[20:54:21] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7220
[20:54:21] [REFRESH_ALL] 📊 Server returned 7220 messages
[20:54:21] [REFRESH_ALL] 📊 Final merge: server=7220, preserved=0, total=7220
[20:54:21] [REFRESH_ALL] 📊 Displaying 50 of 7220 messages, hasMore=true
[20:54:21] [VIEWER_INIT] Loaded 50 messages with read receipts
[20:54:21] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[20:54:21] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[20:54:21] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:54:21] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:54:21] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[20:54:21] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:54:21] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:54:21] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[20:54:24] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[20:54:25] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[20:54:27] [MENU] dismissAnyExistingMenu called
[20:54:27] [MENU] dismissAnyExistingMenu completed
[20:54:29] [SCROLL_BTN] Showing button - 309pt from bottom > half 223pt
[20:54:30] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:54:30] [SEARCH] Found 0 messages matching 'b' in local DB
[20:54:31] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:54:31] [SEARCH] Found 0 messages matching 'b' in local DB
[20:54:32] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:54:32] [SEARCH] Found 0 messages matching 'ba' in local DB
[20:54:32] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:54:32] [SEARCH] Found 0 messages matching 'bab' in local DB
[20:54:33] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:54:33] [SEARCH] Found 0 messages matching 'baby' in local DB
[20:55:20] [CRASH] Previous session did not exit cleanly - crash detected
[20:55:20] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[20:55:20] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[20:55:20] [GIPHY] SDK not available - using REST API fallback
[20:55:20] [BACKGROUND] Background fetch enabled
[20:55:20] [AUTH] Starting PIN authentication
[20:55:20] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[20:55:20] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:55:20] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[20:55:20] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[20:55:20] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[20:55:20] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[20:55:20] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[20:55:20] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:55:20] [USER] ✅ User registered successfully
[20:55:20] [PUSH] User registration after token update: success
[20:55:20] [CLIENT_SIG] WebSocket opened
[20:55:20] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[20:55:20] [CLIENT_SIG] Connected! clientId=--pb2_XYetrbyt-X
[20:55:20] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[20:55:20] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:55:20] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18454)...
[20:55:20] [PRELOAD] No messages or parse error
[20:55:21] [PIN_AUTH] Correct PIN
[20:55:21] [SECURITY] Restored real session: ILUIWU
[20:55:21] [SECURITY] Restored real session: ILUIWU
[20:55:21] [SECURITY] Saved real session: ILUIWU
[20:55:22] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[20:55:22] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[20:55:22] Documents Directory: /var/mobile/Containers/Data/Application/156B17A8-E2C3-4EB9-A8CB-240115DCA026/Documents
[20:55:22] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[20:55:22] [THEME] Applying current theme
[20:55:22] [CHAT] Applied day theme (mode: day)
[20:55:22] [SECURITY] Saved real session: ILUIWU
[20:55:22] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[20:55:22] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[20:55:22] [NETWORK] Network monitor started
[20:55:22] [NETWORK] Status changed: connected
[20:55:22] Did transition
[20:55:22] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[20:55:22] [VIEWER] Screen lock enabled - normal idle behavior
[20:55:22] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[20:55:22] [VCC] ========== VideoConnectionClass INIT ==========
[20:55:22] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[20:55:22] [DATA AUDIO] ========== setupWebRTC() START ==========
[20:55:22] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[20:55:22] [DATA AUDIO] Creating encoder/decoder factories...
[20:55:22] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[20:55:22] [CODEC] Viewer selected encoder: AV1 (best quality)
[20:55:22] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[20:55:22] [DATA AUDIO] ✅ Factory created
[20:55:22] [DATA AUDIO] RTCAudioSession locked
[20:55:22] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[20:55:22] [DATA AUDIO] RTCAudioSession unlocked
[20:55:22] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[20:55:22] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[20:55:22] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[20:55:22] [WS] Opening session at ws://crivello.dyndns.org:8081/
[20:55:22] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[20:55:22] [VIEWER_INIT] No messages loaded yet - fetching from server
[20:55:22] [REFRESH_ALL] 🔄 refreshAllFromServer called from: VIEWER_INIT, currentMsgCount=0
[20:55:22] [REFRESH_ALL] 📸 Captured 0 message IDs before request
[20:55:22] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:55:22] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[20:55:22] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[20:55:22] Did transition
[20:55:22] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:55:22] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:55:22] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[20:55:22] [MIGRATION] No messages need sender_name backfill
[20:55:22] [REFRESH_ALL] 🔄 refreshAllFromServer called from: noLocalData, currentMsgCount=0
[20:55:22] [REFRESH_ALL] ⚠️ Already reloading - skipping request from: noLocalData
[20:55:22] [GALLERY_DB] ✅ Loaded 0 media messages
[20:55:22] [GALLERY] Filtered 0 -> 0 (only with local thumbnails)
[20:55:22] [GALLERY] First 5 after sort (newest first):
[20:55:22] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[20:55:22] [SERVER] Starting reconnect polling (5s interval)
[20:55:22] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[20:55:22] [ICONS] Offset applied: -14.6
[20:55:22] [ICONS] New left margin: 11.2, New right margin: 11.3
[20:55:22] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[20:55:22] [UNSENT_RETRY] Checking for unsent messages...
[20:55:22] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[20:55:22] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:55:22] [UPLOAD_RECOVERY] Session: ILUIWU
[20:55:22] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[20:55:22] [UPLOAD_RECOVERY] Checking recent media messages on server...
[20:55:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[20:55:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[20:55:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[20:55:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[20:55:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[20:55:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[20:55:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[20:55:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[20:55:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[20:55:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[20:55:22] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[20:55:22] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[20:55:22] [PENDING_UPLOAD] Total pending upload messages: 0
[20:55:22] [UNSENT_RETRY] No unsent messages found
[20:55:22] [UPLOAD_RECOVERY] ✅ All media files verified on server
[20:55:22] [USER] ✅ User registered successfully
[20:55:22] [USER] User registration successful
[20:55:22] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[20:55:22] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[20:55:22] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[20:55:22] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:55:22] [ICONS] Chat center: (31.2, 87.0)
[20:55:22] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[20:55:22] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[20:55:22] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[20:55:22] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[20:55:22] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[20:55:22] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[20:55:22] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[20:55:22] [ICONS] Screen width: 440.0
[20:55:22] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[20:55:22] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:55:22] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:55:22] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[20:55:22] new_session POST ok: token len=157
[20:55:22] HELLO → sent (fetched token, role=query)
[20:55:22] [SIG] hello_ok received for query connection - ready to query agents
[20:55:22] [SIG] get_agents request sent for sessionId=ILUIWU
[20:55:22] [SIG] get_agents request sent for sessionId=iosILUIWU
[20:55:22] [SERVER] Stopped reconnect polling
[20:55:22] [SIG] agents_list received: []
[20:55:22] [SIG] agents_list received: []
[20:55:22] [PENDING_UPLOAD] Total pending upload messages: 0
[20:55:22] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[20:55:22] [DB_INSERT] Starting insert of 7220 messages for session 'ILUIWU'
[20:55:22] [DB_INSERT] ✅ After insert: 7222 messages in local_messages for session 'ILUIWU'
[20:55:22] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[20:55:23] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[20:55:23] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[20:55:23] DOWNLOADIIING t_bae538c2a3076c11.jpg
[20:55:23] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[20:55:23] DOWNLOADIIING t_5cfd84d52271d308.jpg
[20:55:23] DOWNLOADIIING t_919f4df51be24b2c.jpg
[20:55:23] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[20:55:23] DOWNLOADIIING t_32675c319a37fee7.jpg
[20:55:23] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[20:55:23] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[20:55:23] DOWNLOADIIING t_abb65f630e55dc61.jpg
[20:55:23] DOWNLOADIIING t_2a4c7380908d6595.jpg
[20:55:23] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[20:55:23] DOWNLOADIIING t_02f48c94671cc64e.jpg
[20:55:23] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[20:55:23] DOWNLOADIIING t_364b0669ed2f3378.jpg
[20:55:23] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[20:55:23] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[20:55:23] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[20:55:23] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[20:55:23] DOWNLOADIIING t_722d39e0d91dd954.jpg
[20:55:23] DOWNLOADIIING t_97828ef5de49a612.jpg
[20:55:23] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[20:55:23] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7220
[20:55:23] [REFRESH_ALL] 📊 Server returned 7220 messages
[20:55:23] [REFRESH_ALL] 📊 Final merge: server=7220, preserved=0, total=7220
[20:55:23] [REFRESH_ALL] 📊 Displaying 50 of 7220 messages, hasMore=true
[20:55:23] [VIEWER_INIT] Loaded 50 messages with read receipts
[20:55:23] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[20:55:23] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[20:55:23] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:55:23] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:55:23] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[20:55:23] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:55:23] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:55:23] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[20:55:24] [MENU] dismissAnyExistingMenu called
[20:55:24] [MENU] dismissAnyExistingMenu completed
[20:55:25] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:55:25] [SEARCH] Found 0 messages matching 'b' in local DB
[20:55:25] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:55:25] [SEARCH] Found 0 messages matching 'ba' in local DB
[20:55:25] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:55:25] [SEARCH] Found 0 messages matching 'bab' in local DB
[20:55:26] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:55:26] [SEARCH] Found 0 messages matching 'baby' in local DB
[20:55:27] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[20:55:27] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[20:55:58] [LIFECYCLE] App resigning active - cleared crash flag
[20:55:59] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[20:55:59] [SECURITY] Saved background timestamp
[20:55:59] [LIFECYCLE] App entering background - cleared crash flag
[20:55:59] [CLIENT_SIG] Disconnecting
[20:55:59] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[20:55:59] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[20:55:59] [WS] Canceling WebSocket for query connection to iosILUIWU
[20:55:59] In cleanupPeer
[20:55:59] In cleanupPeer
[20:55:59] [LIFECYCLE] WebRTC audio disabled
[20:55:59] [LIFECYCLE] AVAudioSession deactivated
[20:55:59] [LIFECYCLE] All connections stopped
[20:55:59] [CLIENT_SIG] WebSocket closed with code 1001
[20:55:59] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[20:55:59] [SERVER] Stopped reconnect polling
[20:55:59] [WS] WebSocket ACTUALLY CLOSED - isQueryOnly=true, connectionStr=iosILUIWU, closeCode=1001
[20:55:59] [WS] Query connection to iosILUIWU closed - cleaning up all agent connections and views
[20:55:59] Will request stop of video 0
[20:55:59] Will request stop of video 0
[20:55:59] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[20:55:59] [WS] Query connection failed - cleaning up all agent connections and views
[20:55:59] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[20:55:59] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[20:55:59] [CLEANUP] ========================================
[20:55:59] [CLEANUP] Cleaning up all agent connections and views
[20:55:59] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[20:55:59] [CLEANUP] Stopped and removed 0 video connections
[20:55:59] [CLEANUP] Removed 0 video views
[20:55:59] [CLEANUP] Removed 0 feed scroll views
[20:55:59] [CLEANUP] Removed 0 status labels
[20:55:59] [CLEANUP] Reset agent query state
[20:55:59] [CLEANUP] Updated page indicator
[20:55:59] [CLEANUP] Rebuilt video layout
[20:55:59] [CLEANUP] ✅ All agent connections and views cleaned up
[20:55:59] [CLEANUP] ========================================
[20:55:59] [SERVER] Skipping reconnect polling - app is in background
[20:55:59] [PIP] Removing 0 tracks from PiP for connection 0
[20:55:59] [PIP] ✅ All tracks removed for connection 0
[20:55:59] [WS] URLSession invalidated successfully
[20:55:59] [PIP] Removing 0 tracks from PiP for connection 0
[20:55:59] [PIP] ✅ All tracks removed for connection 0
[20:55:59] [CLEANUP] ========================================
[20:55:59] [CLEANUP] Cleaning up all agent connections and views
[20:55:59] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[20:55:59] [CLEANUP] Stopped and removed 0 video connections
[20:55:59] [CLEANUP] Removed 0 video views
[20:55:59] [CLEANUP] Removed 0 feed scroll views
[20:55:59] [CLEANUP] Removed 0 status labels
[20:55:59] [CLEANUP] Reset agent query state
[20:55:59] [CLEANUP] Updated page indicator
[20:55:59] [CLEANUP] Rebuilt video layout
[20:55:59] [CLEANUP] ✅ All agent connections and views cleaned up
[20:55:59] [CLEANUP] ========================================
[20:55:59] [SERVER] Skipping reconnect polling - app is in background
[20:56:01] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[20:56:01] [WS] Opening session at ws://crivello.dyndns.org:8081/
[20:56:01] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[20:56:01] HELLO → sent (cached token, role=query)
[20:56:01] [SIG] hello_ok received for query connection - ready to query agents
[20:56:01] [SIG] get_agents request sent for sessionId=ILUIWU
[20:56:01] [SIG] get_agents request sent for sessionId=iosILUIWU
[20:56:01] [SERVER] Stopped reconnect polling
[20:56:01] [SIG] agents_list received: []
[20:56:01] [SIG] agents_list received: []
[20:56:03] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:56:04] [CLIENT_SIG] WebSocket opened
[20:56:04] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[20:56:04] [CLIENT_SIG] Connected! clientId=Zzi51UlDQUfGCP6S
[20:56:04] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[20:56:04] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:56:12] [WS] WebSocket task completed with error - isQueryOnly=true: The request timed out.
[20:56:12] [WS] Query connection error - cleaning up all agent connections and views
[20:56:12] [CLEANUP] ========================================
[20:56:12] [CLEANUP] Cleaning up all agent connections and views
[20:56:12] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[20:56:12] [CLEANUP] Stopped and removed 0 video connections
[20:56:12] [CLEANUP] Removed 0 video views
[20:56:12] [CLEANUP] Removed 0 feed scroll views
[20:56:12] [CLEANUP] Removed 0 status labels
[20:56:12] [CLEANUP] Reset agent query state
[20:56:12] [CLEANUP] Updated page indicator
[20:56:12] [CLEANUP] Rebuilt video layout
[20:56:12] [CLEANUP] ✅ All agent connections and views cleaned up
[20:56:12] [CLEANUP] ========================================
[20:56:12] [SERVER] Skipping reconnect polling - app is in background
[20:56:57] [CRASH] No crash detected
[20:56:57] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[20:56:57] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[20:56:57] [GIPHY] SDK not available - using REST API fallback
[20:56:57] [BACKGROUND] Background fetch enabled
[20:56:57] [SECURITY] Initial launch - within timeout (58.47914123535156s < 300.0s)
[20:56:57] [AUTH] Starting PIN authentication
[20:56:57] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[20:56:57] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:56:57] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[20:56:57] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[20:56:57] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[20:56:57] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[20:56:57] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[20:56:57] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:56:58] [USER] ✅ User registered successfully
[20:56:58] [PUSH] User registration after token update: success
[20:56:58] [CLIENT_SIG] WebSocket opened
[20:56:58] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[20:56:58] [CLIENT_SIG] Connected! clientId=--LtPiccM-hvDI51
[20:56:58] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[20:56:58] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:56:58] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18454)...
[20:56:58] [PRELOAD] No messages or parse error
[20:56:59] [PIN_AUTH] Correct PIN
[20:56:59] [SECURITY] Restored real session: ILUIWU
[20:56:59] [SECURITY] Restored real session: ILUIWU
[20:56:59] [SECURITY] Saved real session: ILUIWU
[20:57:00] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[20:57:00] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[20:57:00] Documents Directory: /var/mobile/Containers/Data/Application/F2C17DDF-1516-41C1-A21C-B536C5754D73/Documents
[20:57:00] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[20:57:00] [THEME] Applying current theme
[20:57:00] [CHAT] Applied day theme (mode: day)
[20:57:00] [SECURITY] Saved real session: ILUIWU
[20:57:00] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[20:57:00] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[20:57:00] [NETWORK] Network monitor started
[20:57:00] [NETWORK] Status changed: connected
[20:57:00] Did transition
[20:57:00] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[20:57:00] [VIEWER] Screen lock enabled - normal idle behavior
[20:57:00] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[20:57:00] [VCC] ========== VideoConnectionClass INIT ==========
[20:57:00] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[20:57:00] [DATA AUDIO] ========== setupWebRTC() START ==========
[20:57:00] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[20:57:00] [DATA AUDIO] Creating encoder/decoder factories...
[20:57:00] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[20:57:00] [CODEC] Viewer selected encoder: AV1 (best quality)
[20:57:00] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[20:57:00] [DATA AUDIO] ✅ Factory created
[20:57:00] [DATA AUDIO] RTCAudioSession locked
[20:57:00] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[20:57:00] [DATA AUDIO] RTCAudioSession unlocked
[20:57:00] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[20:57:00] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[20:57:00] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[20:57:00] [WS] Opening session at ws://crivello.dyndns.org:8081/
[20:57:00] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[20:57:00] [VIEWER_INIT] No messages loaded yet - fetching from server
[20:57:00] [REFRESH_ALL] 🔄 refreshAllFromServer called from: VIEWER_INIT, currentMsgCount=0
[20:57:00] [REFRESH_ALL] 📸 Captured 0 message IDs before request
[20:57:00] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:57:00] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[20:57:00] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[20:57:00] Did transition
[20:57:00] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:57:00] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[20:57:00] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[20:57:00] [MIGRATION] No messages need sender_name backfill
[20:57:00] [REFRESH_ALL] 🔄 refreshAllFromServer called from: noLocalData, currentMsgCount=0
[20:57:00] [REFRESH_ALL] ⚠️ Already reloading - skipping request from: noLocalData
[20:57:00] [GALLERY_DB] ✅ Loaded 0 media messages
[20:57:00] [GALLERY] Filtered 0 -> 0 (only with local thumbnails)
[20:57:00] [GALLERY] First 5 after sort (newest first):
[20:57:00] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[20:57:00] [SERVER] Starting reconnect polling (5s interval)
[20:57:00] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[20:57:00] [ICONS] Offset applied: -14.6
[20:57:00] [ICONS] New left margin: 11.2, New right margin: 11.3
[20:57:00] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[20:57:00] [UNSENT_RETRY] Checking for unsent messages...
[20:57:00] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[20:57:00] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[20:57:00] [UPLOAD_RECOVERY] Session: ILUIWU
[20:57:00] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[20:57:00] [UPLOAD_RECOVERY] Checking recent media messages on server...
[20:57:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[20:57:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[20:57:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[20:57:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[20:57:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[20:57:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[20:57:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[20:57:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[20:57:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[20:57:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[20:57:00] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[20:57:00] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[20:57:00] [PENDING_UPLOAD] Total pending upload messages: 0
[20:57:00] [UNSENT_RETRY] No unsent messages found
[20:57:00] [UPLOAD_RECOVERY] ✅ All media files verified on server
[20:57:00] [USER] ✅ User registered successfully
[20:57:00] [USER] User registration successful
[20:57:00] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[20:57:00] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[20:57:00] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[20:57:00] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[20:57:00] [ICONS] Chat center: (31.2, 87.0)
[20:57:00] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[20:57:00] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[20:57:00] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[20:57:00] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[20:57:00] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[20:57:00] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[20:57:00] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[20:57:00] [ICONS] Screen width: 440.0
[20:57:00] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[20:57:00] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:57:00] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[20:57:00] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[20:57:00] new_session POST ok: token len=157
[20:57:00] HELLO → sent (fetched token, role=query)
[20:57:00] [SIG] hello_ok received for query connection - ready to query agents
[20:57:00] [SIG] get_agents request sent for sessionId=ILUIWU
[20:57:00] [SIG] get_agents request sent for sessionId=iosILUIWU
[20:57:00] [SERVER] Stopped reconnect polling
[20:57:00] [SIG] agents_list received: []
[20:57:00] [SIG] agents_list received: []
[20:57:00] [PENDING_UPLOAD] Total pending upload messages: 0
[20:57:00] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[20:57:00] [DB_INSERT] Starting insert of 7220 messages for session 'ILUIWU'
[20:57:00] [DB_INSERT] ✅ After insert: 7222 messages in local_messages for session 'ILUIWU'
[20:57:01] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[20:57:01] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[20:57:01] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[20:57:01] DOWNLOADIIING t_bae538c2a3076c11.jpg
[20:57:01] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[20:57:01] DOWNLOADIIING t_5cfd84d52271d308.jpg
[20:57:01] DOWNLOADIIING t_919f4df51be24b2c.jpg
[20:57:01] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[20:57:01] DOWNLOADIIING t_32675c319a37fee7.jpg
[20:57:01] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[20:57:01] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[20:57:01] DOWNLOADIIING t_abb65f630e55dc61.jpg
[20:57:01] DOWNLOADIIING t_2a4c7380908d6595.jpg
[20:57:01] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[20:57:01] DOWNLOADIIING t_02f48c94671cc64e.jpg
[20:57:01] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[20:57:01] DOWNLOADIIING t_364b0669ed2f3378.jpg
[20:57:01] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[20:57:01] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[20:57:01] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[20:57:01] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[20:57:01] DOWNLOADIIING t_722d39e0d91dd954.jpg
[20:57:01] DOWNLOADIIING t_97828ef5de49a612.jpg
[20:57:01] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[20:57:01] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7220
[20:57:01] [REFRESH_ALL] 📊 Server returned 7220 messages
[20:57:01] [REFRESH_ALL] 📊 Final merge: server=7220, preserved=0, total=7220
[20:57:01] [REFRESH_ALL] 📊 Displaying 50 of 7220 messages, hasMore=true
[20:57:01] [VIEWER_INIT] Loaded 50 messages with read receipts
[20:57:01] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[20:57:01] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[20:57:01] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:57:01] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:57:01] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[20:57:01] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[20:57:01] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[20:57:01] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[20:57:02] [MENU] dismissAnyExistingMenu called
[20:57:02] [MENU] dismissAnyExistingMenu completed
[20:57:03] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:57:03] [SEARCH] About to query sample messages...
[20:57:03] [SEARCH] Query prepared OK
[20:57:03] [SEARCH] Sample row 1: id=0, type=0, session='<NULL>', sender='', msg='<NULL>'
[20:57:03] [SEARCH] Sample row 2: id=-9, type=0, session='ILUIWU', sender='Laurent', msg='For me'
[20:57:03] [SEARCH] Sample row 3: id=0, type=0, session='<NULL>', sender='', msg='<NULL>'
[20:57:03] [SEARCH] Sample query returned 3 rows
[20:57:03] [SEARCH] Found 0 messages matching 'b' in local DB
[20:57:03] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:57:03] [SEARCH] About to query sample messages...
[20:57:03] [SEARCH] Query prepared OK
[20:57:03] [SEARCH] Sample row 1: id=0, type=0, session='<NULL>', sender='', msg='<NULL>'
[20:57:03] [SEARCH] Sample row 2: id=-9, type=0, session='ILUIWU', sender='Laurent', msg='For me'
[20:57:03] [SEARCH] Sample row 3: id=0, type=0, session='<NULL>', sender='', msg='<NULL>'
[20:57:03] [SEARCH] Sample query returned 3 rows
[20:57:03] [SEARCH] Found 0 messages matching 'ba' in local DB
[20:57:03] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:57:03] [SEARCH] About to query sample messages...
[20:57:03] [SEARCH] Query prepared OK
[20:57:03] [SEARCH] Sample row 1: id=0, type=0, session='<NULL>', sender='', msg='<NULL>'
[20:57:03] [SEARCH] Sample row 2: id=-9, type=0, session='ILUIWU', sender='Laurent', msg='For me'
[20:57:03] [SEARCH] Sample row 3: id=0, type=0, session='<NULL>', sender='', msg='<NULL>'
[20:57:03] [SEARCH] Sample query returned 3 rows
[20:57:03] [SEARCH] Found 0 messages matching 'bab' in local DB
[20:57:04] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[20:57:04] [SEARCH] About to query sample messages...
[20:57:04] [SEARCH] Query prepared OK
[20:57:04] [SEARCH] Sample row 1: id=0, type=0, session='<NULL>', sender='', msg='<NULL>'
[20:57:04] [SEARCH] Sample row 2: id=-9, type=0, session='ILUIWU', sender='Laurent', msg='For me'
[20:57:04] [SEARCH] Sample row 3: id=0, type=0, session='<NULL>', sender='', msg='<NULL>'
[20:57:04] [SEARCH] Sample query returned 3 rows
[20:57:04] [SEARCH] Found 0 messages matching 'baby' in local DB
[20:57:04] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[20:57:04] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[20:57:30] [LIFECYCLE] App resigning active - cleared crash flag
[20:57:31] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[20:57:31] [SECURITY] Saved background timestamp
[20:57:31] [LIFECYCLE] App entering background - cleared crash flag
[20:57:31] [CLIENT_SIG] Disconnecting
[20:57:31] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[20:57:31] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[20:57:31] [WS] Canceling WebSocket for query connection to iosILUIWU
[20:57:31] In cleanupPeer
[20:57:31] In cleanupPeer
[20:57:31] [LIFECYCLE] WebRTC audio disabled
[20:57:31] [LIFECYCLE] AVAudioSession deactivated
[20:57:31] [LIFECYCLE] All connections stopped
[20:57:31] [CLIENT_SIG] WebSocket closed with code 1001
[20:57:31] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[20:57:31] [SERVER] Stopped reconnect polling
[20:57:31] Will request stop of video 0
[20:57:31] Will request stop of video 0
[20:57:31] [WS] WebSocket ACTUALLY CLOSED - isQueryOnly=true, connectionStr=iosILUIWU, closeCode=1001
[20:57:31] [WS] Query connection to iosILUIWU closed - cleaning up all agent connections and views
[20:57:31] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[20:57:31] [WS] Query connection failed - cleaning up all agent connections and views
[20:57:31] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[20:57:31] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[20:57:31] [PIP] Removing 0 tracks from PiP for connection 0
[20:57:31] [PIP] ✅ All tracks removed for connection 0
[20:57:31] [PIP] Removing 0 tracks from PiP for connection 0
[20:57:31] [PIP] ✅ All tracks removed for connection 0
[20:57:31] [CLEANUP] ========================================
[20:57:31] [CLEANUP] Cleaning up all agent connections and views
[20:57:31] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[20:57:31] [CLEANUP] Stopped and removed 0 video connections
[20:57:31] [CLEANUP] Removed 0 video views
[20:57:31] [CLEANUP] Removed 0 feed scroll views
[20:57:31] [CLEANUP] Removed 0 status labels
[20:57:31] [CLEANUP] Reset agent query state
[20:57:31] [CLEANUP] Updated page indicator
[20:57:31] [CLEANUP] Rebuilt video layout
[20:57:31] [CLEANUP] ✅ All agent connections and views cleaned up
[20:57:31] [CLEANUP] ========================================
[20:57:31] [SERVER] Skipping reconnect polling - app is in background
[20:57:31] [WS] URLSession invalidated successfully
[20:57:31] [CLEANUP] ========================================
[20:57:31] [CLEANUP] Cleaning up all agent connections and views
[20:57:31] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[20:57:31] [CLEANUP] Stopped and removed 0 video connections
[20:57:31] [CLEANUP] Removed 0 video views
[20:57:31] [CLEANUP] Removed 0 feed scroll views
[20:57:31] [CLEANUP] Removed 0 status labels
[20:57:31] [CLEANUP] Reset agent query state
[20:57:31] [CLEANUP] Updated page indicator
[20:57:31] [CLEANUP] Rebuilt video layout
[20:57:31] [CLEANUP] ✅ All agent connections and views cleaned up
[20:57:31] [CLEANUP] ========================================
[20:57:31] [SERVER] Skipping reconnect polling - app is in background
[20:57:33] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[20:57:33] [WS] Opening session at ws://crivello.dyndns.org:8081/
[20:57:33] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[20:57:33] HELLO → sent (cached token, role=query)
[20:57:33] [SIG] hello_ok received for query connection - ready to query agents
[20:57:33] [SIG] get_agents request sent for sessionId=ILUIWU
[20:57:33] [SIG] get_agents request sent for sessionId=iosILUIWU
[20:57:33] [SERVER] Stopped reconnect polling
[20:57:33] [SIG] agents_list received: []
[20:57:33] [SIG] agents_list received: []
[20:57:36] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[20:57:36] [CLIENT_SIG] WebSocket opened
[20:57:36] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[20:57:36] [CLIENT_SIG] Connected! clientId=q6MERVJ5k2qkv_UZ
[20:57:36] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[20:57:36] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:02:30] [CRASH] No crash detected
[21:02:30] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:02:30] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:02:30] [GIPHY] SDK not available - using REST API fallback
[21:02:30] [BACKGROUND] Background fetch enabled
[21:02:30] [SECURITY] Initial launch - within timeout (298.58197116851807s < 300.0s)
[21:02:30] [AUTH] Starting PIN authentication
[21:02:30] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:02:30] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:02:30] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[21:02:30] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:02:30] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:02:30] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:02:30] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:02:30] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:02:30] [USER] ✅ User registered successfully
[21:02:30] [PUSH] User registration after token update: success
[21:02:30] [PUSH] Silent push received
[21:02:30] [PUSH_EMBED] No embedded message_data in notification
[21:02:30] [PUSH] No embedded data, pre-loading messages from server
[21:02:30] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:02:30] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:02:30] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18454)...
[21:02:30] [CLIENT_SIG] WebSocket opened
[21:02:30] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:02:30] [CLIENT_SIG] Connected! clientId=_Mlvts5S4_9Zx2jC
[21:02:30] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:02:30] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:02:30] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:02:30] [PRELOAD] No messages or parse error
[21:02:30] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:02:35] [PIN_AUTH] Correct PIN
[21:02:35] [SECURITY] Restored real session: ILUIWU
[21:02:35] [SECURITY] Restored real session: ILUIWU
[21:02:35] [SECURITY] Saved real session: ILUIWU
[21:02:35] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:02:35] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:02:35] Documents Directory: /var/mobile/Containers/Data/Application/BE754705-B787-40EB-9580-CF9C83FBD26F/Documents
[21:02:35] [THEME] Applying current theme
[21:02:35] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:02:35] [CHAT] Applied day theme (mode: day)
[21:02:35] [SECURITY] Saved real session: ILUIWU
[21:02:35] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:02:35] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:02:35] [NETWORK] Network monitor started
[21:02:35] [NETWORK] Status changed: connected
[21:02:35] Did transition
[21:02:35] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:02:35] [VIEWER] Screen lock enabled - normal idle behavior
[21:02:35] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:02:35] [VCC] ========== VideoConnectionClass INIT ==========
[21:02:35] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:02:35] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:02:35] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:02:35] [DATA AUDIO] Creating encoder/decoder factories...
[21:02:35] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:02:35] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:02:35] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:02:35] [DATA AUDIO] ✅ Factory created
[21:02:35] [DATA AUDIO] RTCAudioSession locked
[21:02:35] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:02:35] [DATA AUDIO] RTCAudioSession unlocked
[21:02:35] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:02:35] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:02:35] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:02:35] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:02:35] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:02:35] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:02:35] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:02:35] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:02:35] Did transition
[21:02:35] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:02:35] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:02:35] [CHUNK] Merged 884 reactions synchronously
[21:02:35] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:02:35] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:02:35] [MIGRATION] No messages need sender_name backfill
[21:02:35] [GALLERY_DB] ✅ Loaded 0 media messages
[21:02:35] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:02:35] [GALLERY] Filtered 0 -> 0 (only with local thumbnails)
[21:02:35] [GALLERY] First 5 after sort (newest first):
[21:02:35] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18454
[21:02:35] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:02:35] [USER] ✅ User registered successfully
[21:02:35] [USER] User registration successful
[21:02:35] [SERVER] Starting reconnect polling (5s interval)
[21:02:35] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:02:35] [ICONS] Offset applied: -14.6
[21:02:35] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:02:35] [INCREMENTAL_SYNC] ✅ No new messages
[21:02:35] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:02:35] [UNSENT_RETRY] Checking for unsent messages...
[21:02:35] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:02:35] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:02:35] [UPLOAD_RECOVERY] Session: ILUIWU
[21:02:35] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:02:35] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:02:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:02:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:02:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:02:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:02:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:02:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:02:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:02:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:02:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:02:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:02:35] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[21:02:35] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[21:02:35] [PENDING_UPLOAD] Total pending upload messages: 0
[21:02:35] [UNSENT_RETRY] No unsent messages found
[21:02:35] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:02:35] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:02:35] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:02:35] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:02:35] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:02:35] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:02:35] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:02:35] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:02:35] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:02:35] [ICONS] Chat center: (31.2, 87.0)
[21:02:35] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:02:35] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:02:35] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:02:35] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:02:35] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:02:35] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:02:35] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:02:35] [ICONS] Screen width: 440.0
[21:02:35] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:02:35] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:02:35] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:02:35] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:02:35] new_session POST ok: token len=157
[21:02:35] HELLO → sent (fetched token, role=query)
[21:02:35] [SIG] hello_ok received for query connection - ready to query agents
[21:02:35] [SIG] get_agents request sent for sessionId=ILUIWU
[21:02:35] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:02:35] [SERVER] Stopped reconnect polling
[21:02:35] [SIG] agents_list received: []
[21:02:35] [SIG] agents_list received: []
[21:02:36] [COMBINED_FETCH] Loaded 7220 read receipts, 878 messages with reactions
[21:02:36] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:02:36] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:02:39] [MENU] dismissAnyExistingMenu called
[21:02:39] [MENU] dismissAnyExistingMenu completed
[21:02:41] [SCROLL_BTN] Showing button - 310pt from bottom > half 223pt
[21:02:43] [SEARCH] DB has 7218 messages for session 'ILUIWU'
[21:02:43] [SEARCH] Checking messages for session 'ILUIWU'...
[21:02:43] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:02:43] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:02:43] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:02:43] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:02:43] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:02:43] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:02:43] [SEARCH] Found 0 messages matching 'b' in local DB
[21:02:43] [SEARCH] DB has 7218 messages for session 'ILUIWU'
[21:02:43] [SEARCH] Checking messages for session 'ILUIWU'...
[21:02:43] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:02:43] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:02:43] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:02:43] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:02:43] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:02:43] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:02:43] [SEARCH] Found 0 messages matching 'ba' in local DB
[21:02:43] [SEARCH] DB has 7218 messages for session 'ILUIWU'
[21:02:43] [SEARCH] Checking messages for session 'ILUIWU'...
[21:02:43] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:02:43] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:02:43] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:02:43] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:02:43] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:02:43] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:02:43] [SEARCH] Found 0 messages matching 'bab' in local DB
[21:02:43] [SEARCH] DB has 7218 messages for session 'ILUIWU'
[21:02:43] [SEARCH] Checking messages for session 'ILUIWU'...
[21:02:43] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:02:43] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:02:43] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:02:43] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:02:43] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:02:43] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:02:43] [SEARCH] Found 0 messages matching 'baby' in local DB
[21:02:44] [MENU] dismissAnyExistingMenu called
[21:02:44] [MENU] dismissAnyExistingMenu completed
[21:03:17] [LIFECYCLE] App resigning active - cleared crash flag
[21:03:18] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[21:03:18] [SECURITY] Saved background timestamp
[21:03:18] [LIFECYCLE] App entering background - cleared crash flag
[21:03:18] [CLIENT_SIG] Disconnecting
[21:03:18] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[21:03:18] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[21:03:18] [WS] Canceling WebSocket for query connection to iosILUIWU
[21:03:18] In cleanupPeer
[21:03:18] In cleanupPeer
[21:03:18] [LIFECYCLE] WebRTC audio disabled
[21:03:18] [LIFECYCLE] AVAudioSession deactivated
[21:03:18] [LIFECYCLE] All connections stopped
[21:03:18] [CLIENT_SIG] WebSocket closed with code 1001
[21:03:18] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:03:18] [SERVER] Stopped reconnect polling
[21:03:18] Will request stop of video 0
[21:03:18] [WS] WebSocket task completed with error - isQueryOnly=true: cancelled
[21:03:18] [WS] Query connection error - cleaning up all agent connections and views
[21:03:18] Will request stop of video 0
[21:03:18] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[21:03:18] [WS] Query connection failed - cleaning up all agent connections and views
[21:03:18] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[21:03:18] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:03:18] [PIP] Removing 0 tracks from PiP for connection 0
[21:03:18] [PIP] ✅ All tracks removed for connection 0
[21:03:18] [CLEANUP] ========================================
[21:03:18] [CLEANUP] Cleaning up all agent connections and views
[21:03:18] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:03:18] [CLEANUP] Stopped and removed 0 video connections
[21:03:18] [CLEANUP] Removed 0 video views
[21:03:18] [CLEANUP] Removed 0 feed scroll views
[21:03:18] [CLEANUP] Removed 0 status labels
[21:03:18] [CLEANUP] Reset agent query state
[21:03:18] [CLEANUP] Updated page indicator
[21:03:18] [CLEANUP] Rebuilt video layout
[21:03:18] [CLEANUP] ✅ All agent connections and views cleaned up
[21:03:18] [CLEANUP] ========================================
[21:03:18] [SERVER] Skipping reconnect polling - app is in background
[21:03:18] [WS] URLSession invalidated successfully
[21:03:18] [PIP] Removing 0 tracks from PiP for connection 0
[21:03:18] [PIP] ✅ All tracks removed for connection 0
[21:03:18] [CLEANUP] ========================================
[21:03:18] [CLEANUP] Cleaning up all agent connections and views
[21:03:18] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:03:18] [CLEANUP] Stopped and removed 0 video connections
[21:03:18] [CLEANUP] Removed 0 video views
[21:03:18] [CLEANUP] Removed 0 feed scroll views
[21:03:18] [CLEANUP] Removed 0 status labels
[21:03:18] [CLEANUP] Reset agent query state
[21:03:18] [CLEANUP] Updated page indicator
[21:03:18] [CLEANUP] Rebuilt video layout
[21:03:18] [CLEANUP] ✅ All agent connections and views cleaned up
[21:03:18] [CLEANUP] ========================================
[21:03:18] [SERVER] Skipping reconnect polling - app is in background
[21:03:20] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[21:03:20] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:03:20] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:03:20] HELLO → sent (cached token, role=query)
[21:03:20] [SIG] hello_ok received for query connection - ready to query agents
[21:03:20] [SIG] get_agents request sent for sessionId=ILUIWU
[21:03:20] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:03:20] [SERVER] Stopped reconnect polling
[21:03:20] [SIG] agents_list received: []
[21:03:20] [SIG] agents_list received: []
[21:03:22] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:03:23] [CLIENT_SIG] WebSocket opened
[21:03:23] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:03:23] [CLIENT_SIG] Connected! clientId=zixaAwTXc_Qh8sOU
[21:03:23] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:03:23] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:03:30] [WS] WebSocket task completed with error - isQueryOnly=true: The request timed out.
[21:03:30] [WS] Query connection error - cleaning up all agent connections and views
[21:03:30] [CLEANUP] ========================================
[21:03:30] [CLEANUP] Cleaning up all agent connections and views
[21:03:30] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:03:30] [CLEANUP] Stopped and removed 0 video connections
[21:03:30] [CLEANUP] Removed 0 video views
[21:03:30] [CLEANUP] Removed 0 feed scroll views
[21:03:30] [CLEANUP] Removed 0 status labels
[21:03:30] [CLEANUP] Reset agent query state
[21:03:30] [CLEANUP] Updated page indicator
[21:03:30] [CLEANUP] Rebuilt video layout
[21:03:30] [CLEANUP] ✅ All agent connections and views cleaned up
[21:03:30] [CLEANUP] ========================================
[21:03:30] [SERVER] Skipping reconnect polling - app is in background
[21:03:54] [CRASH] No crash detected
[21:03:54] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:03:54] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:03:54] [GIPHY] SDK not available - using REST API fallback
[21:03:54] [BACKGROUND] Background fetch enabled
[21:03:54] [SECURITY] Initial launch - within timeout (35.63092398643494s < 300.0s)
[21:03:54] [AUTH] Starting PIN authentication
[21:03:54] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:03:54] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:03:54] [CLEANUP] No old timer messages to delete
[21:03:54] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:03:54] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:03:54] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:03:54] [USER] ✅ User registered successfully
[21:03:54] [PUSH] User registration after token update: success
[21:03:54] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:03:54] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:03:54] [CLIENT_SIG] WebSocket opened
[21:03:54] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:03:54] [CLIENT_SIG] Connected! clientId=A4b1WZSbHNcWIxuU
[21:03:54] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:03:54] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:03:54] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18454)...
[21:03:54] [PRELOAD] No messages or parse error
[21:03:57] [PIN_AUTH] Correct PIN
[21:03:57] [SECURITY] Restored real session: ILUIWU
[21:03:57] [SECURITY] Restored real session: ILUIWU
[21:03:57] [SECURITY] Saved real session: ILUIWU
[21:03:57] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:03:57] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:03:57] Documents Directory: /var/mobile/Containers/Data/Application/53AAD293-10EC-488F-8049-B608B24A173A/Documents
[21:03:57] [THEME] Applying current theme
[21:03:57] [CHAT] Applied day theme (mode: day)
[21:03:57] [SECURITY] Saved real session: ILUIWU
[21:03:57] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:03:57] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:03:57] [NETWORK] Network monitor started
[21:03:57] [NETWORK] Status changed: connected
[21:03:57] Did transition
[21:03:57] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:03:57] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:03:57] [VIEWER] Screen lock enabled - normal idle behavior
[21:03:57] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:03:57] [VCC] ========== VideoConnectionClass INIT ==========
[21:03:57] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:03:57] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:03:57] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:03:57] [DATA AUDIO] Creating encoder/decoder factories...
[21:03:57] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:03:57] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:03:57] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:03:57] [DATA AUDIO] ✅ Factory created
[21:03:57] [DATA AUDIO] RTCAudioSession locked
[21:03:57] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:03:57] [DATA AUDIO] RTCAudioSession unlocked
[21:03:57] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:03:57] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:03:57] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:03:57] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:03:57] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:03:57] [VIEWER_INIT] No messages loaded yet - fetching from server
[21:03:57] [REFRESH_ALL] 🔄 refreshAllFromServer called from: VIEWER_INIT, currentMsgCount=0
[21:03:57] [REFRESH_ALL] 📸 Captured 0 message IDs before request
[21:03:57] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:03:57] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:03:57] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:03:57] Did transition
[21:03:57] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:03:57] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:03:57] [MIGRATION] No messages need sender_name backfill
[21:03:57] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:03:57] [REFRESH_ALL] 🔄 refreshAllFromServer called from: noLocalData, currentMsgCount=0
[21:03:57] [REFRESH_ALL] ⚠️ Already reloading - skipping request from: noLocalData
[21:03:57] [GALLERY_DB] ✅ Loaded 0 media messages
[21:03:57] [GALLERY] Filtered 0 -> 0 (only with local thumbnails)
[21:03:57] [GALLERY] First 5 after sort (newest first):
[21:03:57] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:03:57] [SERVER] Starting reconnect polling (5s interval)
[21:03:57] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:03:57] [ICONS] Offset applied: -14.6
[21:03:57] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:03:57] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:03:57] [UNSENT_RETRY] Checking for unsent messages...
[21:03:57] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:03:57] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:03:57] [UPLOAD_RECOVERY] Session: ILUIWU
[21:03:57] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:03:57] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:03:57] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:03:57] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:03:57] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:03:57] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:03:57] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:03:57] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:03:57] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:03:57] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:03:57] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:03:57] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:03:57] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[21:03:57] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[21:03:57] [PENDING_UPLOAD] Total pending upload messages: 0
[21:03:57] [UNSENT_RETRY] No unsent messages found
[21:03:57] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:03:57] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[21:03:57] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[21:03:57] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[21:03:57] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:03:57] [USER] ✅ User registered successfully
[21:03:57] [USER] User registration successful
[21:03:57] [ICONS] Chat center: (31.2, 87.0)
[21:03:57] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:03:57] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:03:57] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:03:57] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:03:57] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:03:57] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:03:57] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:03:57] [ICONS] Screen width: 440.0
[21:03:57] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:03:57] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:03:57] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:03:57] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:03:57] new_session POST ok: token len=157
[21:03:57] HELLO → sent (fetched token, role=query)
[21:03:57] [SIG] hello_ok received for query connection - ready to query agents
[21:03:57] [SIG] get_agents request sent for sessionId=ILUIWU
[21:03:57] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:03:57] [SERVER] Stopped reconnect polling
[21:03:57] [SIG] agents_list received: []
[21:03:57] [SIG] agents_list received: []
[21:03:58] [PENDING_UPLOAD] Total pending upload messages: 0
[21:03:58] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[21:03:58] [DB_INSERT] Starting insert of 7220 messages for session 'ILUIWU'
[21:03:58] [DB_INSERT] ✅ After insert: 7222 messages in local_messages for session 'ILUIWU'
[21:03:58] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[21:03:58] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[21:03:58] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[21:03:58] DOWNLOADIIING t_bae538c2a3076c11.jpg
[21:03:58] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[21:03:58] DOWNLOADIIING t_5cfd84d52271d308.jpg
[21:03:58] DOWNLOADIIING t_919f4df51be24b2c.jpg
[21:03:58] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[21:03:58] DOWNLOADIIING t_32675c319a37fee7.jpg
[21:03:58] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[21:03:58] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[21:03:58] DOWNLOADIIING t_abb65f630e55dc61.jpg
[21:03:58] DOWNLOADIIING t_2a4c7380908d6595.jpg
[21:03:58] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[21:03:58] DOWNLOADIIING t_02f48c94671cc64e.jpg
[21:03:58] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[21:03:58] DOWNLOADIIING t_364b0669ed2f3378.jpg
[21:03:58] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[21:03:58] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[21:03:58] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[21:03:58] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[21:03:58] DOWNLOADIIING t_722d39e0d91dd954.jpg
[21:03:58] DOWNLOADIIING t_97828ef5de49a612.jpg
[21:03:58] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[21:03:58] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7220
[21:03:58] [REFRESH_ALL] 📊 Server returned 7220 messages
[21:03:58] [REFRESH_ALL] 📊 Final merge: server=7220, preserved=0, total=7220
[21:03:58] [REFRESH_ALL] 📊 Displaying 50 of 7220 messages, hasMore=true
[21:03:58] [VIEWER_INIT] Loaded 50 messages with read receipts
[21:03:59] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:03:59] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:03:59] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:03:59] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:03:59] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:03:59] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:03:59] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:03:59] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:03:59] [MENU] dismissAnyExistingMenu called
[21:03:59] [MENU] dismissAnyExistingMenu completed
[21:04:01] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[21:04:01] [SEARCH] Checking messages for session 'ILUIWU'...
[21:04:01] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:04:01] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:04:01] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:04:01] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:04:01] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:04:01] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:04:01] [SEARCH] Found 0 messages matching 'b' in local DB
[21:04:01] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[21:04:01] [SEARCH] Checking messages for session 'ILUIWU'...
[21:04:01] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:04:01] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:04:01] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:04:01] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:04:01] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:04:01] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:04:01] [SEARCH] Found 0 messages matching 'ba' in local DB
[21:04:01] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[21:04:01] [SEARCH] Checking messages for session 'ILUIWU'...
[21:04:01] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:04:01] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:04:01] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:04:01] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:04:01] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:04:01] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:04:01] [SEARCH] Found 0 messages matching 'bab' in local DB
[21:04:01] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[21:04:01] [SEARCH] Checking messages for session 'ILUIWU'...
[21:04:01] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:04:01] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:04:01] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:04:01] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:04:01] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:04:01] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:04:01] [SEARCH] Found 0 messages matching 'baby' in local DB
[21:04:02] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[21:04:02] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:05:45] [CRASH] Previous session did not exit cleanly - crash detected
[21:05:45] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:05:45] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:05:45] [GIPHY] SDK not available - using REST API fallback
[21:05:45] [BACKGROUND] Background fetch enabled
[21:05:45] [AUTH] Starting PIN authentication
[21:05:45] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:05:45] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:05:45] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[21:05:45] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:05:45] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:05:45] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:05:45] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:05:45] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:05:45] [USER] ✅ User registered successfully
[21:05:45] [PUSH] User registration after token update: success
[21:05:45] [CLIENT_SIG] WebSocket opened
[21:05:45] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:05:45] [CLIENT_SIG] Connected! clientId=vybwUnWB8qOw6nQ6
[21:05:45] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:05:45] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:05:45] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18454)...
[21:05:46] [PRELOAD] No messages or parse error
[21:05:58] [CRASH] Previous session did not exit cleanly - crash detected
[21:05:58] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:05:58] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:05:58] [GIPHY] SDK not available - using REST API fallback
[21:05:58] [BACKGROUND] Background fetch enabled
[21:05:58] [AUTH] Starting PIN authentication
[21:05:58] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:05:58] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:05:58] [CLEANUP] No old timer messages to delete
[21:05:58] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:05:58] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:05:58] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:05:58] [USER] ✅ User registered successfully
[21:05:58] [PUSH] User registration after token update: success
[21:05:58] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:05:58] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:05:58] [CLIENT_SIG] WebSocket opened
[21:05:58] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:05:58] [CLIENT_SIG] Connected! clientId=EMoheLc_74Itc30F
[21:05:58] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:05:58] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:05:58] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18454)...
[21:05:58] [PRELOAD] No messages or parse error
[21:06:00] [PIN_AUTH] Correct PIN
[21:06:01] [SECURITY] Restored real session: ILUIWU
[21:06:01] [SECURITY] Restored real session: ILUIWU
[21:06:01] [SECURITY] Saved real session: ILUIWU
[21:06:01] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:06:01] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:06:01] Documents Directory: /var/mobile/Containers/Data/Application/F51BC397-510E-42CC-97BD-59C307D09ED1/Documents
[21:06:01] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:06:01] [THEME] Applying current theme
[21:06:01] [CHAT] Applied day theme (mode: day)
[21:06:01] [SECURITY] Saved real session: ILUIWU
[21:06:01] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:06:01] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:06:01] [NETWORK] Network monitor started
[21:06:01] [NETWORK] Status changed: connected
[21:06:01] Did transition
[21:06:01] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:06:01] [VIEWER] Screen lock enabled - normal idle behavior
[21:06:01] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:06:01] [VCC] ========== VideoConnectionClass INIT ==========
[21:06:01] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:06:01] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:06:01] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:06:01] [DATA AUDIO] Creating encoder/decoder factories...
[21:06:01] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:06:01] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:06:01] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:06:01] [DATA AUDIO] ✅ Factory created
[21:06:01] [DATA AUDIO] RTCAudioSession locked
[21:06:01] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:06:01] [DATA AUDIO] RTCAudioSession unlocked
[21:06:01] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:06:01] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:06:01] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:06:01] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:06:01] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:06:01] [VIEWER_INIT] No messages loaded yet - fetching from server
[21:06:01] [REFRESH_ALL] 🔄 refreshAllFromServer called from: VIEWER_INIT, currentMsgCount=0
[21:06:01] [REFRESH_ALL] 📸 Captured 0 message IDs before request
[21:06:01] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:06:01] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:06:01] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:06:01] Did transition
[21:06:01] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:06:01] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:06:01] [MIGRATION] No messages need sender_name backfill
[21:06:01] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:06:01] [REFRESH_ALL] 🔄 refreshAllFromServer called from: noLocalData, currentMsgCount=0
[21:06:01] [REFRESH_ALL] ⚠️ Already reloading - skipping request from: noLocalData
[21:06:01] [GALLERY_DB] ✅ Loaded 0 media messages
[21:06:01] [GALLERY] Filtered 0 -> 0 (only with local thumbnails)
[21:06:01] [GALLERY] First 5 after sort (newest first):
[21:06:01] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:06:01] [SERVER] Starting reconnect polling (5s interval)
[21:06:01] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:06:01] [ICONS] Offset applied: -14.6
[21:06:01] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:06:01] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:06:01] [UNSENT_RETRY] Checking for unsent messages...
[21:06:01] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:06:01] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:06:01] [UPLOAD_RECOVERY] Session: ILUIWU
[21:06:01] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:06:01] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:06:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:06:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:06:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:06:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:06:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:06:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:06:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:06:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:06:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:06:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:06:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[21:06:01] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[21:06:01] [PENDING_UPLOAD] Total pending upload messages: 0
[21:06:01] [UNSENT_RETRY] No unsent messages found
[21:06:01] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:06:01] [USER] ✅ User registered successfully
[21:06:01] [USER] User registration successful
[21:06:01] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[21:06:01] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[21:06:01] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[21:06:01] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:06:01] [ICONS] Chat center: (31.2, 87.0)
[21:06:01] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:06:01] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:06:01] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:06:01] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:06:01] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:06:01] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:06:01] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:06:01] [ICONS] Screen width: 440.0
[21:06:01] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:06:01] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:06:01] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:06:01] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:06:01] new_session POST ok: token len=157
[21:06:01] HELLO → sent (fetched token, role=query)
[21:06:01] [SIG] hello_ok received for query connection - ready to query agents
[21:06:01] [SIG] get_agents request sent for sessionId=ILUIWU
[21:06:01] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:06:01] [SERVER] Stopped reconnect polling
[21:06:01] [SIG] agents_list received: []
[21:06:01] [SIG] agents_list received: []
[21:06:01] [PENDING_UPLOAD] Total pending upload messages: 0
[21:06:01] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[21:06:01] [DB_INSERT] Starting insert of 7220 messages for session 'ILUIWU'
[21:06:01] [DB_INSERT] ✅ After insert: 7222 messages in local_messages for session 'ILUIWU'
[21:06:02] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[21:06:02] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[21:06:02] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[21:06:02] DOWNLOADIIING t_bae538c2a3076c11.jpg
[21:06:02] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[21:06:02] DOWNLOADIIING t_5cfd84d52271d308.jpg
[21:06:02] DOWNLOADIIING t_919f4df51be24b2c.jpg
[21:06:02] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[21:06:02] DOWNLOADIIING t_32675c319a37fee7.jpg
[21:06:02] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[21:06:02] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[21:06:02] DOWNLOADIIING t_abb65f630e55dc61.jpg
[21:06:02] DOWNLOADIIING t_2a4c7380908d6595.jpg
[21:06:02] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[21:06:02] DOWNLOADIIING t_02f48c94671cc64e.jpg
[21:06:02] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[21:06:02] DOWNLOADIIING t_364b0669ed2f3378.jpg
[21:06:02] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[21:06:02] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[21:06:02] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[21:06:02] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[21:06:02] DOWNLOADIIING t_722d39e0d91dd954.jpg
[21:06:02] DOWNLOADIIING t_97828ef5de49a612.jpg
[21:06:02] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[21:06:02] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7220
[21:06:02] [REFRESH_ALL] 📊 Server returned 7220 messages
[21:06:02] [REFRESH_ALL] 📊 Final merge: server=7220, preserved=0, total=7220
[21:06:02] [REFRESH_ALL] 📊 Displaying 50 of 7220 messages, hasMore=true
[21:06:02] [VIEWER_INIT] Loaded 50 messages with read receipts
[21:06:02] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:06:02] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:06:02] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:06:02] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:06:02] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:06:02] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:06:02] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:06:02] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:06:04] [MENU] dismissAnyExistingMenu called
[21:06:04] [MENU] dismissAnyExistingMenu completed
[21:06:05] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[21:06:05] [SEARCH] Checking messages for session 'ILUIWU'...
[21:06:05] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:06:05] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:06:05] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:06:05] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:06:05] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:06:05] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:06:05] [SEARCH] === LIKE DEBUG START === pattern='%b%'
[21:06:05] [SEARCH] Prepare result: 0 (OK=0)
[21:06:05] [SEARCH] Step result: 11 (ROW=100)
[21:06:05] [SEARCH] === LIKE DEBUG END ===
[21:06:05] [SEARCH] Found 0 messages matching 'b' in local DB
[21:06:05] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[21:06:05] [SEARCH] Checking messages for session 'ILUIWU'...
[21:06:05] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:06:05] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:06:05] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:06:05] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:06:05] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:06:05] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:06:05] [SEARCH] === LIKE DEBUG START === pattern='%ba%'
[21:06:05] [SEARCH] Prepare result: 0 (OK=0)
[21:06:05] [SEARCH] Step result: 11 (ROW=100)
[21:06:05] [SEARCH] === LIKE DEBUG END ===
[21:06:05] [SEARCH] Found 0 messages matching 'ba' in local DB
[21:06:05] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[21:06:05] [SEARCH] Checking messages for session 'ILUIWU'...
[21:06:05] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:06:05] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:06:05] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:06:05] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:06:05] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:06:05] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:06:05] [SEARCH] === LIKE DEBUG START === pattern='%bab%'
[21:06:05] [SEARCH] Prepare result: 0 (OK=0)
[21:06:05] [SEARCH] Step result: 11 (ROW=100)
[21:06:05] [SEARCH] === LIKE DEBUG END ===
[21:06:05] [SEARCH] Found 0 messages matching 'bab' in local DB
[21:06:05] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[21:06:05] [SEARCH] Checking messages for session 'ILUIWU'...
[21:06:05] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:06:05] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:06:05] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:06:05] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:06:05] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:06:05] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:06:05] [SEARCH] === LIKE DEBUG START === pattern='%baby%'
[21:06:05] [SEARCH] Prepare result: 0 (OK=0)
[21:06:05] [SEARCH] Step result: 11 (ROW=100)
[21:06:05] [SEARCH] === LIKE DEBUG END ===
[21:06:05] [SEARCH] Found 0 messages matching 'baby' in local DB
[21:06:06] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[21:06:06] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:06:26] [LIFECYCLE] App resigning active - cleared crash flag
[21:06:27] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[21:06:27] [SECURITY] Saved background timestamp
[21:06:27] [LIFECYCLE] App entering background - cleared crash flag
[21:06:27] [CLIENT_SIG] Disconnecting
[21:06:27] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[21:06:27] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[21:06:27] [WS] Canceling WebSocket for query connection to iosILUIWU
[21:06:27] In cleanupPeer
[21:06:27] In cleanupPeer
[21:06:27] [LIFECYCLE] WebRTC audio disabled
[21:06:27] [LIFECYCLE] AVAudioSession deactivated
[21:06:27] [LIFECYCLE] All connections stopped
[21:06:27] [CLIENT_SIG] WebSocket closed with code 1001
[21:06:27] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:06:27] [SERVER] Stopped reconnect polling
[21:06:27] Will request stop of video 0
[21:06:27] [WS] WebSocket task completed with error - isQueryOnly=true: cancelled
[21:06:27] [WS] Query connection error - cleaning up all agent connections and views
[21:06:27] Will request stop of video 0
[21:06:27] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[21:06:27] [WS] Query connection failed - cleaning up all agent connections and views
[21:06:27] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[21:06:27] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:06:27] [PIP] Removing 0 tracks from PiP for connection 0
[21:06:27] [PIP] ✅ All tracks removed for connection 0
[21:06:27] [CLEANUP] ========================================
[21:06:27] [CLEANUP] Cleaning up all agent connections and views
[21:06:27] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:06:27] [CLEANUP] Stopped and removed 0 video connections
[21:06:27] [CLEANUP] Removed 0 video views
[21:06:27] [CLEANUP] Removed 0 feed scroll views
[21:06:27] [CLEANUP] Removed 0 status labels
[21:06:27] [CLEANUP] Reset agent query state
[21:06:27] [CLEANUP] Updated page indicator
[21:06:27] [CLEANUP] Rebuilt video layout
[21:06:27] [CLEANUP] ✅ All agent connections and views cleaned up
[21:06:27] [CLEANUP] ========================================
[21:06:27] [SERVER] Skipping reconnect polling - app is in background
[21:06:27] [WS] URLSession invalidated successfully
[21:06:27] [PIP] Removing 0 tracks from PiP for connection 0
[21:06:27] [PIP] ✅ All tracks removed for connection 0
[21:06:27] [CLEANUP] ========================================
[21:06:27] [CLEANUP] Cleaning up all agent connections and views
[21:06:27] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:06:27] [CLEANUP] Stopped and removed 0 video connections
[21:06:27] [CLEANUP] Removed 0 video views
[21:06:27] [CLEANUP] Removed 0 feed scroll views
[21:06:27] [CLEANUP] Removed 0 status labels
[21:06:27] [CLEANUP] Reset agent query state
[21:06:27] [CLEANUP] Updated page indicator
[21:06:27] [CLEANUP] Rebuilt video layout
[21:06:27] [CLEANUP] ✅ All agent connections and views cleaned up
[21:06:27] [CLEANUP] ========================================
[21:06:27] [SERVER] Skipping reconnect polling - app is in background
[21:06:29] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[21:06:29] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:06:29] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:06:29] HELLO → sent (cached token, role=query)
[21:06:29] [SIG] hello_ok received for query connection - ready to query agents
[21:06:29] [SIG] get_agents request sent for sessionId=ILUIWU
[21:06:29] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:06:29] [SERVER] Stopped reconnect polling
[21:06:29] [SIG] agents_list received: []
[21:06:29] [SIG] agents_list received: []
[21:06:31] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:06:31] [CLIENT_SIG] WebSocket opened
[21:06:31] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:06:31] [CLIENT_SIG] Connected! clientId=MCYdCN2XkQvRGDs3
[21:06:31] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:06:31] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:06:56] [CRASH] No crash detected
[21:06:56] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:06:56] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:06:56] [GIPHY] SDK not available - using REST API fallback
[21:06:56] [BACKGROUND] Background fetch enabled
[21:06:56] [SECURITY] Initial launch - within timeout (29.406007051467896s < 300.0s)
[21:06:56] [AUTH] Starting PIN authentication
[21:06:56] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:06:56] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:06:56] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[21:06:56] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:06:56] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:06:56] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:06:56] [USER] ✅ User registered successfully
[21:06:56] [PUSH] User registration after token update: success
[21:06:56] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:06:56] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:06:57] [CLIENT_SIG] WebSocket opened
[21:06:57] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:06:57] [CLIENT_SIG] Connected! clientId=-pAI-Spcpsw0II6R
[21:06:57] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:06:57] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:06:57] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18454)...
[21:06:57] [PRELOAD] No messages or parse error
[21:06:58] [PIN_AUTH] Correct PIN
[21:06:58] [SECURITY] Restored real session: ILUIWU
[21:06:58] [SECURITY] Restored real session: ILUIWU
[21:06:58] [SECURITY] Saved real session: ILUIWU
[21:06:58] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:06:58] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:06:58] Documents Directory: /var/mobile/Containers/Data/Application/62BBF85D-AA7B-4FF2-B998-6F0DB92BBB9E/Documents
[21:06:58] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:06:58] [THEME] Applying current theme
[21:06:58] [CHAT] Applied day theme (mode: day)
[21:06:58] [SECURITY] Saved real session: ILUIWU
[21:06:58] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:06:58] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:06:58] [NETWORK] Network monitor started
[21:06:58] [NETWORK] Status changed: connected
[21:06:58] Did transition
[21:06:58] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:06:58] [VIEWER] Screen lock enabled - normal idle behavior
[21:06:58] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:06:58] [VCC] ========== VideoConnectionClass INIT ==========
[21:06:58] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:06:58] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:06:58] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:06:58] [DATA AUDIO] Creating encoder/decoder factories...
[21:06:58] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:06:58] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:06:58] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:06:58] [DATA AUDIO] ✅ Factory created
[21:06:58] [DATA AUDIO] RTCAudioSession locked
[21:06:58] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:06:58] [DATA AUDIO] RTCAudioSession unlocked
[21:06:58] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:06:58] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:06:58] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:06:58] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:06:58] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:06:58] [VIEWER_INIT] No messages loaded yet - fetching from server
[21:06:58] [REFRESH_ALL] 🔄 refreshAllFromServer called from: VIEWER_INIT, currentMsgCount=0
[21:06:58] [REFRESH_ALL] 📸 Captured 0 message IDs before request
[21:06:58] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:06:58] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:06:58] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:06:58] Did transition
[21:06:58] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:06:58] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:06:58] [MIGRATION] No messages need sender_name backfill
[21:06:58] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:06:58] [REFRESH_ALL] 🔄 refreshAllFromServer called from: noLocalData, currentMsgCount=0
[21:06:58] [REFRESH_ALL] ⚠️ Already reloading - skipping request from: noLocalData
[21:06:58] [GALLERY_DB] ✅ Loaded 0 media messages
[21:06:58] [GALLERY] Filtered 0 -> 0 (only with local thumbnails)
[21:06:58] [GALLERY] First 5 after sort (newest first):
[21:06:58] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:06:58] [SERVER] Starting reconnect polling (5s interval)
[21:06:58] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:06:58] [ICONS] Offset applied: -14.6
[21:06:58] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:06:58] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:06:58] [UNSENT_RETRY] Checking for unsent messages...
[21:06:58] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:06:58] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:06:58] [UPLOAD_RECOVERY] Session: ILUIWU
[21:06:58] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:06:58] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:06:58] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:06:58] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:06:58] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:06:58] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:06:58] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:06:58] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:06:58] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:06:58] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:06:58] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:06:58] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:06:58] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[21:06:58] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[21:06:58] [PENDING_UPLOAD] Total pending upload messages: 0
[21:06:58] [UNSENT_RETRY] No unsent messages found
[21:06:59] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:06:59] [USER] ✅ User registered successfully
[21:06:59] [USER] User registration successful
[21:06:59] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=0, first5Ids=[]
[21:06:59] [RELOAD_TAB] ⚠️ allMessagesWithReadBy is EMPTY - falling back to DB
[21:06:59] [RELOAD_TAB] Loaded 0 messages from DB (limited)
[21:06:59] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:06:59] [ICONS] Chat center: (31.2, 87.0)
[21:06:59] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:06:59] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:06:59] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:06:59] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:06:59] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:06:59] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:06:59] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:06:59] [ICONS] Screen width: 440.0
[21:06:59] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:06:59] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:06:59] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:06:59] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:06:59] new_session POST ok: token len=157
[21:06:59] HELLO → sent (fetched token, role=query)
[21:06:59] [SIG] hello_ok received for query connection - ready to query agents
[21:06:59] [SIG] get_agents request sent for sessionId=ILUIWU
[21:06:59] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:06:59] [SERVER] Stopped reconnect polling
[21:06:59] [SIG] agents_list received: []
[21:06:59] [SIG] agents_list received: []
[21:06:59] [PENDING_UPLOAD] Total pending upload messages: 0
[21:06:59] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[21:06:59] [DB_INSERT] Starting insert of 7220 messages for session 'ILUIWU'
[21:06:59] [DB_INSERT] ✅ After insert: 7222 messages in local_messages for session 'ILUIWU'
[21:06:59] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[21:06:59] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[21:07:00] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[21:07:00] DOWNLOADIIING t_bae538c2a3076c11.jpg
[21:07:00] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[21:07:00] DOWNLOADIIING t_5cfd84d52271d308.jpg
[21:07:00] DOWNLOADIIING t_919f4df51be24b2c.jpg
[21:07:00] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[21:07:00] DOWNLOADIIING t_32675c319a37fee7.jpg
[21:07:00] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[21:07:00] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[21:07:00] DOWNLOADIIING t_abb65f630e55dc61.jpg
[21:07:00] DOWNLOADIIING t_2a4c7380908d6595.jpg
[21:07:00] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[21:07:00] DOWNLOADIIING t_02f48c94671cc64e.jpg
[21:07:00] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[21:07:00] DOWNLOADIIING t_364b0669ed2f3378.jpg
[21:07:00] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[21:07:00] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[21:07:00] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[21:07:00] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[21:07:00] DOWNLOADIIING t_722d39e0d91dd954.jpg
[21:07:00] DOWNLOADIIING t_97828ef5de49a612.jpg
[21:07:00] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[21:07:00] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7220
[21:07:00] [REFRESH_ALL] 📊 Server returned 7220 messages
[21:07:00] [REFRESH_ALL] 📊 Final merge: server=7220, preserved=0, total=7220
[21:07:00] [REFRESH_ALL] 📊 Displaying 50 of 7220 messages, hasMore=true
[21:07:00] [VIEWER_INIT] Loaded 50 messages with read receipts
[21:07:00] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:07:00] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:07:00] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:07:00] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:07:00] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:07:00] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:07:00] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:07:00] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:07:01] [MENU] dismissAnyExistingMenu called
[21:07:01] [MENU] dismissAnyExistingMenu completed
[21:07:02] [SEARCH] DB has 7222 messages for session 'ILUIWU'
[21:07:02] [SEARCH] Checking messages for session 'ILUIWU'...
[21:07:02] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:07:02] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:07:02] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:07:02] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:07:02] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:07:02] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:07:02] [SEARCH] ⚠️ DATABASE CORRUPTED (error 11) - deleting and rebuilding...
[21:07:02] [SEARCH] ✅ Deleted corrupted database at /var/mobile/Containers/Data/Application/62BBF85D-AA7B-4FF2-B998-6F0DB92BBB9E/Documents/chat_local_viewer.db
[21:07:02] [SEARCH] ✅ Reopened fresh database - please refresh messages
[21:07:02] [SEARCH] Found 0 messages matching 'b' in local DB
[21:07:02] [SEARCH] DB has 0 messages for session 'ILUIWU'
[21:07:02] [SEARCH] Checking messages for session 'ILUIWU'...
[21:07:02] [SEARCH] Found 0 sample rows for session 'ILUIWU'
[21:07:02] [SEARCH] Found 0 messages matching 'ba' in local DB
[21:07:02] [SEARCH] DB has 0 messages for session 'ILUIWU'
[21:07:02] [SEARCH] Checking messages for session 'ILUIWU'...
[21:07:02] [SEARCH] Found 0 sample rows for session 'ILUIWU'
[21:07:02] [SEARCH] Found 0 messages matching 'bab' in local DB
[21:07:02] [SEARCH] DB has 0 messages for session 'ILUIWU'
[21:07:02] [SEARCH] Checking messages for session 'ILUIWU'...
[21:07:02] [SEARCH] Found 0 sample rows for session 'ILUIWU'
[21:07:02] [SEARCH] Found 0 messages matching 'baby' in local DB
[21:07:03] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[21:07:03] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:07:16] [MENU] dismissAnyExistingMenu called
[21:07:16] [MENU] dismissAnyExistingMenu completed
[21:07:17] [REFRESH_ALL] 🔄 refreshAllFromServer called from: editMessage, currentMsgCount=50
[21:07:17] [REFRESH_ALL] 📸 Captured 50 message IDs before request
[21:07:17] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:07:18] [PENDING_UPLOAD] Total pending upload messages: 0
[21:07:18] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[21:07:18] [DB_INSERT] Starting insert of 7220 messages for session 'ILUIWU'
[21:07:18] [DB_INSERT] ✅ After insert: 7220 messages in local_messages for session 'ILUIWU'
[21:07:19] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[21:07:19] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7220
[21:07:19] [REFRESH_ALL] 📊 Server returned 7220 messages
[21:07:19] [REFRESH_ALL] 📊 Final merge: server=7220, preserved=0, total=7220
[21:07:19] [REFRESH_ALL] 📊 Displaying 50 of 7220 messages, hasMore=true
[21:07:19] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:07:19] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:07:22] [MENU] dismissAnyExistingMenu called
[21:07:22] [MENU] dismissAnyExistingMenu completed
[21:07:23] [SCROLL_BTN] Showing button - 304pt from bottom > half 223pt
[21:07:23] [SEARCH] DB has 7220 messages for session 'ILUIWU'
[21:07:23] [SEARCH] Checking messages for session 'ILUIWU'...
[21:07:23] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:07:23] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:07:23] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:07:23] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:07:23] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:07:23] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:07:24] [SEARCH] Found 2471 messages matching 'b' in local DB
[21:07:24] [SEARCH] DB has 7220 messages for session 'ILUIWU'
[21:07:24] [SEARCH] Checking messages for session 'ILUIWU'...
[21:07:24] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:07:24] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:07:24] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:07:24] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:07:24] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:07:24] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:07:24] [SEARCH] Found 1321 messages matching 'ba' in local DB
[21:07:24] [SEARCH] DB has 7220 messages for session 'ILUIWU'
[21:07:24] [SEARCH] Checking messages for session 'ILUIWU'...
[21:07:24] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:07:24] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:07:24] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:07:24] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:07:24] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:07:24] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:07:24] [SEARCH] Found 1184 messages matching 'bab' in local DB
[21:07:24] [SEARCH] DB has 7220 messages for session 'ILUIWU'
[21:07:24] [SEARCH] Checking messages for session 'ILUIWU'...
[21:07:24] [SEARCH] Row 1: id=18454, type=0, msgIsNull=false, sender='Laurent', msg='At what time do you plan to go to bed ?'
[21:07:24] [SEARCH] Row 2: id=18453, type=0, msgIsNull=false, sender='Laurent', msg='Will let you know my love'
[21:07:24] [SEARCH] Row 3: id=18452, type=0, msgIsNull=false, sender='Esra', msg='Tell me when you start 😏'
[21:07:24] [SEARCH] Row 4: id=18451, type=0, msgIsNull=false, sender='Laurent', msg='I will follow your orders mistress'
[21:07:24] [SEARCH] Row 5: id=18450, type=0, msgIsNull=false, sender='Esra', msg='For the next sessions I’ll let you know 😏'
[21:07:24] [SEARCH] Found 5 sample rows for session 'ILUIWU'
[21:07:24] [SEARCH] Found 1158 messages matching 'baby' in local DB
[21:07:29] [SCROLL_BTN] Showing button - 419pt from bottom > half 379pt
[21:07:29] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:07:29] [CELL_UPLOAD] → not my message, setting complete
[21:07:29] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:07:29] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[21:07:29] [GIF] msgId=18430 START fresh animation
[21:07:29] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:07:29] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:07:29] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:07:29] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:07:29] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:07:29] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:08:15] [CRASH] Previous session did not exit cleanly - crash detected
[21:08:15] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:08:15] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:08:15] [GIPHY] SDK not available - using REST API fallback
[21:08:15] [BACKGROUND] Background fetch enabled
[21:08:15] [AUTH] Starting PIN authentication
[21:08:15] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:08:15] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:08:15] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[21:08:15] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:08:15] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:08:15] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:08:15] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:08:15] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:08:15] [USER] ✅ User registered successfully
[21:08:15] [PUSH] User registration after token update: success
[21:08:15] [CLIENT_SIG] WebSocket opened
[21:08:15] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:08:15] [CLIENT_SIG] Connected! clientId=vldBreEqrT8nzdYu
[21:08:15] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:08:15] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:08:15] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18454)...
[21:08:15] [PRELOAD] No messages or parse error
[21:08:17] [PIN_AUTH] Correct PIN
[21:08:17] [SECURITY] Restored real session: ILUIWU
[21:08:17] [SECURITY] Restored real session: ILUIWU
[21:08:17] [SECURITY] Saved real session: ILUIWU
[21:08:17] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:08:17] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:08:17] Documents Directory: /var/mobile/Containers/Data/Application/0091AC06-CF8C-434E-8375-E1ACD39A5B0D/Documents
[21:08:17] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:08:17] [THEME] Applying current theme
[21:08:17] [CHAT] Applied day theme (mode: day)
[21:08:17] [SECURITY] Saved real session: ILUIWU
[21:08:17] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:08:17] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:08:17] [NETWORK] Network monitor started
[21:08:17] [NETWORK] Status changed: connected
[21:08:17] Did transition
[21:08:17] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:08:17] [VIEWER] Screen lock enabled - normal idle behavior
[21:08:17] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:08:17] [VCC] ========== VideoConnectionClass INIT ==========
[21:08:17] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:08:17] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:08:17] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:08:17] [DATA AUDIO] Creating encoder/decoder factories...
[21:08:17] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:08:17] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:08:17] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:08:17] [DATA AUDIO] ✅ Factory created
[21:08:17] [DATA AUDIO] RTCAudioSession locked
[21:08:17] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:08:17] [DATA AUDIO] RTCAudioSession unlocked
[21:08:17] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:08:17] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:08:17] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:08:17] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:08:17] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:08:17] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:08:17] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:08:17] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:08:17] Did transition
[21:08:17] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:08:17] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:08:17] [CHUNK] Merged 878 reactions synchronously
[21:08:17] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:08:17] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:08:17] [MIGRATION] No messages need sender_name backfill
[21:08:17] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:08:17] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:08:17] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:08:17] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:08:17] [USER] ✅ User registered successfully
[21:08:17] [USER] User registration successful
[21:08:17] [GALLERY_DB] ✅ Loaded 477 media messages
[21:08:17] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18454
[21:08:17] [INCREMENTAL_SYNC] ✅ No new messages
[21:08:17] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:08:17] [GALLERY] First 5 after sort (newest first):
[21:08:17] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:08:17] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:08:17] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:08:17] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:08:17] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:08:17] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:08:17] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:08:17] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:08:17] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:08:17] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:08:17] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:08:17] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:08:17] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:08:17] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:08:17] [SERVER] Starting reconnect polling (5s interval)
[21:08:17] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:08:17] [ICONS] Offset applied: -14.6
[21:08:17] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:08:17] [ICONS] Chat center: (31.2, 87.0)
[21:08:17] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:08:17] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:08:17] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:08:17] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:08:17] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:08:17] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:08:17] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:08:17] [ICONS] Screen width: 440.0
[21:08:17] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:08:17] [UNSENT_RETRY] Checking for unsent messages...
[21:08:17] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:08:17] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:08:17] [UPLOAD_RECOVERY] Session: ILUIWU
[21:08:17] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:08:17] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:08:17] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:08:17] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:08:17] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:08:17] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:08:17] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:08:17] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:08:17] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:08:17] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:08:17] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:08:17] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:08:17] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[21:08:17] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[21:08:17] [PENDING_UPLOAD] Total pending upload messages: 0
[21:08:17] [UNSENT_RETRY] No unsent messages found
[21:08:17] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:08:17] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:08:17] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:08:17] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:08:17] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:08:17] new_session POST ok: token len=157
[21:08:17] HELLO → sent (fetched token, role=query)
[21:08:17] [SIG] hello_ok received for query connection - ready to query agents
[21:08:17] [SIG] get_agents request sent for sessionId=ILUIWU
[21:08:17] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:08:17] [SERVER] Stopped reconnect polling
[21:08:17] [SIG] agents_list received: []
[21:08:17] [SIG] agents_list received: []
[21:08:18] [COMBINED_FETCH] Loaded 7220 read receipts, 878 messages with reactions
[21:08:18] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:08:18] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:08:19] [MENU] dismissAnyExistingMenu called
[21:08:19] [MENU] dismissAnyExistingMenu completed
[21:08:21] [SEARCH] Found 2471 messages matching 'b' in local DB
[21:08:21] [SEARCH] Found 1321 messages matching 'ba' in local DB
[21:08:21] [SEARCH] Found 1184 messages matching 'bab' in local DB
[21:08:21] [SEARCH] Found 1158 messages matching 'baby' in local DB
[21:08:37] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1601, first5Ids=[16833, 16834, 16835, 16836, 16837]
[21:08:37] [GUARD] ⚠️ buildChatRows received 1601 messages - truncating to 500
[21:08:37] DOWNLOADIIING 2360d0215b6a2ab2.mov
[21:09:42] [CRASH] Previous session did not exit cleanly - crash detected
[21:09:42] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:09:42] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:09:42] [GIPHY] SDK not available - using REST API fallback
[21:09:42] [BACKGROUND] Background fetch enabled
[21:09:42] [CLEANUP] No old timer messages to delete
[21:09:42] [AUTH] Starting PIN authentication
[21:09:42] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:09:42] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:09:42] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:09:42] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:09:42] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:09:42] [USER] ✅ User registered successfully
[21:09:42] [PUSH] User registration after token update: success
[21:09:42] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:09:42] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:09:42] [CLIENT_SIG] WebSocket opened
[21:09:42] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:09:42] [CLIENT_SIG] Connected! clientId=1RKOBzVQR4HVZjW4
[21:09:42] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:09:42] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:09:42] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18454)...
[21:09:42] [PRELOAD] No messages or parse error
[21:09:43] [PIN_AUTH] Correct PIN
[21:09:43] [SECURITY] Restored real session: ILUIWU
[21:09:43] [SECURITY] Restored real session: ILUIWU
[21:09:44] [SECURITY] Saved real session: ILUIWU
[21:09:44] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:09:44] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:09:44] Documents Directory: /var/mobile/Containers/Data/Application/0091AC06-CF8C-434E-8375-E1ACD39A5B0D/Documents
[21:09:44] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:09:44] [THEME] Applying current theme
[21:09:44] [CHAT] Applied day theme (mode: day)
[21:09:44] [SECURITY] Saved real session: ILUIWU
[21:09:44] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:09:44] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:09:44] [NETWORK] Network monitor started
[21:09:44] [NETWORK] Status changed: connected
[21:09:44] Did transition
[21:09:44] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:09:44] [VIEWER] Screen lock enabled - normal idle behavior
[21:09:44] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:09:44] [VCC] ========== VideoConnectionClass INIT ==========
[21:09:44] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:09:44] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:09:44] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:09:44] [DATA AUDIO] Creating encoder/decoder factories...
[21:09:44] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:09:44] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:09:44] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:09:44] [DATA AUDIO] ✅ Factory created
[21:09:44] [DATA AUDIO] RTCAudioSession locked
[21:09:44] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:09:44] [DATA AUDIO] RTCAudioSession unlocked
[21:09:44] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:09:44] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:09:44] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:09:44] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:09:44] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:09:44] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:09:44] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:09:44] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:09:44] Did transition
[21:09:44] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:09:44] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:09:44] [CHUNK] Merged 878 reactions synchronously
[21:09:44] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:09:44] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:09:44] [MIGRATION] No messages need sender_name backfill
[21:09:44] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:09:44] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:09:44] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:09:44] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:09:44] [USER] ✅ User registered successfully
[21:09:44] [USER] User registration successful
[21:09:44] [GALLERY_DB] ✅ Loaded 477 media messages
[21:09:44] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18454
[21:09:44] [INCREMENTAL_SYNC] ✅ No new messages
[21:09:44] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:09:44] [GALLERY] First 5 after sort (newest first):
[21:09:44] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:09:44] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:09:44] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:09:44] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:09:44] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:09:44] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:09:44] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:09:44] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:09:44] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:09:44] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:09:44] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:09:44] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:09:44] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:09:44] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:09:44] [SERVER] Starting reconnect polling (5s interval)
[21:09:44] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:09:44] [ICONS] Offset applied: -14.6
[21:09:44] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:09:44] [ICONS] Chat center: (31.2, 87.0)
[21:09:44] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:09:44] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:09:44] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:09:44] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:09:44] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:09:44] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:09:44] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:09:44] [ICONS] Screen width: 440.0
[21:09:44] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:09:44] [UNSENT_RETRY] Checking for unsent messages...
[21:09:44] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:09:44] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:09:44] [UPLOAD_RECOVERY] Session: ILUIWU
[21:09:44] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:09:44] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:09:44] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:09:44] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:09:44] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:09:44] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:09:44] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:09:44] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:09:44] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:09:44] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:09:44] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:09:44] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:09:44] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[21:09:44] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[21:09:44] [PENDING_UPLOAD] Total pending upload messages: 0
[21:09:44] [UNSENT_RETRY] No unsent messages found
[21:09:44] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:09:44] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:09:44] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:09:44] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:09:44] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:09:44] new_session POST ok: token len=157
[21:09:44] HELLO → sent (fetched token, role=query)
[21:09:44] [SIG] hello_ok received for query connection - ready to query agents
[21:09:44] [SIG] get_agents request sent for sessionId=ILUIWU
[21:09:44] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:09:44] [SERVER] Stopped reconnect polling
[21:09:44] [SIG] agents_list received: []
[21:09:44] [SIG] agents_list received: []
[21:09:44] [COMBINED_FETCH] Loaded 7220 read receipts, 878 messages with reactions
[21:09:44] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:09:44] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:09:49] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:09:49] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=50, isReloading=false
[21:09:49] [SEND_MESSAGE] ✅ Added optimistic message id=-1 to arrays, newMsgCount=51
[21:09:49] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[-1, 18454, 18453, 18452, 18451]
[21:09:49] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:09:49] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:09:51] [CLIENT_SIG] Event received: type=0 messageId=18455
[21:09:51] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18455,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:09:49"}
[21:09:51] [WS_EVENT] Received event: type=0, messageId=18455
[21:09:51] [WS_EVENT] 📨 New message notification (msgId=18455) - triggering incremental refresh, currentMsgCount=51
[21:09:51] [CHAT] receive_message.php JSON: ["datesent_utc": 2026-01-21 20:09:49, "file_name": , "message_id": 18455, "ok": 1, "message_type": 0, "session_id": ILUIWU]
[21:09:51] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[21:09:51] [DB_UPGRADE] Upgrading message ID: -1 → 18455, preserveOriginalDate=false
[21:09:51] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18454
[21:09:51] [DB_UPGRADE] ✅ Upgraded -1 → 18455 with send_status=0, 1 row(s) affected
[21:09:51] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -1 → 18455
[21:09:51] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -1 → 18455
[21:09:51] ReloadData 9
[21:09:51] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:09:51] [DB_INSERT] ✅ After insert: 7217 messages in local_messages for session 'ILUIWU'
[21:09:51] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:09:51] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=51
[21:09:52] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[18405, 18406, 18407, 18408, 18409]
[21:09:52] [LIFECYCLE] App resigning active - cleared crash flag
[21:09:52] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[21:09:52] [SECURITY] Saved background timestamp
[21:09:52] [LIFECYCLE] App entering background - cleared crash flag
[21:09:52] [CLIENT_SIG] Disconnecting
[21:09:52] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[21:09:52] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[21:09:52] [WS] Canceling WebSocket for query connection to iosILUIWU
[21:09:52] In cleanupPeer
[21:09:52] In cleanupPeer
[21:09:52] [LIFECYCLE] WebRTC audio disabled
[21:09:52] [LIFECYCLE] AVAudioSession deactivated
[21:09:52] [LIFECYCLE] All connections stopped
[21:09:53] [CLIENT_SIG] WebSocket closed with code 1001
[21:09:53] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:09:53] [SERVER] Stopped reconnect polling
[21:09:53] Will request stop of video 0
[21:09:53] [WS] WebSocket ACTUALLY CLOSED - isQueryOnly=true, connectionStr=iosILUIWU, closeCode=1001
[21:09:53] [WS] Query connection to iosILUIWU closed - cleaning up all agent connections and views
[21:09:53] Will request stop of video 0
[21:09:53] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[21:09:53] [WS] Query connection failed - cleaning up all agent connections and views
[21:09:53] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[21:09:53] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:09:53] [PIP] Removing 0 tracks from PiP for connection 0
[21:09:53] [PIP] ✅ All tracks removed for connection 0
[21:09:53] [CLEANUP] ========================================
[21:09:53] [CLEANUP] Cleaning up all agent connections and views
[21:09:53] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:09:53] [CLEANUP] Stopped and removed 0 video connections
[21:09:53] [CLEANUP] Removed 0 video views
[21:09:53] [CLEANUP] Removed 0 feed scroll views
[21:09:53] [CLEANUP] Removed 0 status labels
[21:09:53] [CLEANUP] Reset agent query state
[21:09:53] [CLEANUP] Updated page indicator
[21:09:53] [CLEANUP] Rebuilt video layout
[21:09:53] [CLEANUP] ✅ All agent connections and views cleaned up
[21:09:53] [CLEANUP] ========================================
[21:09:53] [SERVER] Skipping reconnect polling - app is in background
[21:09:53] [WS] URLSession invalidated successfully
[21:09:53] [PIP] Removing 0 tracks from PiP for connection 0
[21:09:53] [PIP] ✅ All tracks removed for connection 0
[21:09:53] [CLEANUP] ========================================
[21:09:53] [CLEANUP] Cleaning up all agent connections and views
[21:09:53] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:09:53] [CLEANUP] Stopped and removed 0 video connections
[21:09:53] [CLEANUP] Removed 0 video views
[21:09:53] [CLEANUP] Removed 0 feed scroll views
[21:09:53] [CLEANUP] Removed 0 status labels
[21:09:53] [CLEANUP] Reset agent query state
[21:09:53] [CLEANUP] Updated page indicator
[21:09:53] [CLEANUP] Rebuilt video layout
[21:09:53] [CLEANUP] ✅ All agent connections and views cleaned up
[21:09:53] [CLEANUP] ========================================
[21:09:53] [SERVER] Skipping reconnect polling - app is in background
[21:13:22] [CRASH] No crash detected
[21:13:22] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:13:22] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:13:22] [GIPHY] SDK not available - using REST API fallback
[21:13:22] [BACKGROUND] Background fetch enabled
[21:13:22] [SECURITY] Initial launch - within timeout (209.6155138015747s < 300.0s)
[21:13:22] [AUTH] Starting PIN authentication
[21:13:22] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:13:22] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:13:22] [CLEANUP] No old timer messages to delete
[21:13:22] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:13:22] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:13:22] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:13:22] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:13:22] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:13:22] [USER] ✅ User registered successfully
[21:13:22] [PUSH] User registration after token update: success
[21:13:22] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18455)...
[21:13:22] [CLIENT_SIG] WebSocket opened
[21:13:22] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:13:22] [CLIENT_SIG] Connected! clientId=lEk8-fidl0HGwwo8
[21:13:22] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:13:22] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:13:22] [PRELOAD] No messages or parse error
[21:13:24] [PIN_AUTH] Correct PIN
[21:13:24] [SECURITY] Restored real session: ILUIWU
[21:13:24] [SECURITY] Restored real session: ILUIWU
[21:13:24] [SECURITY] Saved real session: ILUIWU
[21:13:24] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:13:24] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:13:24] Documents Directory: /var/mobile/Containers/Data/Application/734FB85A-66B9-4651-B685-3763D5B3D7E0/Documents
[21:13:24] [THEME] Applying current theme
[21:13:24] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:13:24] [CHAT] Applied day theme (mode: day)
[21:13:24] [SECURITY] Saved real session: ILUIWU
[21:13:24] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:13:24] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:13:24] [NETWORK] Network monitor started
[21:13:24] [NETWORK] Status changed: connected
[21:13:24] Did transition
[21:13:24] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:13:24] [VIEWER] Screen lock enabled - normal idle behavior
[21:13:24] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:13:24] [VCC] ========== VideoConnectionClass INIT ==========
[21:13:24] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:13:24] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:13:24] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:13:24] [DATA AUDIO] Creating encoder/decoder factories...
[21:13:24] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:13:24] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:13:24] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:13:24] [DATA AUDIO] ✅ Factory created
[21:13:24] [DATA AUDIO] RTCAudioSession locked
[21:13:24] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:13:24] [DATA AUDIO] RTCAudioSession unlocked
[21:13:24] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:13:24] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:13:24] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:13:24] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:13:24] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:13:24] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:13:24] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:13:24] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:13:24] Did transition
[21:13:24] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:13:24] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:13:24] [CHUNK] Merged 878 reactions synchronously
[21:13:24] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:13:24] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:13:24] [MIGRATION] No messages need sender_name backfill
[21:13:24] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:13:24] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:13:24] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:13:24] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:13:24] [GALLERY_DB] ✅ Loaded 477 media messages
[21:13:24] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18455
[21:13:24] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:13:24] [GALLERY] First 5 after sort (newest first):
[21:13:24] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:13:24] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:13:24] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:13:24] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:13:24] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:13:24] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:13:24] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18406, 18407, 18408, 18409, 18410]
[21:13:24] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:13:24] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:13:24] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:13:24] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:13:24] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:13:24] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:13:24] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:13:24] [SERVER] Starting reconnect polling (5s interval)
[21:13:24] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:13:24] [ICONS] Offset applied: -14.6
[21:13:24] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:13:24] [ICONS] Chat center: (31.2, 87.0)
[21:13:24] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:13:24] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:13:24] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:13:24] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:13:24] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:13:24] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:13:24] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:13:24] [ICONS] Screen width: 440.0
[21:13:24] [PUSH] Silent push received
[21:13:24] [PUSH_EMBED] No embedded message_data in notification
[21:13:24] [PUSH] No embedded data, pre-loading messages from server
[21:13:24] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:13:24] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:13:24] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:13:24] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:13:24] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:13:24] [USER] ✅ User registered successfully
[21:13:24] [USER] User registration successful
[21:13:24] new_session POST ok: token len=157
[21:13:24] HELLO → sent (fetched token, role=query)
[21:13:24] [SIG] hello_ok received for query connection - ready to query agents
[21:13:24] [SIG] get_agents request sent for sessionId=ILUIWU
[21:13:24] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:13:24] [SERVER] Stopped reconnect polling
[21:13:24] [SIG] agents_list received: []
[21:13:24] [SIG] agents_list received: []
[21:13:24] [INCREMENTAL_SYNC] ✅ No new messages
[21:13:24] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:13:24] [UNSENT_RETRY] Checking for unsent messages...
[21:13:24] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:13:24] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:13:24] [UPLOAD_RECOVERY] Session: ILUIWU
[21:13:24] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:13:24] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:13:24] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:13:24] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:13:24] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:13:24] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:13:24] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:13:24] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:13:24] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:13:24] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:13:24] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:13:24] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:13:24] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[21:13:24] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[21:13:24] [PENDING_UPLOAD] Total pending upload messages: 0
[21:13:24] [UNSENT_RETRY] No unsent messages found
[21:13:24] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:13:24] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:13:24] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:13:24] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:13:24] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18455]
[21:13:24] [PUSH] Parsed message_id: 18455
[21:13:24] [PUSH] Parsed operation_type: 3
[21:13:24] [PUSH] Taking direct action: opType=3, messageId=18455
[21:13:24] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18455
[21:13:25] [COMBINED_FETCH] Loaded 7221 read receipts, 878 messages with reactions
[21:13:25] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:13:25] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18406, 18407, 18408, 18409, 18410]
[21:13:28] [MENU] dismissAnyExistingMenu called
[21:13:28] [MENU] dismissAnyExistingMenu completed
[21:13:30] [SCROLL_BTN] Showing button - 310pt from bottom > half 223pt
[21:13:31] [SEARCH] Found 2472 messages matching 'b' in local DB
[21:13:31] [SEARCH] Found 1322 messages matching 'ba' in local DB
[21:13:31] [SEARCH] Found 1185 messages matching 'bab' in local DB
[21:13:31] [SEARCH] Found 1159 messages matching 'baby' in local DB
[21:13:45] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1563, first5Ids=[16873, 16874, 16875, 16876, 16877]
[21:13:45] [GUARD] ⚠️ buildChatRows received 1563 messages - truncating to 500
[21:13:45] DOWNLOADIIING 2360d0215b6a2ab2.mov
[21:13:47] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1563, first5Ids=[16873, 16874, 16875, 16876, 16877]
[21:13:47] [GUARD] ⚠️ buildChatRows received 1563 messages - truncating to 500
[21:13:49] [TAP_REPLAY] 🔄 replayEvolutionAnimation called for messageId=18015
[21:13:49] [TAP_REPLAY] 📦 Found message: text.count=109, evolutionData.isEmpty=true
[21:13:49] [TAP_REPLAY] 📡 No local evolution data - fetching from server
[21:13:49] [TAP_REPLAY] 🔍 Server response keys: ["created_at", "evolution", "has_evolution", "message_id", "ok"]
[21:13:49] [TAP_REPLAY] ✅ Successfully fetched 143 events from server - calling playEvolutionInline
[21:13:49] [EVOLUTION] 🎬 playEvolutionInline called for message 18015 with 143 events
[21:13:49] [UPDATE_CELL] 🔍 updateMessageCell called for message 18015
[21:13:49] [UPDATE_CELL] Initial targetRowIndex=65
[21:13:49] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:13:49] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText=' ', text='So glad we are now at the same'
[21:13:49] [UPDATE_CELL] ✅ Updating ChatCell label to: ' '
[21:13:49] [UPDATE_CELL] 🔍 updateMessageCell called for message 18015
[21:13:49] [UPDATE_CELL] Initial targetRowIndex=65
[21:13:49] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:13:49] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='S', text='So glad we are now at the same'
[21:13:49] [UPDATE_CELL] ✅ Updating ChatCell label to: 'S'
[21:13:49] [UPDATE_CELL] 🔍 updateMessageCell called for message 18015
[21:13:49] [UPDATE_CELL] Initial targetRowIndex=65
[21:13:49] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:13:49] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='So', text='So glad we are now at the same'
[21:13:49] [UPDATE_CELL] ✅ Updating ChatCell label to: 'So'
[21:13:50] [UPDATE_CELL] 🔍 updateMessageCell called for message 18015
[21:13:50] [UPDATE_CELL] Initial targetRowIndex=65
[21:13:50] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:13:50] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='So ', text='So glad we are now at the same'
[21:13:50] [UPDATE_CELL] ✅ Updating ChatCell label to: 'So '
[21:13:50] [UPDATE_CELL] 🔍 updateMessageCell called for message 18015
[21:13:50] [UPDATE_CELL] Initial targetRowIndex=65
[21:13:50] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:13:50] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='So g', text='So glad we are now at the same'
[21:13:50] [UPDATE_CELL] ✅ Updating ChatCell label to: 'So g'
[21:13:50] [UPDATE_CELL] 🔍 updateMessageCell called for message 18015
[21:13:50] [UPDATE_CELL] Initial targetRowIndex=65
[21:13:50] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:13:50] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='So gl', text='So glad we are now at the same'
[21:13:50] [UPDATE_CELL] ✅ Updating ChatCell label to: 'So gl'
[21:13:50] [UPDATE_CELL] 🔍 updateMessageCell called for message 18015
[21:13:50] [UPDATE_CELL] Initial targetRowIndex=65
[21:13:50] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:13:50] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='So gla', text='So glad we are now at the same'
[21:13:50] [UPDATE_CELL] ✅ Updating ChatCell label to: 'So gla'
[21:13:50] [UPDATE_CELL] 🔍 updateMessageCell called for message 18015
[21:13:50] [UPDATE_CELL] Initial targetRowIndex=65
[21:13:50] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:13:50] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='So glad', text='So glad we are now at the same'
[21:13:50] [UPDATE_CELL] ✅ Updating ChatCell label to: 'So glad'
[21:13:50] [UPDATE_CELL] 🔍 updateMessageCell called for message 18015
[21:13:50] [UPDATE_CELL] Initial targetRowIndex=65
[21:13:50] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:13:50] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='So glad ', text='So glad we are now at the same'
[21:13:50] [UPDATE_CELL] ✅ Updating ChatCell label to: 'So glad '
[21:13:51] [UPDATE_CELL] 🔍 updateMessageCell called for message 18015
[21:13:51] [UPDATE_CELL] Initial targetRowIndex=65
[21:13:51] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:13:51] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='So glad y', text='So glad we are now at the same'
[21:13:51] [UPDATE_CELL] ✅ Updating ChatCell label to: 'So glad y'
[21:13:51] [TAP_REPLAY] 🔄 replayEvolutionAnimation called for messageId=18015
[21:13:51] [TAP_REPLAY] ⏹️ Animation already playing - stopping and showing final text
[21:13:51] [UPDATE_CELL] 🔍 updateMessageCell called for message 18015
[21:13:51] [UPDATE_CELL] Initial targetRowIndex=65
[21:13:51] [GUARD] ⚠️ buildChatRows received 1563 messages - truncating to 500
[21:13:51] [UPDATE_CELL] Rebuilt chatRows, count=507
[21:13:51] [UPDATE_CELL] After rebuild targetRowIndex=65
[21:13:51] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=false, evolutionText='So glad we are now at the same state. Even if my baby probably didn't maintain herself at 10 for 12 minutes 🫦', text='So glad we are now at the same'
[21:13:51] [UPDATE_CELL] ✅ Updating ChatCell label to: 'So glad we are now at the same'
[21:13:51] [UPDATE_CELL] 📐 Height recalculated with scroll position preserved
[21:13:51] [MENU] dismissAnyExistingMenu called
[21:13:51] [MENU] dismissAnyExistingMenu completed
[21:13:51] [CELL_UPLOAD] configure: msgId=18022, file=45d67ad603184f8b.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:13:51] [CELL_UPLOAD] → not my message, setting complete
[21:13:51] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=45d67ad603184f8b.jpg, overlayExists=true
[21:13:51] [SCROLL_BTN] Showing button - 45205pt from bottom > half 379pt
[21:13:52] [MENU] dismissAnyExistingMenu called
[21:13:52] [MENU] dismissAnyExistingMenu completed
[21:13:53] [MENU] dismissAnyExistingMenu called
[21:13:53] [MENU] dismissAnyExistingMenu completed
[21:13:55] [MENU] dismissAnyExistingMenu called
[21:13:55] [MENU] dismissAnyExistingMenu completed
[21:13:56] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1563, first5Ids=[16873, 16874, 16875, 16876, 16877]
[21:13:56] [GUARD] ⚠️ buildChatRows received 1563 messages - truncating to 500
[21:13:56] [CELL_UPLOAD] configure: msgId=18022, file=45d67ad603184f8b.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:13:56] [CELL_UPLOAD] → not my message, setting complete
[21:13:56] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=45d67ad603184f8b.jpg, overlayExists=true
[21:14:25] [CELL_UPLOAD] configure: msgId=18022, file=45d67ad603184f8b.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:25] [CELL_UPLOAD] → not my message, setting complete
[21:14:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=45d67ad603184f8b.jpg, overlayExists=true
[21:14:25] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18406, 18407, 18408, 18409, 18410]
[21:14:27] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1569, first5Ids=[16867, 16868, 16869, 16870, 16871]
[21:14:27] [GUARD] ⚠️ buildChatRows received 1569 messages - truncating to 500
[21:14:29] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1453, first5Ids=[16984, 16985, 16986, 16987, 16988]
[21:14:29] [GUARD] ⚠️ buildChatRows received 1453 messages - truncating to 500
[21:14:30] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1443, first5Ids=[16994, 16995, 16996, 16997, 16998]
[21:14:30] [GUARD] ⚠️ buildChatRows received 1443 messages - truncating to 500
[21:14:32] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1259, first5Ids=[17183, 17184, 17185, 17186, 17187]
[21:14:32] [GUARD] ⚠️ buildChatRows received 1259 messages - truncating to 500
[21:14:33] [SCROLL_BTN] Showing button - 45306pt from bottom > half 379pt
[21:14:33] [CELL_UPLOAD] configure: msgId=18022, file=45d67ad603184f8b.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=45d67ad603184f8b.jpg, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18040, file=9517bfe6ca98fe6d.heic, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=9517bfe6ca98fe6d.heic, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18045, file=fc97f5d36a4b78a8.jpeg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=fc97f5d36a4b78a8.jpeg, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18058, file=f533b6e6646d4d9c.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f533b6e6646d4d9c.jpg, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18059, file=85d85b3da3b4b9f3.png, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=85d85b3da3b4b9f3.png, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18077, file=7a7b561868bcacae.heic, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7a7b561868bcacae.heic, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18104, file=f733fbda18a5f573.png, senderId=EYE-SYSTEM-00000000-0000-0000-0000-000000000000, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733fbda18a5f573.png, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18107, file=c3077ba7fcd9c597.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=c3077ba7fcd9c597.jpg, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18127, file=62b393a353b38c70.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=62b393a353b38c70.jpg, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18149, file=bdecbcd267d10e9d.heic, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=bdecbcd267d10e9d.heic, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18150, file=044523ae024c2e36.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=044523ae024c2e36.mov, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18154, file=80de02d18174956b.jpeg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=80de02d18174956b.jpeg, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18196, file=034811b5c9ed7810.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=034811b5c9ed7810.jpg, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18202, file=74db1eca8b92424a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=74db1eca8b92424a.jpg, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18230, file=eef7c768c6bb98ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=eef7c768c6bb98ab.jpg, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18255, file=3f1894963f4c448e.heic, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=3f1894963f4c448e.heic, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18282, file=5b09a034a7f26203.png, senderId=EYE-SYSTEM-00000000-0000-0000-0000-000000000000, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=5b09a034a7f26203.png, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18306, file=8c29dab4be6eb199.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=8c29dab4be6eb199.jpg, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18329, file=41e6d3f8b6fc3362.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41e6d3f8b6fc3362.jpg, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18378, file=7fcf17ed21a942d6.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7fcf17ed21a942d6.jpg, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:14:33] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[21:14:33] [GIF] msgId=18430 START fresh animation
[21:14:33] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:14:33] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:33] [CELL_UPLOAD] → not my message, setting complete
[21:14:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:14:34] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:14:34] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:14:34] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:14:34] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:14:34] [GALLERY_DB] ✅ Loaded 477 media messages
[21:14:34] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:14:34] [GALLERY] First 5 after sort (newest first):
[21:14:34] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:14:34] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:14:34] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:14:34] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:14:34] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:14:35] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1259, first5Ids=[17183, 17184, 17185, 17186, 17187]
[21:14:35] [GUARD] ⚠️ buildChatRows received 1259 messages - truncating to 500
[21:14:36] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:14:36] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:14:36] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:14:36] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:14:36] [GALLERY_DB] ✅ Loaded 477 media messages
[21:14:36] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:14:36] [GALLERY] First 5 after sort (newest first):
[21:14:36] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:14:36] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:14:36] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:14:36] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:14:36] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:14:37] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1259, first5Ids=[17183, 17184, 17185, 17186, 17187]
[21:14:37] [GUARD] ⚠️ buildChatRows received 1259 messages - truncating to 500
[21:14:39] [TAP_REPLAY] 🔄 replayEvolutionAnimation called for messageId=18455
[21:14:39] [TAP_REPLAY] 📦 Found message: text.count=16, evolutionData.isEmpty=true
[21:14:39] [TAP_REPLAY] 📡 No local evolution data - fetching from server
[21:14:39] [TAP_REPLAY] 🔍 Server response keys: ["created_at", "evolution", "has_evolution", "message_id", "ok"]
[21:14:39] [TAP_REPLAY] ✅ Successfully fetched 16 events from server - calling playEvolutionInline
[21:14:39] [EVOLUTION] 🎬 playEvolutionInline called for message 18455 with 16 events
[21:14:39] [UPDATE_CELL] 🔍 updateMessageCell called for message 18455
[21:14:39] [UPDATE_CELL] Initial targetRowIndex=506
[21:14:39] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:14:39] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText=' ', text='Will go now baby'
[21:14:39] [UPDATE_CELL] ✅ Updating ChatCell label to: ' '
[21:14:39] [UPDATE_CELL] 🔍 updateMessageCell called for message 18455
[21:14:39] [UPDATE_CELL] Initial targetRowIndex=506
[21:14:39] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:14:39] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='W', text='Will go now baby'
[21:14:39] [UPDATE_CELL] ✅ Updating ChatCell label to: 'W'
[21:14:39] [UPDATE_CELL] 🔍 updateMessageCell called for message 18455
[21:14:39] [UPDATE_CELL] Initial targetRowIndex=506
[21:14:39] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:14:39] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Wi', text='Will go now baby'
[21:14:39] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Wi'
[21:14:39] [UPDATE_CELL] 🔍 updateMessageCell called for message 18455
[21:14:39] [UPDATE_CELL] Initial targetRowIndex=506
[21:14:39] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:14:39] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Wil', text='Will go now baby'
[21:14:39] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Wil'
[21:14:40] [UPDATE_CELL] 🔍 updateMessageCell called for message 18455
[21:14:40] [UPDATE_CELL] Initial targetRowIndex=506
[21:14:40] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:14:40] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Will', text='Will go now baby'
[21:14:40] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Will'
[21:14:40] [UPDATE_CELL] 🔍 updateMessageCell called for message 18455
[21:14:40] [UPDATE_CELL] Initial targetRowIndex=506
[21:14:40] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:14:40] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Will ', text='Will go now baby'
[21:14:40] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Will '
[21:14:40] [UPDATE_CELL] 🔍 updateMessageCell called for message 18455
[21:14:40] [UPDATE_CELL] Initial targetRowIndex=506
[21:14:40] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:14:40] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Will g', text='Will go now baby'
[21:14:40] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Will g'
[21:14:40] [UPDATE_CELL] 🔍 updateMessageCell called for message 18455
[21:14:40] [UPDATE_CELL] Initial targetRowIndex=506
[21:14:40] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:14:40] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Will go', text='Will go now baby'
[21:14:40] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Will go'
[21:14:40] [UPDATE_CELL] 🔍 updateMessageCell called for message 18455
[21:14:40] [UPDATE_CELL] Initial targetRowIndex=506
[21:14:40] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:14:40] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Will go ', text='Will go now baby'
[21:14:40] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Will go '
[21:14:40] [TAP_REPLAY] 🔄 replayEvolutionAnimation called for messageId=18455
[21:14:40] [TAP_REPLAY] ⏹️ Animation already playing - stopping and showing final text
[21:14:40] [UPDATE_CELL] 🔍 updateMessageCell called for message 18455
[21:14:40] [UPDATE_CELL] Initial targetRowIndex=506
[21:14:40] [GUARD] ⚠️ buildChatRows received 1259 messages - truncating to 500
[21:14:40] [UPDATE_CELL] Rebuilt chatRows, count=507
[21:14:40] [UPDATE_CELL] After rebuild targetRowIndex=506
[21:14:40] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=false, evolutionText='Will go now baby', text='Will go now baby'
[21:14:40] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Will go now baby'
[21:14:40] [UPDATE_CELL] 📐 Height recalculated with scroll position preserved
[21:14:41] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1292, first5Ids=[17145, 17146, 17147, 17148, 17149]
[21:14:41] [GUARD] ⚠️ buildChatRows received 1292 messages - truncating to 500
[21:14:43] [SCROLL_BTN] Showing button - 310pt from bottom > half 223pt
[21:14:44] [LIFECYCLE] App resigning active - cleared crash flag
[21:14:45] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[21:14:45] [SECURITY] Saved background timestamp
[21:14:45] [LIFECYCLE] App entering background - cleared crash flag
[21:14:45] [CLIENT_SIG] Disconnecting
[21:14:45] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[21:14:45] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[21:14:45] [WS] Canceling WebSocket for query connection to iosILUIWU
[21:14:45] In cleanupPeer
[21:14:45] In cleanupPeer
[21:14:45] [LIFECYCLE] WebRTC audio disabled
[21:14:45] [LIFECYCLE] AVAudioSession deactivated
[21:14:45] [LIFECYCLE] All connections stopped
[21:14:45] [CLIENT_SIG] WebSocket closed with code 1001
[21:14:45] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:14:45] [SERVER] Stopped reconnect polling
[21:14:45] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[21:14:45] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:14:45] [WS] WebSocket ACTUALLY CLOSED - isQueryOnly=true, connectionStr=iosILUIWU, closeCode=1001
[21:14:45] [WS] Query connection to iosILUIWU closed - cleaning up all agent connections and views
[21:14:45] Will request stop of video 0
[21:14:45] Will request stop of video 0
[21:14:45] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[21:14:45] [WS] Query connection failed - cleaning up all agent connections and views
[21:14:45] [APP_DISCONNECT] Scene disconnecting - logging pending uploads...
[21:14:45] [APP_TERMINATE] ⚠️ 2 pending uploads in DB queue:
[21:14:46] [CRASH] No crash detected
[21:14:46] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:14:46] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:14:46] [GIPHY] SDK not available - using REST API fallback
[21:14:46] [BACKGROUND] Background fetch enabled
[21:14:46] [CLEANUP] No old timer messages to delete
[21:14:46] [SECURITY] Initial launch - within timeout (1.757521152496338s < 300.0s)
[21:14:46] [AUTH] Starting PIN authentication
[21:14:46] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:14:46] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:14:46] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:14:46] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:14:46] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:14:46] [USER] ✅ User registered successfully
[21:14:46] [PUSH] User registration after token update: success
[21:14:47] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:14:47] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:14:47] [CLIENT_SIG] WebSocket opened
[21:14:47] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:14:47] [CLIENT_SIG] Connected! clientId=SQrPKYm3h4R4fTIq
[21:14:47] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:14:47] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:14:47] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18455)...
[21:14:47] [PRELOAD] No messages or parse error
[21:14:48] [PIN_AUTH] Correct PIN
[21:14:48] [SECURITY] Restored real session: ILUIWU
[21:14:48] [SECURITY] Restored real session: ILUIWU
[21:14:48] [SECURITY] Saved real session: ILUIWU
[21:14:48] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:14:48] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:14:48] Documents Directory: /var/mobile/Containers/Data/Application/734FB85A-66B9-4651-B685-3763D5B3D7E0/Documents
[21:14:48] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:14:48] [THEME] Applying current theme
[21:14:48] [CHAT] Applied day theme (mode: day)
[21:14:48] [SECURITY] Saved real session: ILUIWU
[21:14:48] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:14:48] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:14:48] [NETWORK] Network monitor started
[21:14:48] [NETWORK] Status changed: connected
[21:14:48] Did transition
[21:14:48] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:14:48] [VIEWER] Screen lock enabled - normal idle behavior
[21:14:48] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:14:48] [VCC] ========== VideoConnectionClass INIT ==========
[21:14:48] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:14:48] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:14:48] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:14:48] [DATA AUDIO] Creating encoder/decoder factories...
[21:14:48] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:14:48] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:14:48] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:14:48] [DATA AUDIO] ✅ Factory created
[21:14:48] [DATA AUDIO] RTCAudioSession locked
[21:14:48] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:14:48] [DATA AUDIO] RTCAudioSession unlocked
[21:14:48] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:14:48] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:14:48] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:14:48] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:14:48] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:14:48] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:14:48] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:14:48] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:14:48] Did transition
[21:14:48] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:14:48] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:14:48] [CHUNK] Merged 878 reactions synchronously
[21:14:48] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:14:48] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:14:48] [MIGRATION] No messages need sender_name backfill
[21:14:48] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:14:48] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:14:48] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:14:48] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:14:48] [USER] ✅ User registered successfully
[21:14:48] [USER] User registration successful
[21:14:48] [GALLERY_DB] ✅ Loaded 477 media messages
[21:14:48] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18455
[21:14:48] [INCREMENTAL_SYNC] ✅ No new messages
[21:14:48] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:14:48] [GALLERY] First 5 after sort (newest first):
[21:14:48] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:14:48] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:14:48] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:14:48] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:14:48] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:14:48] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:14:48] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18406, 18407, 18408, 18409, 18410]
[21:14:48] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:14:48] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:48] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:14:48] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:14:48] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:14:48] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:14:48] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:14:48] [SERVER] Starting reconnect polling (5s interval)
[21:14:48] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:14:48] [ICONS] Offset applied: -14.6
[21:14:48] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:14:48] [ICONS] Chat center: (31.2, 87.0)
[21:14:48] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:14:48] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:14:48] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:14:48] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:14:48] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:14:48] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:14:48] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:14:48] [ICONS] Screen width: 440.0
[21:14:48] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:14:48] [UNSENT_RETRY] Checking for unsent messages...
[21:14:48] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:14:48] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:14:48] [UPLOAD_RECOVERY] Session: ILUIWU
[21:14:48] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:14:48] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:14:48] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:14:48] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:14:48] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:14:48] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:14:48] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:14:48] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:14:48] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:14:48] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:14:48] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:14:48] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:14:48] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[21:14:48] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[21:14:48] [PENDING_UPLOAD] Total pending upload messages: 0
[21:14:48] [UNSENT_RETRY] No unsent messages found
[21:14:48] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:14:48] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:14:48] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:14:48] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:14:49] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:14:49] new_session POST ok: token len=157
[21:14:49] HELLO → sent (fetched token, role=query)
[21:14:49] [SIG] hello_ok received for query connection - ready to query agents
[21:14:49] [SIG] get_agents request sent for sessionId=ILUIWU
[21:14:49] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:14:49] [SERVER] Stopped reconnect polling
[21:14:49] [SIG] agents_list received: []
[21:14:49] [SIG] agents_list received: []
[21:14:49] [COMBINED_FETCH] Loaded 7221 read receipts, 878 messages with reactions
[21:14:49] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:14:49] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18406, 18407, 18408, 18409, 18410]
[21:15:28] [MENU] dismissAnyExistingMenu called
[21:15:28] [MENU] dismissAnyExistingMenu completed
[21:15:32] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:15:32] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=50, isReloading=false
[21:15:32] [SEND_MESSAGE] ✅ Added optimistic message id=-1 to arrays, newMsgCount=51
[21:15:32] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[-1, 18455, 18454, 18453, 18452]
[21:15:33] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:15:33] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:15:33] [CLIENT_SIG] Event received: type=0 messageId=18456
[21:15:33] [WS_EVENT] Received event: type=0, messageId=18456
[21:15:33] [WS_EVENT] 📨 New message notification (msgId=18456) - triggering incremental refresh, currentMsgCount=51
[21:15:33] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[21:15:33] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18455
[21:15:33] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18456,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:15:33"}
[21:15:33] [CHAT] receive_message.php JSON: ["ok": 1, "message_type": 0, "session_id": ILUIWU, "message_id": 18456, "datesent_utc": 2026-01-21 20:15:33, "file_name": ]
[21:15:33] [DB_UPGRADE] Upgrading message ID: -1 → 18456, preserveOriginalDate=false
[21:15:33] [DB_UPGRADE] ✅ Upgraded -1 → 18456 with send_status=0, 1 row(s) affected
[21:15:33] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -1 → 18456
[21:15:33] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -1 → 18456
[21:15:33] ReloadData 9
[21:15:33] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:15:33] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:15:33] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=51
[21:15:34] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[18406, 18407, 18408, 18409, 18410]
[21:15:39] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:15:39] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=51, isReloading=false
[21:15:39] [SEND_MESSAGE] ✅ Added optimistic message id=-2 to arrays, newMsgCount=52
[21:15:39] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[-2, 18456, 18455, 18454, 18453]
[21:15:39] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:15:39] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:15:40] [CLIENT_SIG] Event received: type=0 messageId=18457
[21:15:40] [WS_EVENT] Received event: type=0, messageId=18457
[21:15:40] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18457,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:15:39"}
[21:15:40] [WS_EVENT] 📨 New message notification (msgId=18457) - triggering incremental refresh, currentMsgCount=52
[21:15:40] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=52
[21:15:40] [CHAT] receive_message.php JSON: ["message_id": 18457, "datesent_utc": 2026-01-21 20:15:39, "file_name": , "message_type": 0, "session_id": ILUIWU, "ok": 1]
[21:15:40] [DB_UPGRADE] Upgrading message ID: -2 → 18457, preserveOriginalDate=false
[21:15:40] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18456
[21:15:40] [DB_UPGRADE] ✅ Upgraded -2 → 18457 with send_status=0, 1 row(s) affected
[21:15:40] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -2 → 18457
[21:15:40] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -2 → 18457
[21:15:40] ReloadData 9
[21:15:40] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:15:40] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:15:40] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=52
[21:15:40] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[18406, 18407, 18408, 18409, 18410]
[21:15:49] [CLIENT_SIG] Client connected: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE) on session 'ILUIWU' (my session: 'ILUIWU')
[21:15:52] [PUSH] Silent push received
[21:15:52] [PUSH_EMBED] No embedded message_data in notification
[21:15:52] [PUSH] No embedded data, pre-loading messages from server
[21:15:52] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:15:52] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:15:52] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:15:52] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:15:52] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18457]
[21:15:52] [PUSH] Parsed message_id: 18457
[21:15:52] [PUSH] Parsed operation_type: 3
[21:15:52] [PUSH] Taking direct action: opType=3, messageId=18457
[21:15:52] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18457
[21:15:52] [CLIENT_SIG] Event received: type=3 messageId=18457
[21:15:52] [WS_EVENT] Received event: type=3, messageId=18457
[21:15:52] [WS_EVENT] Read receipt for message 18457 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:15:54] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:15:54] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=52, isReloading=false
[21:15:54] [SEND_MESSAGE] ✅ Added optimistic message id=-3 to arrays, newMsgCount=53
[21:15:54] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[-3, 18457, 18456, 18455, 18454]
[21:15:54] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:15:54] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:15:55] [CLIENT_SIG] Event received: type=0 messageId=18458
[21:15:55] [WS_EVENT] Received event: type=0, messageId=18458
[21:15:55] [WS_EVENT] 📨 New message notification (msgId=18458) - triggering incremental refresh, currentMsgCount=53
[21:15:55] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=53
[21:15:55] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18457
[21:15:55] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18458,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:15:54"}
[21:15:55] [CHAT] receive_message.php JSON: ["datesent_utc": 2026-01-21 20:15:54, "file_name": , "message_id": 18458, "message_type": 0, "ok": 1, "session_id": ILUIWU]
[21:15:55] [DB_UPGRADE] Upgrading message ID: -3 → 18458, preserveOriginalDate=false
[21:15:55] [DB_UPGRADE] ✅ Upgraded -3 → 18458 with send_status=0, 1 row(s) affected
[21:15:55] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -3 → 18458
[21:15:55] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -3 → 18458
[21:15:55] ReloadData 9
[21:15:55] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:15:55] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:15:55] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=53
[21:15:55] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[18406, 18407, 18408, 18409, 18410]
[21:15:56] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:15:57] [PUSH] Silent push received
[21:15:57] [PUSH_EMBED] No embedded message_data in notification
[21:15:57] [PUSH] No embedded data, pre-loading messages from server
[21:15:57] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:15:57] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:15:57] [PRELOAD_CACHE] Preserving 1 push-inserted messages: [18408]
[21:15:57] [PUSH_PRELOAD] ⚡ Pre-cached 51 messages for instant display (preserved 1 from push)
[21:15:57] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:15:57] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18458]
[21:15:57] [PUSH] Parsed message_id: 18458
[21:15:57] [PUSH] Parsed operation_type: 3
[21:15:57] [PUSH] Taking direct action: opType=3, messageId=18458
[21:15:57] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18458
[21:15:57] [CLIENT_SIG] Event received: type=3 messageId=18458
[21:15:57] [WS_EVENT] Received event: type=3, messageId=18458
[21:15:57] [WS_EVENT] Read receipt for message 18458 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:16:06] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:16:06] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=53, isReloading=false
[21:16:06] [SEND_MESSAGE] ✅ Added optimistic message id=-4 to arrays, newMsgCount=54
[21:16:06] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[-4, 18458, 18457, 18456, 18455]
[21:16:06] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:16:06] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:16:07] [CLIENT_SIG] Event received: type=0 messageId=18459
[21:16:07] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18459,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:16:06"}
[21:16:07] [WS_EVENT] Received event: type=0, messageId=18459
[21:16:07] [WS_EVENT] 📨 New message notification (msgId=18459) - triggering incremental refresh, currentMsgCount=54
[21:16:07] [CHAT] receive_message.php JSON: ["message_id": 18459, "file_name": , "session_id": ILUIWU, "datesent_utc": 2026-01-21 20:16:06, "message_type": 0, "ok": 1]
[21:16:07] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=54
[21:16:07] [DB_UPGRADE] Upgrading message ID: -4 → 18459, preserveOriginalDate=false
[21:16:07] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18458
[21:16:07] [DB_UPGRADE] ✅ Upgraded -4 → 18459 with send_status=0, 1 row(s) affected
[21:16:07] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -4 → 18459
[21:16:07] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -4 → 18459
[21:16:07] ReloadData 9
[21:16:07] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:16:07] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:16:07] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=54
[21:16:07] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[18406, 18407, 18408, 18409, 18410]
[21:16:08] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:16:08] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:16:08] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=54, isReloading=false
[21:16:08] [SEND_MESSAGE] ✅ Added optimistic message id=-5 to arrays, newMsgCount=55
[21:16:08] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=55, first5Ids=[-5, 18459, 18458, 18457, 18456]
[21:16:09] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:16:09] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:16:09] [PUSH] Silent push received
[21:16:09] [PUSH_EMBED] No embedded message_data in notification
[21:16:09] [PUSH] No embedded data, pre-loading messages from server
[21:16:09] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:16:09] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:16:09] [PRELOAD_CACHE] Preserving 3 push-inserted messages: [18410, 18409, 18408]
[21:16:09] [PUSH_PRELOAD] ⚡ Pre-cached 53 messages for instant display (preserved 3 from push)
[21:16:09] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:16:09] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18459]
[21:16:09] [PUSH] Parsed message_id: 18459
[21:16:09] [PUSH] Parsed operation_type: 3
[21:16:09] [PUSH] Taking direct action: opType=3, messageId=18459
[21:16:09] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18459
[21:16:09] [CLIENT_SIG] Event received: type=3 messageId=18459
[21:16:09] [WS_EVENT] Received event: type=3, messageId=18459
[21:16:09] [WS_EVENT] Read receipt for message 18459 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:16:09] [CLIENT_SIG] Event received: type=0 messageId=18460
[21:16:09] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18460,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:16:09"}
[21:16:09] [WS_EVENT] Received event: type=0, messageId=18460
[21:16:09] [WS_EVENT] 📨 New message notification (msgId=18460) - triggering incremental refresh, currentMsgCount=55
[21:16:09] [CHAT] receive_message.php JSON: ["file_name": , "message_id": 18460, "message_type": 0, "datesent_utc": 2026-01-21 20:16:09, "ok": 1, "session_id": ILUIWU]
[21:16:09] [DB_UPGRADE] Upgrading message ID: -5 → 18460, preserveOriginalDate=false
[21:16:09] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=55
[21:16:09] [DB_UPGRADE] ❌ Step fail: UNIQUE constraint failed: local_messages.message_id
[21:16:09] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18460
[21:16:09] ReloadData 9
[21:16:10] [INCREMENTAL_SYNC] ✅ No new messages
[21:16:10] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=55
[21:16:10] [MENU] dismissAnyExistingMenu called
[21:16:10] [MENU] dismissAnyExistingMenu completed
[21:16:10] [MENU] Created button 'Reply' at index 0
[21:16:10] [MENU] Created button 'Edit' at index 1
[21:16:10] [MENU] Created button 'Copy' at index 2
[21:16:10] [MENU] Created button 'Delete' at index 3
[21:16:10] [MENU] Menu added at y=444.0
[21:16:11] [PUSH] Silent push received
[21:16:11] [PUSH_EMBED] No embedded message_data in notification
[21:16:11] [PUSH] No embedded data, pre-loading messages from server
[21:16:11] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:16:11] [MENU] menuButtonTouchDown - button title: Edit, tag: 1
[21:16:11] [MENU] menuButtonTapped - button title: Edit, tag: 1
[21:16:11] [MENU] Button frame: (0.0, 44.0, 120.0, 44.0), superview: true
[21:16:11] [MENU] Found action closure, dismissing menu first
[21:16:11] [MENU] dismissAnyExistingMenu called
[21:16:11] [MENU] Found menu with tag 9999, removing
[21:16:11] [MENU] Removing blur effect
[21:16:11] [MENU] Removing floating message snapshot
[21:16:11] [MENU] Recorded dismissal time for debounce
[21:16:11] [MENU] dismissAnyExistingMenu completed
[21:16:11] [MENU] Menu dismissed, executing action
[21:16:11] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:16:11] [MENU] Action executed
[21:16:11] [PRELOAD_CACHE] Preserving 3 push-inserted messages: [18410, 18409, 18408]
[21:16:11] [PUSH_PRELOAD] ⚡ Pre-cached 53 messages for instant display (preserved 3 from push)
[21:16:11] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:16:11] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18460]
[21:16:11] [PUSH] Parsed message_id: 18460
[21:16:11] [PUSH] Parsed operation_type: 3
[21:16:11] [PUSH] Taking direct action: opType=3, messageId=18460
[21:16:11] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18460
[21:16:11] [SCROLL_BTN] Showing button - 305pt from bottom > half 223pt
[21:16:11] [CLIENT_SIG] Event received: type=3 messageId=18460
[21:16:11] [WS_EVENT] Received event: type=3, messageId=18460
[21:16:11] [WS_EVENT] Read receipt for message 18460 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:16:14] [DB_SEND] 📥 Loaded msg id=-5 with send_status=1 (sending)
[21:16:14] ReloadData 11 - applying tab 0 filtering after message edit
[21:16:14] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=55, first5Ids=[18460, 18459, 18458, 18457, 18456]
[21:16:15] [CLIENT_SIG] Event received: type=2 messageId=18460
[21:16:15] [CHAT] edit_message.php HTTP 200
── Body ──
{"ok":true,"message":"Message updated","session_id":"ILUIWU","message_id":18460,"event_type":2}
[21:16:15] [WS_EVENT] Received event: type=2, messageId=18460
[21:16:15] [WS_EVENT] Message edited/updated: 18460
[21:16:15] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=55, first5Ids=[18460, 18459, 18458, 18457, 18456]
[21:16:15] [COMBINED_FETCH] Loaded 7226 read receipts, 878 messages with reactions
[21:16:16] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=55, first5Ids=[18460, 18459, 18458, 18457, 18456]
[21:16:17] [PUSH] Silent push received
[21:16:17] [PUSH_EMBED] No embedded message_data in notification
[21:16:17] [PUSH] No embedded data, pre-loading messages from server
[21:16:17] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:16:17] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:16:17] [PRELOAD_CACHE] Preserving 3 push-inserted messages: [18410, 18409, 18408]
[21:16:17] [PUSH_PRELOAD] ⚡ Pre-cached 53 messages for instant display (preserved 3 from push)
[21:16:17] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:16:17] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18460, AnyHashable("aps"): {
    "content-available" = 1;
}]
[21:16:17] [PUSH] Parsed message_id: 18460
[21:16:17] [PUSH] Parsed operation_type: 3
[21:16:17] [PUSH] Taking direct action: opType=3, messageId=18460
[21:16:17] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18460
[21:16:32] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:16:37] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:16:37] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:16:37] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=55, isReloading=false
[21:16:37] [SEND_MESSAGE] ✅ Added optimistic message id=-6 to arrays, newMsgCount=56
[21:16:37] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=56, first5Ids=[-6, 18460, 18459, 18458, 18457]
[21:16:37] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:16:37] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:16:39] [CLIENT_SIG] Event received: type=0 messageId=18461
[21:16:39] [WS_EVENT] Received event: type=0, messageId=18461
[21:16:39] [WS_EVENT] 📨 New message notification (msgId=18461) - triggering incremental refresh, currentMsgCount=56
[21:16:39] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=56
[21:16:39] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18460
[21:16:39] [PUSH] Silent push received
[21:16:39] [PUSH_EMBED] 📩 Received embedded message: id=18461, type=0, sender=Esra
[21:16:39] [PUSH_EMBED] ✅ Saved message 18461 to local DB (sync)
[21:16:39] [PUSH_EMBED] Inserted message 18461 into existing cache (now 54 messages)
[21:16:39] [PUSH_EMBED] Fetching evolution data for message 18461 in background
[21:16:39] [PUSH_EMBED] ✅ Fully processed message 18461
[21:16:39] [PUSH] Embedded message handled instantly from silent push
[21:16:39] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[21:16:39] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[21:16:39] [PUSH_UI] Inserted message 18461 into UI (now 57 messages)
[21:16:39] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 0, AnyHashable("session_id"): ILUIWU, AnyHashable("message_data"): {
    datesent = "2026-01-21 20:16:37";
    "file_name" = "";
    message = "Babyy\Ud83d\Ude0d\Ud83d\Ude0d";
    "message_id" = 18461;
    "message_type" = 0;
    "prev_session_message_id" = 18460;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("message_id"): 18461, AnyHashable("aps"): {
    "content-available" = 1;
}]
[21:16:39] [PUSH_EMBED_VC] Message 18461 already in memory - skipping
[21:16:39] [PUSH] ⚡ Embedded message handled directly in ViewController
[21:16:39] [PUSH] Parsed message_id: 18461
[21:16:39] [PUSH] Parsed operation_type: 0
[21:16:39] [PUSH] Taking direct action: opType=0, messageId=18461
[21:16:39] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18461
[21:16:39] [PUSH] ⚡ Message 18461 already in memory - skipping duplicate notification entirely
[21:16:39] [PUSH_EMBED] Got evolution data for message 18461, saving to local DB
[21:16:39] [PUSH_EMBED] Saved evolution data for message 18461
[21:16:39] [INCREMENTAL_SYNC] ✅ Found 2 new messages
[21:16:39] [INCREMENTAL_SYNC] Replaced optimistic message (id=-6) with server message (id=18462)
[21:16:39] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=2
[21:16:39] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:16:39] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=57
[21:16:39] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=57, first5Ids=[18406, 18407, 18408, 18409, 18410]
[21:16:39] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18460 → 18461
[21:16:39] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:16:40] [CLIENT_SIG] Event received: type=0 messageId=18462
[21:16:40] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18462,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:16:37"}
[21:16:40] [WS_EVENT] Received event: type=0, messageId=18462
[21:16:40] [WS_EVENT] 📨 New message notification (msgId=18462) - triggering incremental refresh, currentMsgCount=57
[21:16:40] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=57
[21:16:40] [CHAT] receive_message.php JSON: ["datesent_utc": 2026-01-21 20:16:37, "ok": 1, "message_type": 0, "session_id": ILUIWU, "file_name": , "message_id": 18462]
[21:16:40] [DB_UPGRADE] Upgrading message ID: -6 → 18462, preserveOriginalDate=false
[21:16:40] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18462
[21:16:40] [DB_UPGRADE] ⚠️ No rows affected - message -6 not found in DB
[21:16:40] [SEND_UPGRADE] ⚠️ Server ID 18462 already exists - removing provisional entry -6
[21:16:40] ReloadData 9
[21:16:40] [INCREMENTAL_SYNC] ✅ No new messages
[21:16:40] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=57
[21:16:41] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:16:41] [PUSH] Silent push received
[21:16:41] [PUSH_EMBED] No embedded message_data in notification
[21:16:41] [PUSH] No embedded data, pre-loading messages from server
[21:16:41] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:16:41] [PUSH] Silent push received
[21:16:41] [PUSH_EMBED] No embedded message_data in notification
[21:16:41] [PUSH] No embedded data, pre-loading messages from server
[21:16:41] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:16:41] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:16:41] [PRELOAD_CACHE] Preserving 5 push-inserted messages: [18412, 18411, 18410, 18409, 18408]
[21:16:41] [PUSH_PRELOAD] ⚡ Pre-cached 55 messages for instant display (preserved 5 from push)
[21:16:41] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:16:41] [PRELOAD_CACHE] Preserving 5 push-inserted messages: [18412, 18411, 18410, 18409, 18408]
[21:16:41] [PUSH_PRELOAD] ⚡ Pre-cached 55 messages for instant display (preserved 5 from push)
[21:16:41] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:16:41] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18461, AnyHashable("aps"): {
    "content-available" = 1;
}]
[21:16:41] [PUSH] Parsed message_id: 18461
[21:16:41] [PUSH] Parsed operation_type: 3
[21:16:41] [PUSH] Taking direct action: opType=3, messageId=18461
[21:16:41] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18461
[21:16:41] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:16:41] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18462, AnyHashable("aps"): {
    "content-available" = 1;
}]
[21:16:41] [PUSH] Parsed message_id: 18462
[21:16:41] [PUSH] Parsed operation_type: 3
[21:16:41] [PUSH] Taking direct action: opType=3, messageId=18462
[21:16:41] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18462
[21:16:42] [CLIENT_SIG] Event received: type=3 messageId=18461
[21:16:42] [WS_EVENT] Received event: type=3, messageId=18461
[21:16:42] [WS_EVENT] Read receipt for message 18461 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:16:42] [CLIENT_SIG] Event received: type=3 messageId=18462
[21:16:42] [WS_EVENT] Received event: type=3, messageId=18462
[21:16:42] [WS_EVENT] Read receipt for message 18462 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:16:46] [LIFECYCLE] App resigning active - cleared crash flag
[21:16:47] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:16:47] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[21:16:47] [SECURITY] Saved background timestamp
[21:16:47] [LIFECYCLE] App entering background - cleared crash flag
[21:16:47] [CLIENT_SIG] Disconnecting
[21:16:47] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[21:16:47] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[21:16:47] [WS] Canceling WebSocket for query connection to iosILUIWU
[21:16:47] In cleanupPeer
[21:16:47] In cleanupPeer
[21:16:47] [LIFECYCLE] WebRTC audio disabled
[21:16:47] [LIFECYCLE] AVAudioSession deactivated
[21:16:47] [LIFECYCLE] All connections stopped
[21:16:47] [CLIENT_SIG] WebSocket closed with code 1001
[21:16:47] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:16:47] [SERVER] Stopped reconnect polling
[21:16:47] Will request stop of video 0
[21:16:47] Will request stop of video 0
[21:16:47] [WS] WebSocket task completed with error - isQueryOnly=true: cancelled
[21:16:47] [WS] Query connection error - cleaning up all agent connections and views
[21:16:47] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[21:16:47] [WS] Query connection failed - cleaning up all agent connections and views
[21:16:47] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[21:16:47] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:16:47] [PIP] Removing 0 tracks from PiP for connection 0
[21:16:47] [PIP] ✅ All tracks removed for connection 0
[21:16:47] [PIP] Removing 0 tracks from PiP for connection 0
[21:16:47] [PIP] ✅ All tracks removed for connection 0
[21:16:47] [CLEANUP] ========================================
[21:16:47] [CLEANUP] Cleaning up all agent connections and views
[21:16:47] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:16:47] [CLEANUP] Stopped and removed 0 video connections
[21:16:47] [CLEANUP] Removed 0 video views
[21:16:47] [CLEANUP] Removed 0 feed scroll views
[21:16:47] [CLEANUP] Removed 0 status labels
[21:16:47] [CLEANUP] Reset agent query state
[21:16:47] [CLEANUP] Updated page indicator
[21:16:47] [CLEANUP] Rebuilt video layout
[21:16:47] [CLEANUP] ✅ All agent connections and views cleaned up
[21:16:47] [CLEANUP] ========================================
[21:16:47] [SERVER] Skipping reconnect polling - app is in background
[21:16:47] [WS] URLSession invalidated successfully
[21:16:47] [CLEANUP] ========================================
[21:16:47] [CLEANUP] Cleaning up all agent connections and views
[21:16:47] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:16:47] [CLEANUP] Stopped and removed 0 video connections
[21:16:47] [CLEANUP] Removed 0 video views
[21:16:47] [CLEANUP] Removed 0 feed scroll views
[21:16:47] [CLEANUP] Removed 0 status labels
[21:16:47] [CLEANUP] Reset agent query state
[21:16:47] [CLEANUP] Updated page indicator
[21:16:47] [CLEANUP] Rebuilt video layout
[21:16:47] [CLEANUP] ✅ All agent connections and views cleaned up
[21:16:47] [CLEANUP] ========================================
[21:16:47] [SERVER] Skipping reconnect polling - app is in background
[21:16:50] [CRASH] Previous session did not exit cleanly - crash detected
[21:16:50] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:16:50] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:16:50] [GIPHY] SDK not available - using REST API fallback
[21:16:50] [BACKGROUND] Background fetch enabled
[21:16:50] [AUTH] Starting PIN authentication
[21:16:50] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:16:50] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:16:50] [CLEANUP] No old timer messages to delete
[21:16:50] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:16:50] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:16:50] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:16:50] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:16:50] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:16:50] [USER] ✅ User registered successfully
[21:16:50] [PUSH] User registration after token update: success
[21:16:50] [CLIENT_SIG] WebSocket opened
[21:16:50] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:16:50] [CLIENT_SIG] Connected! clientId=SrhwOeVuAzoQueE6
[21:16:50] [CLIENT_SIG] Received 2 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:16:50] [CLIENT_SIG]   - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:16:50] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:16:50] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18462)...
[21:16:50] [PRELOAD] No messages or parse error
[21:16:52] [PIN_AUTH] Correct PIN
[21:16:52] [SECURITY] Restored real session: ILUIWU
[21:16:52] [SECURITY] Restored real session: ILUIWU
[21:16:52] [SECURITY] Saved real session: ILUIWU
[21:16:52] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:16:52] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:16:52] Documents Directory: /var/mobile/Containers/Data/Application/3152D09F-5722-424D-B902-B89D857A4A33/Documents
[21:16:52] [THEME] Applying current theme
[21:16:52] [CHAT] Applied day theme (mode: day)
[21:16:52] [SECURITY] Saved real session: ILUIWU
[21:16:52] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:16:52] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:16:52] [NETWORK] Network monitor started
[21:16:52] [NETWORK] Status changed: connected
[21:16:52] Did transition
[21:16:52] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:16:52] [DB_SEND] 📥 Loaded msg id=-5 with send_status=1 (sending)
[21:16:52] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:16:52] [VIEWER] Screen lock enabled - normal idle behavior
[21:16:52] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:16:52] [VCC] ========== VideoConnectionClass INIT ==========
[21:16:52] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:16:52] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:16:52] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:16:52] [DATA AUDIO] Creating encoder/decoder factories...
[21:16:52] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:16:52] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:16:52] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:16:52] [DATA AUDIO] ✅ Factory created
[21:16:52] [DATA AUDIO] RTCAudioSession locked
[21:16:52] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:16:52] [DATA AUDIO] RTCAudioSession unlocked
[21:16:52] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:16:52] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:16:52] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:16:52] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:16:52] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:16:52] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:16:52] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:16:52] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:16:52] Did transition
[21:16:52] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:16:52] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:16:52] [CHUNK] Merged 878 reactions synchronously
[21:16:52] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:16:52] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:16:52] [MIGRATION] No messages need sender_name backfill
[21:16:52] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:16:52] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:16:52] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:16:52] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:16:52] [USER] ✅ User registered successfully
[21:16:52] [USER] User registration successful
[21:16:52] [GALLERY_DB] ✅ Loaded 477 media messages
[21:16:52] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18462
[21:16:52] [INCREMENTAL_SYNC] ✅ No new messages
[21:16:52] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:16:52] [GALLERY] First 5 after sort (newest first):
[21:16:52] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:16:52] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:16:52] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:16:52] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:16:52] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:16:52] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:16:52] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18414, 18415, 18416, 18417, 18418]
[21:16:52] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:16:52] [SERVER] Starting reconnect polling (5s interval)
[21:16:52] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:16:52] [ICONS] Offset applied: -14.6
[21:16:52] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:16:52] [ICONS] Chat center: (31.2, 87.0)
[21:16:52] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:16:52] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:16:52] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:16:52] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:16:52] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:16:52] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:16:52] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:16:52] [ICONS] Screen width: 440.0
[21:16:52] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:16:52] [UNSENT_RETRY] Checking for unsent messages...
[21:16:52] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:16:52] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:16:52] [UPLOAD_RECOVERY] Session: ILUIWU
[21:16:52] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:16:52] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:16:52] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:16:52] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:16:52] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:16:52] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:16:52] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:16:52] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:16:52] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:16:52] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:16:52] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:16:52] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:16:52] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[21:16:52] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[21:16:52] [PENDING_UPLOAD] Found pending message: id=-5, file=, uploadStatus=0, sendStatus=1
[21:16:52] [PENDING_UPLOAD] Total pending upload messages: 1
[21:16:52] [UNSENT_RETRY] 🔄 Found 1 unsent messages from me to retry
[21:16:52] [UNSENT_RETRY] 🔄 Retrying message id=-5, type=0, file=
[21:16:52] [SEND_STATUS] 💾 Updating DB: messageId=-5, status=1 (sending)
[21:16:52] [SEND_STATUS] ✅ DB updated: 1 row(s) affected for messageId=-5
[21:16:52] [UNSENT_RETRY] 🔑 Including client_message_id=2C43C22A-06F0-481C-B189-0FB6952EF58F for idempotent retry
[21:16:52] [UNSENT_RETRY] 📤 Sending message id=-5 to server
[21:16:52] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:16:52] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:16:52] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:16:52] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:16:52] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:16:52] new_session POST ok: token len=157
[21:16:52] HELLO → sent (fetched token, role=query)
[21:16:52] [SIG] hello_ok received for query connection - ready to query agents
[21:16:52] [SIG] get_agents request sent for sessionId=ILUIWU
[21:16:52] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:16:52] [SERVER] Stopped reconnect polling
[21:16:52] [SIG] agents_list received: []
[21:16:52] [SIG] agents_list received: []
[21:16:52] [UNSENT_RETRY] 📥 receive_message.php HTTP 200: {"ok":true,"message_id":18460,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:16:09","idempotent":true}
[21:16:52] [UNSENT_RETRY] ✅ Message synced! Old id=-5 → new server id=18460
[21:16:52] [DB_UPGRADE] Upgrading message ID: -5 → 18460, preserveOriginalDate=true
[21:16:52] [DB_UPGRADE] ❌ Step fail: UNIQUE constraint failed: local_messages.message_id
[21:16:52] [UNSENT_RETRY] ⚠️ Server ID 18460 already exists in array - removing provisional entry -5 (duplicate from background sync)
[21:16:52] ReloadData unsent_retry
[21:16:53] [COMBINED_FETCH] Loaded 7228 read receipts, 878 messages with reactions
[21:16:53] [READBY_ENRICH] Enriched 49 messages with readBy data
[21:16:53] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=49, first5Ids=[18414, 18415, 18416, 18417, 18418]
[21:16:53] [MENU] dismissAnyExistingMenu called
[21:16:53] [MENU] dismissAnyExistingMenu completed
[21:16:55] [SEARCH] Found 2475 messages matching 'b' in local DB
[21:16:55] [SEARCH] Found 1323 messages matching 'ba' in local DB
[21:16:55] [SEARCH] Found 1186 messages matching 'bab' in local DB
[21:16:55] [SEARCH] Found 1160 messages matching 'baby' in local DB
[21:16:57] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:16:58] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:17:01] [SEARCH] 🔍 User selected search result: id=17637, text='Goooood morning babyyy', sender='Laurent'
[21:17:01] [SEARCH] 🔍 scrollToMessage called for id=17637, chatRows.count=50, allMessages.count=49, totalInDB=7224
[21:17:01] [SEARCH] ⚠️ Message 17637 NOT in chatRows (range: 18414...18462), need to load more
[21:17:01] [SEARCH] 📅 countMessagesNewerThan(17637): found date='2026-01-14 06:33:08', newerCount=818
[21:17:01] [SEARCH] 📊 countMessagesNewerThan(17637) = 818
[21:17:01] [SEARCH] 📥 Loading 869 messages from DB (position 818 + 1 + 50 context)
[21:17:01] [SEARCH] 📥 Loaded 869 messages from DB
[21:17:01] [SEARCH] 📊 Loaded messages range: 17586...18462, contains target 17637: true
[21:17:01] [SEARCH] 🔄 Calling reloadMessagesForCurrentTabImmediate()
[21:17:01] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=869, first5Ids=[17586, 17587, 17588, 17589, 17590]
[21:17:01] [GUARD] ⚠️ buildChatRows received 869 messages - truncating to 500
[21:17:01] [SEARCH] 📊 After reload: chatRows.count=507, range: 17958...18462, contains target 17637: false
[21:17:01] DOWNLOADIIING 2360d0215b6a2ab2.mov
[21:17:01] [SEARCH] 🎯 tryScrollToMessage called for id=17637, chatRows.count=507
[21:17:01] [SEARCH] ❌ Message 17637 NOT FOUND in chatRows after loading! IDs present: [17958, 17959, 17960, 17961, 17962, 17963, 17964, 17965, 17966, 17967, 17968, 17969, 17970, 17971, 17972, 17973, 17974, 17975, 17976, 17977]... (total: 500)
[21:17:07] [MENU] dismissAnyExistingMenu called
[21:17:07] [MENU] dismissAnyExistingMenu completed
[21:17:07] [SCROLL_BTN] Showing button - 45943pt from bottom > half 379pt
[21:17:08] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18413, 18414, 18415, 18416, 18417]
[21:17:13] [CRASH] Previous session did not exit cleanly - crash detected
[21:17:13] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:17:13] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:17:13] [GIPHY] SDK not available - using REST API fallback
[21:17:13] [BACKGROUND] Background fetch enabled
[21:17:13] [AUTH] Starting PIN authentication
[21:17:13] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:17:13] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:17:13] [CLEANUP] No old timer messages to delete
[21:17:13] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:17:13] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:17:13] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:17:13] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:17:13] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:17:14] [USER] ✅ User registered successfully
[21:17:14] [PUSH] User registration after token update: success
[21:17:14] [CLIENT_SIG] WebSocket opened
[21:17:14] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:17:14] [CLIENT_SIG] Connected! clientId=LZ4uD9oZhr6PKLZA
[21:17:14] [CLIENT_SIG] Received 2 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:17:14] [CLIENT_SIG]   - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:17:14] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:17:14] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18462)...
[21:17:14] [PRELOAD] No messages or parse error
[21:17:15] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:17:15] [PIN_AUTH] Correct PIN
[21:17:15] [SECURITY] Restored real session: ILUIWU
[21:17:15] [SECURITY] Restored real session: ILUIWU
[21:17:15] [SECURITY] Saved real session: ILUIWU
[21:17:15] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:17:15] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:17:15] Documents Directory: /var/mobile/Containers/Data/Application/405A3578-C386-4F2E-85FA-2DC0558C84AD/Documents
[21:17:15] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:17:15] [THEME] Applying current theme
[21:17:15] [CHAT] Applied day theme (mode: day)
[21:17:15] [SECURITY] Saved real session: ILUIWU
[21:17:15] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:17:15] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:17:15] [NETWORK] Network monitor started
[21:17:15] [NETWORK] Status changed: connected
[21:17:15] Did transition
[21:17:15] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:17:15] [VIEWER] Screen lock enabled - normal idle behavior
[21:17:15] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:17:15] [VCC] ========== VideoConnectionClass INIT ==========
[21:17:15] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:17:15] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:17:15] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:17:15] [DATA AUDIO] Creating encoder/decoder factories...
[21:17:15] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:17:15] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:17:15] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:17:15] [DATA AUDIO] ✅ Factory created
[21:17:15] [DATA AUDIO] RTCAudioSession locked
[21:17:15] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:17:15] [DATA AUDIO] RTCAudioSession unlocked
[21:17:15] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:17:15] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:17:15] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:17:15] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:17:15] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:17:15] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:17:15] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:17:15] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:17:15] Did transition
[21:17:15] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:17:15] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:17:15] [CHUNK] Merged 878 reactions synchronously
[21:17:15] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:17:15] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:17:15] [MIGRATION] No messages need sender_name backfill
[21:17:15] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:17:15] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:17:15] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:17:15] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:17:15] [USER] ✅ User registered successfully
[21:17:15] [USER] User registration successful
[21:17:15] [GALLERY_DB] ✅ Loaded 477 media messages
[21:17:15] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18462
[21:17:16] [INCREMENTAL_SYNC] ✅ No new messages
[21:17:16] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:17:16] [GALLERY] First 5 after sort (newest first):
[21:17:16] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:17:16] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:17:16] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:17:16] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:17:16] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:17:16] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:17:16] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18413, 18414, 18415, 18416, 18417]
[21:17:16] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:17:16] [SERVER] Starting reconnect polling (5s interval)
[21:17:16] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:17:16] [ICONS] Offset applied: -14.6
[21:17:16] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:17:16] [ICONS] Chat center: (31.2, 87.0)
[21:17:16] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:17:16] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:17:16] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:17:16] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:17:16] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:17:16] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:17:16] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:17:16] [ICONS] Screen width: 440.0
[21:17:16] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:17:16] [UNSENT_RETRY] Checking for unsent messages...
[21:17:16] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:17:16] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:17:16] [UPLOAD_RECOVERY] Session: ILUIWU
[21:17:16] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:17:16] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:17:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:17:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:17:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:17:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:17:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:17:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:17:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:17:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:17:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:17:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:17:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[21:17:16] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[21:17:16] [PENDING_UPLOAD] Total pending upload messages: 0
[21:17:16] [UNSENT_RETRY] No unsent messages found
[21:17:16] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:17:16] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:17:16] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:17:16] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:17:16] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:17:16] new_session POST ok: token len=157
[21:17:16] HELLO → sent (fetched token, role=query)
[21:17:16] [SIG] hello_ok received for query connection - ready to query agents
[21:17:16] [SIG] get_agents request sent for sessionId=ILUIWU
[21:17:16] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:17:16] [SERVER] Stopped reconnect polling
[21:17:16] [SIG] agents_list received: []
[21:17:16] [SIG] agents_list received: []
[21:17:16] [COMBINED_FETCH] Loaded 7228 read receipts, 878 messages with reactions
[21:17:16] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:17:16] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18413, 18414, 18415, 18416, 18417]
[21:17:17] [MENU] dismissAnyExistingMenu called
[21:17:17] [MENU] dismissAnyExistingMenu completed
[21:17:19] [SEARCH] Found 2475 messages matching 'b' in local DB
[21:17:19] [SEARCH] Found 1323 messages matching 'ba' in local DB
[21:17:19] [SEARCH] Found 1186 messages matching 'bab' in local DB
[21:17:19] [SEARCH] Found 1160 messages matching 'baby' in local DB
[21:17:25] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:17:29] [SEARCH] 🔍 User selected search result: id=17162, text='Back babyyyyy', sender='Laurent'
[21:17:29] [SEARCH] 🔍 scrollToMessage called for id=17162, chatRows.count=51, allMessages.count=50, totalInDB=7224
[21:17:29] [SEARCH] ⚠️ Message 17162 NOT in chatRows (range: 18413...18462), need to load more
[21:17:29] [SEARCH] 📅 countMessagesNewerThan(17162): found date='2026-01-08 08:21:26', newerCount=1286
[21:17:29] [SEARCH] 📊 countMessagesNewerThan(17162) = 1286
[21:17:29] [SEARCH] 📥 Loading 1337 messages from DB (position 1286 + 1 + 50 context)
[21:17:29] [SEARCH] 📥 Loaded 1337 messages from DB
[21:17:29] [SEARCH] 📊 Loaded messages range: 17107...18462, contains target 17162: true
[21:17:29] [SEARCH] 🔄 Calling reloadMessagesForCurrentTabImmediate()
[21:17:29] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1337, first5Ids=[17107, 17108, 17109, 17110, 17111]
[21:17:29] [GUARD] ⚠️ buildChatRows received 1337 messages - truncating to 500
[21:17:29] [SEARCH] 📊 After reload: chatRows.count=507, range: 17958...18462, contains target 17162: false
[21:17:29] DOWNLOADIIING 2360d0215b6a2ab2.mov
[21:17:29] [SEARCH] 🎯 tryScrollToMessage called for id=17162, chatRows.count=507
[21:17:29] [SEARCH] ❌ Message 17162 NOT FOUND in chatRows after loading! IDs present: [17958, 17959, 17960, 17961, 17962, 17963, 17964, 17965, 17966, 17967, 17968, 17969, 17970, 17971, 17972, 17973, 17974, 17975, 17976, 17977]... (total: 500)
[21:17:36] [MENU] dismissAnyExistingMenu called
[21:17:36] [MENU] dismissAnyExistingMenu completed
[21:17:36] [SCROLL_BTN] Showing button - 45845pt from bottom > half 379pt
[21:17:36] [CELL_UPLOAD] configure: msgId=18022, file=45d67ad603184f8b.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:17:36] [CELL_UPLOAD] → not my message, setting complete
[21:17:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=45d67ad603184f8b.jpg, overlayExists=true
[21:17:36] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:17:37] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:17:39] [CLIENT_SIG] Event received: type=0 messageId=18463
[21:17:39] [WS_EVENT] Received event: type=0, messageId=18463
[21:17:39] [WS_EVENT] 📨 New message notification (msgId=18463) - triggering incremental refresh, currentMsgCount=1337
[21:17:39] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=1337
[21:17:39] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18462
[21:17:39] [PUSH] Silent push received
[21:17:39] [PUSH_EMBED] 📩 Received embedded message: id=18463, type=0, sender=Esra
[21:17:39] [PUSH_EMBED] ✅ Saved message 18463 to local DB (sync)
[21:17:39] [PUSH_EMBED] Created new cache with embedded message 18463
[21:17:39] [PUSH_EMBED] Fetching evolution data for message 18463 in background
[21:17:39] [PUSH_EMBED] ✅ Fully processed message 18463
[21:17:39] [PUSH] Embedded message handled instantly from silent push
[21:17:39] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[21:17:39] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[21:17:39] [PUSH_UI] Inserted message 18463 into UI (now 1338 messages)
[21:17:39] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 0, AnyHashable("message_id"): 18463, AnyHashable("message_data"): {
    datesent = "2026-01-21 20:17:37";
    "file_name" = "";
    message = "Before you sleep, you will do one more 1-0";
    "message_id" = 18463;
    "message_type" = 0;
    "prev_session_message_id" = 18462;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("aps"): {
    "content-available" = 1;
}]
[21:17:39] [PUSH_EMBED_VC] Message 18463 already in memory - skipping
[21:17:39] [PUSH] ⚡ Embedded message handled directly in ViewController
[21:17:39] [PUSH] Parsed message_id: 18463
[21:17:39] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:17:39] [PUSH] Parsed operation_type: 0
[21:17:39] [PUSH] Taking direct action: opType=0, messageId=18463
[21:17:39] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18463
[21:17:39] [PUSH] ⚡ Message 18463 already in memory - skipping duplicate notification entirely
[21:17:39] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:17:39] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:17:39] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=1338
[21:17:39] [PUSH_EMBED] Got evolution data for message 18463, saving to local DB
[21:17:39] [PUSH_EMBED] Saved evolution data for message 18463
[21:17:41] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1338, first5Ids=[17107, 17108, 17109, 17110, 17111]
[21:17:41] [GUARD] ⚠️ buildChatRows received 1338 messages - truncating to 500
[21:17:48] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18462 → 18463
[21:17:48] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18414, 18415, 18416, 18417, 18418]
[21:17:51] [PUSH] Silent push received
[21:17:51] [PUSH_EMBED] No embedded message_data in notification
[21:17:51] [PUSH] No embedded data, pre-loading messages from server
[21:17:51] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:17:51] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:17:51] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:17:51] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:17:51] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18463, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3]
[21:17:51] [PUSH] Parsed message_id: 18463
[21:17:51] [PUSH] Parsed operation_type: 3
[21:17:51] [PUSH] Taking direct action: opType=3, messageId=18463
[21:17:51] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18463
[21:17:51] [SCROLL_BTN] Showing button - 310pt from bottom > half 223pt
[21:17:52] [CLIENT_SIG] Event received: type=3 messageId=18463
[21:17:52] [WS_EVENT] Received event: type=3, messageId=18463
[21:17:52] [WS_EVENT] Read receipt for message 18463 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:17:54] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:18:04] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:18:04] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=50, isReloading=false
[21:18:04] [SEND_MESSAGE] ✅ Added optimistic message id=-1 to arrays, newMsgCount=51
[21:18:04] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[-1, 18463, 18462, 18461, 18460]
[21:18:04] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:18:04] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:18:06] [CLIENT_SIG] Event received: type=0 messageId=18464
[21:18:06] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18464,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:18:04"}
[21:18:06] [WS_EVENT] Received event: type=0, messageId=18464
[21:18:06] [WS_EVENT] 📨 New message notification (msgId=18464) - triggering incremental refresh, currentMsgCount=51
[21:18:06] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[21:18:06] [CHAT] receive_message.php JSON: ["file_name": , "datesent_utc": 2026-01-21 20:18:04, "message_id": 18464, "ok": 1, "session_id": ILUIWU, "message_type": 0]
[21:18:06] [DB_UPGRADE] Upgrading message ID: -1 → 18464, preserveOriginalDate=false
[21:18:06] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18463
[21:18:06] [DB_UPGRADE] ✅ Upgraded -1 → 18464 with send_status=0, 1 row(s) affected
[21:18:06] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -1 → 18464
[21:18:06] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -1 → 18464
[21:18:06] ReloadData 9
[21:18:06] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:18:06] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:18:06] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=51
[21:18:06] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[18414, 18415, 18416, 18417, 18418]
[21:18:09] [PUSH] Silent push received
[21:18:09] [PUSH_EMBED] No embedded message_data in notification
[21:18:09] [PUSH] No embedded data, pre-loading messages from server
[21:18:09] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:18:09] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:18:09] [PRELOAD_CACHE] Preserving 1 push-inserted messages: [18414]
[21:18:09] [PUSH_PRELOAD] ⚡ Pre-cached 51 messages for instant display (preserved 1 from push)
[21:18:09] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:18:09] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18464]
[21:18:09] [PUSH] Parsed message_id: 18464
[21:18:09] [PUSH] Parsed operation_type: 3
[21:18:09] [PUSH] Taking direct action: opType=3, messageId=18464
[21:18:09] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18464
[21:18:09] [CLIENT_SIG] Event received: type=3 messageId=18464
[21:18:09] [WS_EVENT] Received event: type=3, messageId=18464
[21:18:09] [WS_EVENT] Read receipt for message 18464 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:18:14] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:18:16] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:18:20] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:18:21] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:18:21] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:18:44] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:18:46] [CLIENT_SIG] Event received: type=0 messageId=18465
[21:18:46] [WS_EVENT] Received event: type=0, messageId=18465
[21:18:46] [WS_EVENT] 📨 New message notification (msgId=18465) - triggering incremental refresh, currentMsgCount=51
[21:18:46] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[21:18:46] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18464
[21:18:46] [PUSH] Silent push received
[21:18:46] [PUSH_EMBED] 📩 Received embedded message: id=18465, type=0, sender=Esra
[21:18:46] [PUSH_EMBED] ✅ Saved message 18465 to local DB (sync)
[21:18:46] [PUSH_EMBED] Inserted message 18465 into existing cache (now 52 messages)
[21:18:46] [PUSH_EMBED] Fetching evolution data for message 18465 in background
[21:18:46] [PUSH_EMBED] ✅ Fully processed message 18465
[21:18:46] [PUSH] Embedded message handled instantly from silent push
[21:18:46] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[21:18:46] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[21:18:46] [PUSH_UI] Inserted message 18465 into UI (now 52 messages)
[21:18:46] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 0, AnyHashable("message_id"): 18465, AnyHashable("message_data"): {
    datesent = "2026-01-21 20:18:44";
    "file_name" = "";
    message = "For 2nd round 10, for 3rd 15";
    "message_id" = 18465;
    "message_type" = 0;
    "prev_session_message_id" = 18464;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}]
[21:18:46] [PUSH_EMBED_VC] Message 18465 already in memory - skipping
[21:18:46] [PUSH] ⚡ Embedded message handled directly in ViewController
[21:18:46] [PUSH] Parsed message_id: 18465
[21:18:46] [PUSH] Parsed operation_type: 0
[21:18:46] [PUSH] Taking direct action: opType=0, messageId=18465
[21:18:46] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18465
[21:18:46] [PUSH] ⚡ Message 18465 already in memory - skipping duplicate notification entirely
[21:18:46] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:18:46] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:18:46] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:18:46] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=52
[21:18:46] [PUSH_EMBED] Got evolution data for message 18465, saving to local DB
[21:18:46] [PUSH_EMBED] Saved evolution data for message 18465
[21:18:46] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[18414, 18415, 18416, 18417, 18418]
[21:18:46] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18464 → 18465
[21:18:47] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:18:47] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:18:47] [PUSH] Silent push received
[21:18:47] [PUSH_EMBED] No embedded message_data in notification
[21:18:47] [PUSH] No embedded data, pre-loading messages from server
[21:18:47] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:18:47] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:18:47] [PRELOAD_CACHE] Preserving 2 push-inserted messages: [18415, 18414]
[21:18:47] [PUSH_PRELOAD] ⚡ Pre-cached 52 messages for instant display (preserved 2 from push)
[21:18:47] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:18:47] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18465, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3]
[21:18:47] [PUSH] Parsed message_id: 18465
[21:18:47] [PUSH] Parsed operation_type: 3
[21:18:47] [PUSH] Taking direct action: opType=3, messageId=18465
[21:18:47] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18465
[21:18:48] [CLIENT_SIG] Event received: type=3 messageId=18465
[21:18:48] [WS_EVENT] Received event: type=3, messageId=18465
[21:18:48] [WS_EVENT] Read receipt for message 18465 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:18:51] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:19:01] [MENU] dismissAnyExistingMenu called
[21:19:01] [MENU] dismissAnyExistingMenu completed
[21:19:22] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:19:26] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:19:29] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:19:29] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=52, isReloading=false
[21:19:29] [SEND_MESSAGE] ✅ Added optimistic message id=-2 to arrays, newMsgCount=53
[21:19:29] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[-2, 18465, 18464, 18463, 18462]
[21:19:29] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:19:29] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:19:31] [CLIENT_SIG] Event received: type=0 messageId=18466
[21:19:31] [WS_EVENT] Received event: type=0, messageId=18466
[21:19:31] [WS_EVENT] 📨 New message notification (msgId=18466) - triggering incremental refresh, currentMsgCount=53
[21:19:31] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=53
[21:19:31] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18465
[21:19:31] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18466,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:19:29"}
[21:19:31] [CHAT] receive_message.php JSON: ["datesent_utc": 2026-01-21 20:19:29, "file_name": , "ok": 1, "message_id": 18466, "session_id": ILUIWU, "message_type": 0]
[21:19:31] [DB_UPGRADE] Upgrading message ID: -2 → 18466, preserveOriginalDate=false
[21:19:31] [DB_UPGRADE] ✅ Upgraded -2 → 18466 with send_status=0, 1 row(s) affected
[21:19:31] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -2 → 18466
[21:19:31] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -2 → 18466
[21:19:31] ReloadData 9
[21:19:31] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:19:31] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:19:31] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=53
[21:19:31] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[18414, 18415, 18416, 18417, 18418]
[21:19:39] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:19:43] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:19:55] [CRASH] Previous session did not exit cleanly - crash detected
[21:19:55] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:19:55] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:19:55] [GIPHY] SDK not available - using REST API fallback
[21:19:55] [BACKGROUND] Background fetch enabled
[21:19:55] [CLEANUP] No old timer messages to delete
[21:19:55] [AUTH] Starting PIN authentication
[21:19:55] [PUSH] Silent push received
[21:19:55] [PUSH_EMBED] No embedded message_data in notification
[21:19:55] [PUSH] No embedded data, pre-loading messages from server
[21:19:55] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:19:55] [PUSH] Silent push received
[21:19:55] [PUSH_EMBED] 📩 Received embedded message: id=18467, type=0, sender=Esra
[21:19:55] [PUSH_EMBED] ✅ Saved message 18467 to local DB (sync)
[21:19:55] [PUSH_EMBED] Created new cache with embedded message 18467
[21:19:55] [PUSH_EMBED] Fetching evolution data for message 18467 in background
[21:19:55] [PUSH_EMBED] ✅ Fully processed message 18467
[21:19:55] [PUSH] Embedded message handled instantly from silent push
[21:19:55] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:19:55] [PUSH_EMBED] Got evolution data for message 18467, saving to local DB
[21:19:55] [PUSH_EMBED] Saved evolution data for message 18467
[21:19:55] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:19:55] [PRELOAD] Cache has only 1 messages (from push) - will load full history
[21:19:55] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:19:55] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18467)...
[21:19:55] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:19:55] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:19:55] [PRELOAD] No messages or parse error
[21:19:55] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:19:55] [USER] ✅ User registered successfully
[21:19:55] [PUSH] User registration after token update: success
[21:19:58] [CRASH] Previous session did not exit cleanly - crash detected
[21:19:58] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:19:58] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:19:58] [GIPHY] SDK not available - using REST API fallback
[21:19:58] [BACKGROUND] Background fetch enabled
[21:19:58] [AUTH] Starting PIN authentication
[21:19:58] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:19:58] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:19:58] [CLEANUP] No old timer messages to delete
[21:19:58] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:19:58] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:19:58] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:19:58] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:19:58] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:19:58] [USER] ✅ User registered successfully
[21:19:58] [PUSH] User registration after token update: success
[21:19:58] [CLIENT_SIG] WebSocket opened
[21:19:58] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:19:58] [CLIENT_SIG] Connected! clientId=UlJAbfJVv2TMDYH0
[21:19:58] [CLIENT_SIG] Received 2 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:19:58] [CLIENT_SIG]   - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:19:58] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:19:58] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18467)...
[21:19:58] [PRELOAD] No messages or parse error
[21:20:01] [PIN_AUTH] Correct PIN
[21:20:01] [SECURITY] Restored real session: ILUIWU
[21:20:01] [SECURITY] Restored real session: ILUIWU
[21:20:01] [SECURITY] Saved real session: ILUIWU
[21:20:01] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:20:01] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:20:01] Documents Directory: /var/mobile/Containers/Data/Application/BBD60F25-17B1-4F1A-A936-3FDEE7E37812/Documents
[21:20:01] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:20:01] [THEME] Applying current theme
[21:20:01] [CHAT] Applied day theme (mode: day)
[21:20:01] [SECURITY] Saved real session: ILUIWU
[21:20:01] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:20:01] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:20:01] [NETWORK] Network monitor started
[21:20:01] [NETWORK] Status changed: connected
[21:20:01] Did transition
[21:20:01] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:20:01] [VIEWER] Screen lock enabled - normal idle behavior
[21:20:01] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:20:01] [VCC] ========== VideoConnectionClass INIT ==========
[21:20:01] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:20:01] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:20:01] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:20:01] [DATA AUDIO] Creating encoder/decoder factories...
[21:20:01] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:20:01] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:20:01] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:20:01] [DATA AUDIO] ✅ Factory created
[21:20:01] [DATA AUDIO] RTCAudioSession locked
[21:20:01] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:20:01] [DATA AUDIO] RTCAudioSession unlocked
[21:20:01] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:20:01] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:20:01] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:20:01] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:20:01] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:20:01] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:20:01] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:20:01] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:20:01] Did transition
[21:20:01] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:20:01] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:20:01] [CHUNK] Merged 878 reactions synchronously
[21:20:01] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:20:01] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:20:01] [MIGRATION] No messages need sender_name backfill
[21:20:01] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:20:01] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:20:01] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:20:01] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:20:01] [USER] ✅ User registered successfully
[21:20:01] [USER] User registration successful
[21:20:01] [GALLERY_DB] ✅ Loaded 477 media messages
[21:20:01] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18467
[21:20:01] [INCREMENTAL_SYNC] ✅ No new messages
[21:20:01] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:20:01] [GALLERY] First 5 after sort (newest first):
[21:20:01] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:20:01] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:20:01] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:20:01] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:20:01] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:20:01] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:20:01] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18418, 18419, 18420, 18421, 18422]
[21:20:01] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:20:01] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18466 → 18467
[21:20:01] [SERVER] Starting reconnect polling (5s interval)
[21:20:01] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:20:01] [ICONS] Offset applied: -14.6
[21:20:01] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:20:01] [ICONS] Chat center: (31.2, 87.0)
[21:20:01] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:20:01] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:20:01] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:20:01] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:20:01] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:20:01] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:20:01] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:20:01] [ICONS] Screen width: 440.0
[21:20:01] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:20:01] [UNSENT_RETRY] Checking for unsent messages...
[21:20:01] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:20:01] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:20:01] [UPLOAD_RECOVERY] Session: ILUIWU
[21:20:01] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:20:01] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:20:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:20:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:20:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:20:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:20:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:20:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:20:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:20:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:20:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:20:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:20:01] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[21:20:01] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[21:20:01] [PENDING_UPLOAD] Total pending upload messages: 0
[21:20:01] [UNSENT_RETRY] No unsent messages found
[21:20:01] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:20:01] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:20:01] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:20:01] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:20:02] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:20:02] new_session POST ok: token len=157
[21:20:02] HELLO → sent (fetched token, role=query)
[21:20:02] [SIG] hello_ok received for query connection - ready to query agents
[21:20:02] [SIG] get_agents request sent for sessionId=ILUIWU
[21:20:02] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:20:02] [SERVER] Stopped reconnect polling
[21:20:02] [SIG] agents_list received: []
[21:20:02] [SIG] agents_list received: []
[21:20:02] [COMBINED_FETCH] Loaded 7233 read receipts, 879 messages with reactions
[21:20:02] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:20:02] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18418, 18419, 18420, 18421, 18422]
[21:20:02] [MENU] dismissAnyExistingMenu called
[21:20:02] [MENU] dismissAnyExistingMenu completed
[21:20:04] [PUSH] Silent push received
[21:20:04] [PUSH_EMBED] No embedded message_data in notification
[21:20:04] [PUSH] No embedded data, pre-loading messages from server
[21:20:04] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:20:04] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:20:04] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:20:04] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:20:04] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18467]
[21:20:04] [PUSH] Parsed message_id: 18467
[21:20:04] [PUSH] Parsed operation_type: 3
[21:20:04] [PUSH] Taking direct action: opType=3, messageId=18467
[21:20:04] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18467
[21:20:05] [SEARCH] Found 2478 messages matching 'b' in local DB
[21:20:05] [CLIENT_SIG] Event received: type=3 messageId=18467
[21:20:05] [WS_EVENT] Received event: type=3, messageId=18467
[21:20:05] [WS_EVENT] Read receipt for message 18467 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:20:05] [SEARCH] Found 1323 messages matching 'ba' in local DB
[21:20:05] [SEARCH] Found 1186 messages matching 'bab' in local DB
[21:20:05] [SEARCH] Found 1160 messages matching 'baby' in local DB
[21:20:11] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:20:12] [SEARCH] 🔍 User selected search result: id=17024, text='I'm baby. Always and forever.', sender='Laurent'
[21:20:12] [SEARCH] 🔍 scrollToMessage called for id=17024, chatRows.count=51, allMessages.count=50, totalInDB=7229
[21:20:12] [SEARCH] ⚠️ Message 17024 NOT in chatRows (range: 18418...18467), need to load more
[21:20:12] [SEARCH] 📅 countMessagesNewerThan(17024): found date='2026-01-07 13:38:16', newerCount=1424
[21:20:12] [SEARCH] 📊 countMessagesNewerThan(17024) = 1424
[21:20:12] [SEARCH] 📥 Loading window: offset=1174, limit=500 (target at position 1424, window centered)
[21:20:12] [SEARCH] 📥 Loaded 500 messages from DB
[21:20:12] [SEARCH] 📊 Loaded messages range: 16772...17281, contains target 17024: true
[21:20:12] [SEARCH] 🔄 Calling reloadMessagesForCurrentTabImmediate()
[21:20:12] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=500, first5Ids=[16772, 16773, 16774, 16775, 16776]
[21:20:12] [CELL_UPLOAD] configure: msgId=16820, file=6565ecbb6910bf4f.png, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:12] [CELL_UPLOAD] → not my message, setting complete
[21:20:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=6565ecbb6910bf4f.png, overlayExists=true
[21:20:12] [SEARCH] 📊 After reload: chatRows.count=505, range: 16772...17281, contains target 17024: true
[21:20:12] DOWNLOADIIING a34d2d1c8f83c2b1.heic
[21:20:12] [SEARCH] 🎯 tryScrollToMessage called for id=17024, chatRows.count=505
[21:20:12] [SEARCH] ✅ Message 17024 found at index 252, scrolling and flashing
[21:20:12] [SCROLL_BTN] Showing button - 42389pt from bottom > half 379pt
[21:20:12] [CELL_UPLOAD] configure: msgId=16844, file=9b6e2713b28af39a.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:12] [CELL_UPLOAD] → not my message, setting complete
[21:20:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=9b6e2713b28af39a.jpg, overlayExists=true
[21:20:12] [CELL_UPLOAD] configure: msgId=16857, file=ead633e346aa0c73.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:20:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=ead633e346aa0c73.jpg, overlayExists=true
[21:20:12] [CELL_UPLOAD] configure: msgId=16884, file=fdff61a88946fa79.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:12] [CELL_UPLOAD] → not my message, setting complete
[21:20:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=fdff61a88946fa79.jpg, overlayExists=true
[21:20:12] [CELL_UPLOAD] configure: msgId=16896, file=3c69c97b523bfd64.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:20:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=3c69c97b523bfd64.heic, overlayExists=true
[21:20:12] [CELL_UPLOAD] configure: msgId=16897, file=b90532bd878a7744.jpeg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:20:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=b90532bd878a7744.jpeg, overlayExists=true
[21:20:12] [CELL_UPLOAD] configure: msgId=16898, file=7f0707ca4702593c.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:20:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7f0707ca4702593c.heic, overlayExists=true
[21:20:12] [CELL_UPLOAD] configure: msgId=16899, file=0717d94d73fea9f6.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:20:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=0717d94d73fea9f6.heic, overlayExists=true
[21:20:12] [CELL_UPLOAD] configure: msgId=16927, file=f31b32fbea8fc733.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:20:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f31b32fbea8fc733.jpg, overlayExists=true
[21:20:12] [CELL_UPLOAD] configure: msgId=16929, file=28d2f39e0231707c.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:12] [CELL_UPLOAD] → not my message, setting complete
[21:20:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=28d2f39e0231707c.jpg, overlayExists=true
[21:20:12] [CELL_UPLOAD] configure: msgId=16935, file=f5e969ce94755222.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:20:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f5e969ce94755222.jpg, overlayExists=true
[21:20:12] [CELL_UPLOAD] configure: msgId=17022, file=439ac128bb1ced2c.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:20:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=439ac128bb1ced2c.jpg, overlayExists=true
[21:20:14] [CELL_UPLOAD] configure: msgId=17022, file=439ac128bb1ced2c.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:14] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:20:14] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=439ac128bb1ced2c.jpg, overlayExists=true
[21:20:14] [CELL_UPLOAD] configure: msgId=17280, file=db07fc4f87fa5041.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:14] [CELL_UPLOAD] → not my message, setting complete
[21:20:14] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=db07fc4f87fa5041.jpg, overlayExists=true
[21:20:14] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[17231, 17232, 17233, 17234, 17235]
[21:20:14] [CELL_UPLOAD] configure: msgId=17280, file=db07fc4f87fa5041.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:14] [CELL_UPLOAD] → not my message, setting complete
[21:20:14] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=db07fc4f87fa5041.jpg, overlayExists=true
[21:20:15] [MENU] dismissAnyExistingMenu called
[21:20:15] [MENU] dismissAnyExistingMenu completed
[21:20:37] [MENU] dismissAnyExistingMenu called
[21:20:37] [MENU] dismissAnyExistingMenu completed
[21:20:38] [SCROLL_BTN] Showing button - 316pt from bottom > half 223pt
[21:20:41] [MENU] dismissAnyExistingMenu called
[21:20:41] [MENU] dismissAnyExistingMenu completed
[21:20:41] [REFRESH_ALL] 🔄 refreshAllFromServer called from: editMessage, currentMsgCount=50
[21:20:41] [REFRESH_ALL] 📸 Captured 50 message IDs before request
[21:20:41] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:20:42] [MENU] dismissAnyExistingMenu called
[21:20:42] [MENU] dismissAnyExistingMenu completed
[21:20:42] [PENDING_UPLOAD] Total pending upload messages: 0
[21:20:42] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[21:20:42] [TIMER] Preserving 4 played timer IDs before DB refresh
[21:20:42] [TIMER] Restored 4 played timer flags after DB refresh
[21:20:42] [SCROLL_BTN] Showing button - 385pt from bottom > half 379pt
[21:20:42] [GIF] configure msgId=17266 file=giphy:https://media1.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZWJ5Z2V5NHR4ZTZ5OXAxbDl3dzR3bWt0b2h2NTRrdWI3Y281emFrMSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/iVddRfGnwPd4TnZFpo/giphy.gif msgChanged=true owner=false animating=false completed=false
[21:20:42] [GIF] msgId=17266 START fresh animation
[21:20:42] [CELL_UPLOAD] configure: msgId=17266, file=giphy:https://media1.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZWJ5Z2V5NHR4ZTZ5OXAxbDl3dzR3bWt0b2h2NTRrdWI3Y281emFrMSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/iVddRfGnwPd4TnZFpo/giphy.gif, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=true, uploadStatus=0
[21:20:42] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:20:42] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media1.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZWJ5Z2V5NHR4ZTZ5OXAxbDl3dzR3bWt0b2h2NTRrdWI3Y281emFrMSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/iVddRfGnwPd4TnZFpo/giphy.gif, overlayExists=true
[21:20:42] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[21:20:42] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[21:20:42] [MENU] dismissAnyExistingMenu called
[21:20:42] [MENU] dismissAnyExistingMenu completed
[21:20:42] [CELL_UPLOAD] configure: msgId=17280, file=db07fc4f87fa5041.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:20:42] [CELL_UPLOAD] → not my message, setting complete
[21:20:42] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=db07fc4f87fa5041.jpg, overlayExists=true
[21:20:42] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[21:20:42] DOWNLOADIIING t_bae538c2a3076c11.jpg
[21:20:42] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[21:20:42] DOWNLOADIIING t_5cfd84d52271d308.jpg
[21:20:42] DOWNLOADIIING t_919f4df51be24b2c.jpg
[21:20:42] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[21:20:42] DOWNLOADIIING t_32675c319a37fee7.jpg
[21:20:42] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[21:20:42] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[21:20:42] DOWNLOADIIING t_abb65f630e55dc61.jpg
[21:20:42] DOWNLOADIIING t_2a4c7380908d6595.jpg
[21:20:42] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[21:20:42] DOWNLOADIIING t_02f48c94671cc64e.jpg
[21:20:42] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[21:20:42] DOWNLOADIIING t_364b0669ed2f3378.jpg
[21:20:42] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[21:20:42] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[21:20:42] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[21:20:42] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[21:20:42] DOWNLOADIIING t_722d39e0d91dd954.jpg
[21:20:43] DOWNLOADIIING t_97828ef5de49a612.jpg
[21:20:43] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[21:20:43] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7233
[21:20:43] [REFRESH_ALL] 📊 Server returned 7233 messages
[21:20:43] [REFRESH_ALL] 📊 Final merge: server=7233, preserved=0, total=7233
[21:20:43] [REFRESH_ALL] 📊 Displaying 50 of 7233 messages, hasMore=true
[21:20:43] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18418, 18419, 18420, 18421, 18422]
[21:20:44] [MENU] dismissAnyExistingMenu called
[21:20:44] [MENU] dismissAnyExistingMenu completed
[21:20:46] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[21:20:46] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18418, 18419, 18420, 18421, 18422]
[21:20:48] [SCROLL_BTN] Showing button - 310pt from bottom > half 223pt
[21:20:51] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:20:53] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:20:53] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=50, isReloading=false
[21:20:53] [SEND_MESSAGE] ✅ Added optimistic message id=-1 to arrays, newMsgCount=51
[21:20:53] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[-1, 18467, 18466, 18465, 18464]
[21:20:53] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:20:53] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:20:54] [CLIENT_SIG] Event received: type=0 messageId=18468
[21:20:54] [WS_EVENT] Received event: type=0, messageId=18468
[21:20:54] [WS_EVENT] 📨 New message notification (msgId=18468) - triggering incremental refresh, currentMsgCount=51
[21:20:54] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[21:20:54] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18467
[21:20:54] [PUSH] Silent push received
[21:20:54] [PUSH_EMBED] 📩 Received embedded message: id=18468, type=0, sender=Esra
[21:20:54] [PUSH_EMBED] ✅ Saved message 18468 to local DB (sync)
[21:20:54] [PUSH_EMBED] Inserted message 18468 into existing cache (now 51 messages)
[21:20:54] [PUSH_EMBED] Fetching evolution data for message 18468 in background
[21:20:54] [PUSH_EMBED] ✅ Fully processed message 18468
[21:20:54] [PUSH] Embedded message handled instantly from silent push
[21:20:54] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[21:20:54] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[21:20:54] [PUSH_UI] Inserted message 18468 into UI (now 52 messages)
[21:20:54] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18468, AnyHashable("operation_type"): 0, AnyHashable("message_data"): {
    datesent = "2026-01-21 20:20:52";
    "file_name" = "";
    message = "If you dont, then you will do morning, in that case you have to remain 15mins.";
    "message_id" = 18468;
    "message_type" = 0;
    "prev_session_message_id" = 18467;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("session_id"): ILUIWU]
[21:20:54] [PUSH_EMBED_VC] Message 18468 already in memory - skipping
[21:20:54] [PUSH] ⚡ Embedded message handled directly in ViewController
[21:20:54] [PUSH] Parsed message_id: 18468
[21:20:54] [PUSH] Parsed operation_type: 0
[21:20:54] [PUSH] Taking direct action: opType=0, messageId=18468
[21:20:54] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18468
[21:20:54] [PUSH] ⚡ Message 18468 already in memory - skipping duplicate notification entirely
[21:20:54] [PUSH_EMBED] Got evolution data for message 18468, saving to local DB
[21:20:54] [PUSH_EMBED] Saved evolution data for message 18468
[21:20:54] [INCREMENTAL_SYNC] ✅ Found 2 new messages
[21:20:54] [INCREMENTAL_SYNC] Replaced optimistic message (id=-1) with server message (id=18469)
[21:20:54] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=2
[21:20:54] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:20:54] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=52
[21:20:54] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[18418, 18419, 18420, 18421, 18422]
[21:20:54] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18467 → 18468
[21:20:56] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18469,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:20:53"}
[21:20:56] [CLIENT_SIG] Event received: type=0 messageId=18469
[21:20:56] [WS_EVENT] Received event: type=0, messageId=18469
[21:20:56] [WS_EVENT] 📨 New message notification (msgId=18469) - triggering incremental refresh, currentMsgCount=52
[21:20:56] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=52
[21:20:56] [CHAT] receive_message.php JSON: ["session_id": ILUIWU, "ok": 1, "message_type": 0, "file_name": , "datesent_utc": 2026-01-21 20:20:53, "message_id": 18469]
[21:20:56] [DB_UPGRADE] Upgrading message ID: -1 → 18469, preserveOriginalDate=false
[21:20:56] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18469
[21:20:56] [DB_UPGRADE] ⚠️ No rows affected - message -1 not found in DB
[21:20:56] [SEND_UPGRADE] ⚠️ Server ID 18469 already exists - removing provisional entry -1
[21:20:56] ReloadData 9
[21:20:56] [INCREMENTAL_SYNC] ✅ No new messages
[21:20:56] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=52
[21:20:58] [PUSH] Silent push received
[21:20:58] [PUSH_EMBED] No embedded message_data in notification
[21:20:58] [PUSH] No embedded data, pre-loading messages from server
[21:20:58] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:20:58] [PUSH] Silent push received
[21:20:58] [PUSH_EMBED] No embedded message_data in notification
[21:20:58] [PUSH] No embedded data, pre-loading messages from server
[21:20:58] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:20:58] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:20:58] [PRELOAD_CACHE] Preserving 2 push-inserted messages: [18419, 18418]
[21:20:58] [PUSH_PRELOAD] ⚡ Pre-cached 52 messages for instant display (preserved 2 from push)
[21:20:58] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:20:58] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18468, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3]
[21:20:58] [PUSH] Parsed message_id: 18468
[21:20:58] [PUSH] Parsed operation_type: 3
[21:20:58] [PUSH] Taking direct action: opType=3, messageId=18468
[21:20:58] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18468
[21:20:58] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:20:58] [PRELOAD_CACHE] Preserving 2 push-inserted messages: [18419, 18418]
[21:20:58] [PUSH_PRELOAD] ⚡ Pre-cached 52 messages for instant display (preserved 2 from push)
[21:20:58] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:20:58] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18469, AnyHashable("session_id"): ILUIWU]
[21:20:58] [PUSH] Parsed message_id: 18469
[21:20:58] [PUSH] Parsed operation_type: 3
[21:20:58] [PUSH] Taking direct action: opType=3, messageId=18469
[21:20:58] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18469
[21:20:59] [CLIENT_SIG] Event received: type=3 messageId=18468
[21:20:59] [WS_EVENT] Received event: type=3, messageId=18468
[21:20:59] [WS_EVENT] Read receipt for message 18468 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:20:59] [CLIENT_SIG] Event received: type=3 messageId=18469
[21:20:59] [WS_EVENT] Received event: type=3, messageId=18469
[21:20:59] [WS_EVENT] Read receipt for message 18469 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:21:05] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:21:05] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=52, isReloading=false
[21:21:05] [SEND_MESSAGE] ✅ Added optimistic message id=-2 to arrays, newMsgCount=53
[21:21:05] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[-2, 18469, 18468, 18467, 18466]
[21:21:05] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:21:05] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:21:07] [CLIENT_SIG] Event received: type=0 messageId=18470
[21:21:07] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18470,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:21:05"}
[21:21:07] [WS_EVENT] Received event: type=0, messageId=18470
[21:21:07] [WS_EVENT] 📨 New message notification (msgId=18470) - triggering incremental refresh, currentMsgCount=53
[21:21:07] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=53
[21:21:07] [CHAT] receive_message.php JSON: ["message_type": 0, "message_id": 18470, "session_id": ILUIWU, "file_name": , "ok": 1, "datesent_utc": 2026-01-21 20:21:05]
[21:21:07] [DB_UPGRADE] Upgrading message ID: -2 → 18470, preserveOriginalDate=false
[21:21:07] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18469
[21:21:07] [DB_UPGRADE] ✅ Upgraded -2 → 18470 with send_status=0, 1 row(s) affected
[21:21:07] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -2 → 18470
[21:21:07] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -2 → 18470
[21:21:07] ReloadData 9
[21:21:07] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:21:07] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:21:07] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=53
[21:21:07] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[18418, 18419, 18420, 18421, 18422]
[21:21:10] [PUSH] Silent push received
[21:21:10] [PUSH_EMBED] No embedded message_data in notification
[21:21:10] [PUSH] No embedded data, pre-loading messages from server
[21:21:10] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:21:10] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:21:10] [PRELOAD_CACHE] Preserving 3 push-inserted messages: [18420, 18419, 18418]
[21:21:10] [PUSH_PRELOAD] ⚡ Pre-cached 53 messages for instant display (preserved 3 from push)
[21:21:10] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:21:10] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18470, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU]
[21:21:10] [PUSH] Parsed message_id: 18470
[21:21:10] [PUSH] Parsed operation_type: 3
[21:21:10] [PUSH] Taking direct action: opType=3, messageId=18470
[21:21:10] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18470
[21:21:11] [MENU] dismissAnyExistingMenu called
[21:21:11] [MENU] dismissAnyExistingMenu completed
[21:21:11] [EMOJI_PICKER] Starting emoji picker for message 18468
[21:21:11] [MENU] Created button 'Reply' at index 0
[21:21:11] [MENU] Created button 'Copy' at index 1
[21:21:11] [MENU] Created button 'Delete' at index 2
[21:21:11] [MENU] Menu added at y=504.5
[21:21:11] [CLIENT_SIG] Event received: type=3 messageId=18470
[21:21:11] [WS_EVENT] Received event: type=3, messageId=18470
[21:21:11] [WS_EVENT] Read receipt for message 18470 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:21:11] [EMOJI_PICKER] ✅ Fetched 6 recent emojis
[21:21:11] [EMOJI_PICKER] ✅ Creating picker with 6 recent emojis
[21:21:11] [EMOJI_PICKER] ✅ Picker shown at y=371.5
[21:21:11] [MENU] dismissMenu gesture triggered - tap on blur view
[21:21:11] [MENU] Dismissing menu (tap was on blur, outside menu area)
[21:21:12] [SCROLL_BTN] Showing button - 310pt from bottom > half 223pt
[21:21:26] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:21:26] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=53, isReloading=false
[21:21:26] [SEND_MESSAGE] ✅ Added optimistic message id=-3 to arrays, newMsgCount=54
[21:21:26] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[-3, 18470, 18469, 18468, 18467]
[21:21:26] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:21:26] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:21:28] [CLIENT_SIG] Event received: type=0 messageId=18471
[21:21:28] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18471,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:21:26"}
[21:21:28] [WS_EVENT] Received event: type=0, messageId=18471
[21:21:28] [WS_EVENT] 📨 New message notification (msgId=18471) - triggering incremental refresh, currentMsgCount=54
[21:21:28] [CHAT] receive_message.php JSON: ["file_name": , "message_type": 0, "session_id": ILUIWU, "message_id": 18471, "datesent_utc": 2026-01-21 20:21:26, "ok": 1]
[21:21:28] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=54
[21:21:28] [DB_UPGRADE] Upgrading message ID: -3 → 18471, preserveOriginalDate=false
[21:21:28] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18470
[21:21:28] [DB_UPGRADE] ✅ Upgraded -3 → 18471 with send_status=0, 1 row(s) affected
[21:21:28] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -3 → 18471
[21:21:28] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -3 → 18471
[21:21:28] ReloadData 9
[21:21:28] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:21:28] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:21:28] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=54
[21:21:29] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=54, first5Ids=[18418, 18419, 18420, 18421, 18422]
[21:21:31] [PUSH] Silent push received
[21:21:31] [PUSH_EMBED] No embedded message_data in notification
[21:21:31] [PUSH] No embedded data, pre-loading messages from server
[21:21:31] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:21:31] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:21:31] [PRELOAD_CACHE] Preserving 4 push-inserted messages: [18421, 18420, 18419, 18418]
[21:21:31] [PUSH_PRELOAD] ⚡ Pre-cached 54 messages for instant display (preserved 4 from push)
[21:21:31] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:21:31] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18471, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU]
[21:21:31] [PUSH] Parsed message_id: 18471
[21:21:31] [PUSH] Parsed operation_type: 3
[21:21:31] [PUSH] Taking direct action: opType=3, messageId=18471
[21:21:31] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18471
[21:21:32] [CLIENT_SIG] Event received: type=3 messageId=18471
[21:21:32] [WS_EVENT] Received event: type=3, messageId=18471
[21:21:32] [WS_EVENT] Read receipt for message 18471 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:21:37] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:21:46] [MENU] dismissAnyExistingMenu called
[21:21:46] [MENU] dismissAnyExistingMenu completed
[21:21:47] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:21:47] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:21:47] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:21:48] [SCROLL_BTN] Showing button - 310pt from bottom > half 223pt
[21:21:49] [SEARCH] Found 2479 messages matching 'b' in local DB
[21:21:50] [SEARCH] Found 1324 messages matching 'ba' in local DB
[21:21:50] [CLIENT_SIG] Event received: type=0 messageId=18472
[21:21:50] [WS_EVENT] Received event: type=0, messageId=18472
[21:21:50] [WS_EVENT] 📨 New message notification (msgId=18472) - triggering incremental refresh, currentMsgCount=54
[21:21:50] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=54
[21:21:50] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18471
[21:21:50] [PUSH] Silent push received
[21:21:50] [PUSH_EMBED] 📩 Received embedded message: id=18472, type=0, sender=Esra
[21:21:50] [PUSH_EMBED] ✅ Saved message 18472 to local DB (sync)
[21:21:50] [PUSH_EMBED] Inserted message 18472 into existing cache (now 55 messages)
[21:21:50] [PUSH_EMBED] Fetching evolution data for message 18472 in background
[21:21:50] [PUSH_EMBED] ✅ Fully processed message 18472
[21:21:50] [PUSH] Embedded message handled instantly from silent push
[21:21:50] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[21:21:50] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[21:21:50] [PUSH_UI] Inserted message 18472 into UI (now 55 messages)
[21:21:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 0, AnyHashable("message_id"): 18472, AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 20:21:48";
    "file_name" = "";
    message = "Please baby\Ud83d\Ude0f\Ud83d\Ude0f";
    "message_id" = 18472;
    "message_type" = 0;
    "prev_session_message_id" = 18471;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}]
[21:21:50] [PUSH_EMBED_VC] Message 18472 already in memory - skipping
[21:21:50] [PUSH] ⚡ Embedded message handled directly in ViewController
[21:21:50] [PUSH] Parsed message_id: 18472
[21:21:50] [PUSH] Parsed operation_type: 0
[21:21:50] [PUSH] Taking direct action: opType=0, messageId=18472
[21:21:50] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18472
[21:21:50] [PUSH] ⚡ Message 18472 already in memory - skipping duplicate notification entirely
[21:21:50] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:21:50] [SEARCH] Found 1188 messages matching 'bab' in local DB
[21:21:50] [PUSH_EMBED] Got evolution data for message 18472, saving to local DB
[21:21:50] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:21:50] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:21:50] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=55
[21:21:50] [PUSH_EMBED] Saved evolution data for message 18472
[21:21:50] [SEARCH] Found 1162 messages matching 'baby' in local DB
[21:21:50] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=55, first5Ids=[18418, 18419, 18420, 18421, 18422]
[21:21:50] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18471 → 18472
[21:21:51] [MENU] dismissAnyExistingMenu called
[21:21:51] [MENU] dismissAnyExistingMenu completed
[21:21:53] [PUSH] Silent push received
[21:21:53] [PUSH_EMBED] No embedded message_data in notification
[21:21:53] [PUSH] No embedded data, pre-loading messages from server
[21:21:53] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:21:53] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:21:53] [PRELOAD_CACHE] Preserving 5 push-inserted messages: [18422, 18421, 18420, 18419, 18418]
[21:21:53] [PUSH_PRELOAD] ⚡ Pre-cached 55 messages for instant display (preserved 5 from push)
[21:21:53] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:21:53] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18472, AnyHashable("session_id"): ILUIWU]
[21:21:53] [PUSH] Parsed message_id: 18472
[21:21:53] [PUSH] Parsed operation_type: 3
[21:21:53] [PUSH] Taking direct action: opType=3, messageId=18472
[21:21:53] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18472
[21:21:53] [CLIENT_SIG] Event received: type=3 messageId=18472
[21:21:53] [WS_EVENT] Received event: type=3, messageId=18472
[21:21:53] [WS_EVENT] Read receipt for message 18472 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:21:56] [MENU] dismissAnyExistingMenu called
[21:21:56] [MENU] dismissAnyExistingMenu completed
[21:21:59] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)[21:22:08] [LOG] Pruned 24 entries older than 3 hours
[21:22:08] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:22:08] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:22:08] [GIPHY] SDK not available - using REST API fallback
[21:22:08] [BACKGROUND] Background fetch enabled
[21:22:08] [AUTH] Starting PIN authentication
[21:22:08] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:22:08] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:22:08] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[21:22:08] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:22:08] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:22:08] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:22:08] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:22:08] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:22:08] [USER] ✅ User registered successfully
[21:22:08] [PUSH] User registration after token update: success
[21:22:08] [CLIENT_SIG] WebSocket opened
[21:22:08] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:22:08] [CLIENT_SIG] Connected! clientId=kgC5gIzTJM_C0PY5
[21:22:08] [CLIENT_SIG] Received 2 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:22:08] [CLIENT_SIG]   - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:22:08] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:22:08] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18472)...
[21:22:08] [PRELOAD] No messages or parse error[21:22:10] [LOG] Pruned 120 entries older than 3 hours
[21:22:10] [SECURITY] Restored real session: ILUIWU
[21:22:10] [SECURITY] Restored real session: ILUIWU
[21:22:10] [SECURITY] Saved real session: ILUIWU
[21:22:10] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:22:10] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:22:10] Documents Directory: /var/mobile/Containers/Data/Application/F776C3C0-01D6-435D-9177-CBEB18C3217C/Documents
[21:22:10] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:22:10] [THEME] Applying current theme
[21:22:10] [CHAT] Applied day theme (mode: day)
[21:22:10] [SECURITY] Saved real session: ILUIWU
[21:22:10] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:22:10] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:22:10] [NETWORK] Network monitor started
[21:22:10] [NETWORK] Status changed: connected
[21:22:10] Did transition
[21:22:10] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:22:10] [VIEWER] Screen lock enabled - normal idle behavior
[21:22:10] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:22:10] [VCC] ========== VideoConnectionClass INIT ==========
[21:22:10] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:22:10] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:22:10] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:22:10] [DATA AUDIO] Creating encoder/decoder factories...
[21:22:10] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:22:10] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:22:10] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:22:10] [DATA AUDIO] ✅ Factory created
[21:22:10] [DATA AUDIO] RTCAudioSession locked
[21:22:10] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:22:10] [DATA AUDIO] RTCAudioSession unlocked
[21:22:10] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:22:10] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:22:10] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:22:10] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:22:10] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:22:10] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:22:10] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:22:10] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:22:10] Did transition
[21:22:10] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:22:10] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:22:10] [CHUNK] Merged 879 reactions synchronously
[21:22:10] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:22:10] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:22:10] [MIGRATION] No messages need sender_name backfill
[21:22:10] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:22:10] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:22:10] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:22:10] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:22:10] [USER] ✅ User registered successfully
[21:22:10] [USER] User registration successful
[21:22:10] [GALLERY_DB] ✅ Loaded 477 media messages
[21:22:10] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18472
[21:22:10] [INCREMENTAL_SYNC] ✅ No new messages
[21:22:10] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:22:10] [GALLERY] First 5 after sort (newest first):
[21:22:10] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:22:10] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:22:10] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:22:10] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:22:10] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:22:10] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:22:10] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18423, 18424, 18425, 18426, 18427]
[21:22:10] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:22:10] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:22:10] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:22:10] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:22:10] [SERVER] Starting reconnect polling (5s interval)
[21:22:10] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:22:10] [ICONS] Offset applied: -14.6
[21:22:10] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:22:10] [ICONS] Chat center: (31.2, 87.0)
[21:22:10] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:22:10] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:22:10] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:22:10] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:22:10] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:22:10] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:22:10] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:22:10] [ICONS] Screen width: 440.0
[21:22:10] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:22:10] [UNSENT_RETRY] Checking for unsent messages...
[21:22:10] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:22:10] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:22:10] [UPLOAD_RECOVERY] Session: ILUIWU
[21:22:10] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:22:10] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:22:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:22:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:22:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:22:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:22:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:22:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:22:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:22:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:22:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:22:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:22:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18276, file=a9dc1013e9d5a3e6.jpg, upload_status=complete
[21:22:10] [UPLOAD_RECOVERY] Verifying 11 media files exist on server...
[21:22:10] [PENDING_UPLOAD] Total pending upload messages: 0
[21:22:10] [UNSENT_RETRY] No unsent messages found
[21:22:10] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:22:10] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:22:10] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:22:10] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:22:10] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:22:10] new_session POST ok: token len=157
[21:22:10] HELLO → sent (fetched token, role=query)
[21:22:10] [SIG] hello_ok received for query connection - ready to query agents
[21:22:10] [SIG] get_agents request sent for sessionId=ILUIWU
[21:22:10] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:22:10] [SERVER] Stopped reconnect polling
[21:22:10] [SIG] agents_list received: []
[21:22:10] [SIG] agents_list received: []
[21:22:11] [COMBINED_FETCH] Loaded 7238 read receipts, 879 messages with reactions
[21:22:11] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:22:11] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18423, 18424, 18425, 18426, 18427]
[21:22:11] [MENU] dismissAnyExistingMenu called
[21:22:11] [MENU] dismissAnyExistingMenu completed
[21:22:12] [SEARCH] Found 2480 messages matching 'b' in local DB
[21:22:13] [SEARCH] Found 1325 messages matching 'ba' in local DB
[21:22:13] [SEARCH] Found 1188 messages matching 'bab' in local DB
[21:22:13] [SEARCH] Found 1162 messages matching 'baby' in local DB
[21:22:18] [SEARCH] 🔍 User selected search result: id=16389, text='Hello, sorry for my silence baby. We had dinner wi', sender='Esra'
[21:22:18] [SEARCH] 🔍 scrollToMessage called for id=16389, chatRows.count=51, allMessages.count=50, totalInDB=7234
[21:22:18] [SEARCH] ⚠️ Message 16389 NOT in chatRows (range: 18423...18472), need to load more
[21:22:18] [SEARCH] 📅 countMessagesNewerThan(16389): found date='2025-12-23 19:54:05', newerCount=2046
[21:22:18] [SEARCH] 📊 countMessagesNewerThan(16389) = 2046
[21:22:18] [SEARCH] 📥 Loading window: offset=1796, limit=500 (target at position 2046, window centered)
[21:22:18] [SEARCH] 📥 Loaded 500 messages from DB
[21:22:18] [SEARCH] 📊 Loaded messages range: 16136...16646, contains target 16389: true
[21:22:18] [SEARCH] 🔄 Calling reloadMessagesForCurrentTabImmediate()
[21:22:18] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=500, first5Ids=[16136, 16137, 16138, 16139, 16140]
[21:22:18] [CELL_UPLOAD] configure: msgId=16185, file=c495501efe348b60.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:22:18] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:22:18] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=c495501efe348b60.jpg, overlayExists=true
[21:22:18] [CELL_UPLOAD] configure: msgId=16188, file=268ec35ef086ceaa.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:22:18] [CELL_UPLOAD] → not my message, setting complete
[21:22:18] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=268ec35ef086ceaa.jpg, overlayExists=true
[21:22:18] [SEARCH] 📊 After reload: chatRows.count=514, range: 16136...16646, contains target 16389: true
[21:22:18] DOWNLOADIIING 647896418f5c016a.jpg
[21:22:18] [SEARCH] 🎯 tryScrollToMessage called for id=16389, chatRows.count=514
[21:22:18] [SEARCH] ✅ Message 16389 found at index 254, scrolling and flashing
[21:22:18] [SCROLL_BTN] Showing button - 51697pt from bottom > half 379pt
[21:22:18] [CELL_UPLOAD] configure: msgId=16192, file=6a558e921cc3a4ea.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:22:18] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:22:18] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=6a558e921cc3a4ea.jpg, overlayExists=true
[21:22:18] [CELL_UPLOAD] configure: msgId=16213, file=440097b3eaf3df08.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:22:18] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:22:18] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=440097b3eaf3df08.heic, overlayExists=true
[21:22:18] [CELL_UPLOAD] configure: msgId=16214, file=2f375f3b72ae18cd.jpeg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:22:18] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:22:18] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=2f375f3b72ae18cd.jpeg, overlayExists=true
[21:22:18] [CELL_UPLOAD] configure: msgId=16252, file=8c6dad23c19f69d6.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:22:18] [CELL_UPLOAD] → not my message, setting complete
[21:22:18] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=8c6dad23c19f69d6.jpg, overlayExists=true
[21:22:18] [CELL_UPLOAD] configure: msgId=16383, file=ef341fc8d6bd778f.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:22:18] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:22:18] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=ef341fc8d6bd778f.heic, overlayExists=true
[21:22:18] [CELL_UPLOAD] configure: msgId=16384, file=ec3ba70fa71dbb83.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:22:18] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:22:18] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=ec3ba70fa71dbb83.heic, overlayExists=true
[21:22:18] [CELL_UPLOAD] configure: msgId=16385, file=608268d29c8a276e.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:22:18] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:22:18] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=608268d29c8a276e.heic, overlayExists=true
[21:22:18] [CELL_UPLOAD] configure: msgId=16386, file=6816e036dc9ffbe7.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:22:18] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:22:18] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=6816e036dc9ffbe7.heic, overlayExists=true
[21:22:18] [CELL_UPLOAD] configure: msgId=16387, file=8605d977daf39847.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:22:18] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:22:18] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=8605d977daf39847.heic, overlayExists=true
[21:22:20] [CELL_UPLOAD] configure: msgId=16387, file=8605d977daf39847.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:22:20] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:22:20] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=8605d977daf39847.heic, overlayExists=true
[21:22:20] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:22:20] [PUSH] Silent push received
[21:22:20] [PUSH_EMBED] No embedded message_data in notification
[21:22:20] [PUSH] No embedded data, pre-loading messages from server
[21:22:20] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:22:20] [PUSH] Silent push received
[21:22:20] [PUSH_EMBED] No embedded message_data in notification
[21:22:20] [PUSH] No embedded data, pre-loading messages from server
[21:22:20] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:22:20] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[16596, 16597, 16598, 16599, 16600]
[21:22:20] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:22:20] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:22:20] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:22:20] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:22:20] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 16245, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU]
[21:22:20] [PUSH] Parsed message_id: 16245
[21:22:20] [PUSH] Parsed operation_type: 3
[21:22:20] [PUSH] Taking direct action: opType=3, messageId=16245
[21:22:20] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=16245
[21:22:20] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:22:20] [CLIENT_SIG] Event received: type=3 messageId=16245
[21:22:20] [WS_EVENT] Received event: type=3, messageId=16245
[21:22:20] [WS_EVENT] Read receipt for message 16245 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:22:20] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:22:20] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:22:20] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 16188, AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3]
[21:22:20] [PUSH] Parsed message_id: 16188
[21:22:20] [PUSH] Parsed operation_type: 3
[21:22:20] [PUSH] Taking direct action: opType=3, messageId=16188
[21:22:20] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=16188
[21:22:20] [CLIENT_SIG] Event received: type=3 messageId=16188
[21:22:20] [WS_EVENT] Received event: type=3, messageId=16188
[21:22:20] [WS_EVENT] Read receipt for message 16188 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:22:26] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:22:27] [CLIENT_SIG] Event received: type=0 messageId=18473
[21:22:27] [WS_EVENT] Received event: type=0, messageId=18473
[21:22:27] [WS_EVENT] 📨 New message notification (msgId=18473) - triggering incremental refresh, currentMsgCount=50
[21:22:27] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:22:27] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18472
[21:22:27] [PUSH] Silent push received
[21:22:27] [PUSH_EMBED] 📩 Received embedded message: id=18473, type=0, sender=Esra
[21:22:27] [PUSH_EMBED] ✅ Saved message 18473 to local DB (sync)
[21:22:27] [PUSH_EMBED] Inserted message 18473 into existing cache (now 51 messages)
[21:22:27] [PUSH_EMBED] Fetching evolution data for message 18473 in background
[21:22:27] [PUSH_EMBED] ✅ Fully processed message 18473
[21:22:27] [PUSH] Embedded message handled instantly from silent push
[21:22:27] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[21:22:27] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[21:22:27] [PUSH_UI] Inserted message 18473 into UI (now 51 messages)
[21:22:27] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 18473, AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 20:22:26";
    "file_name" = "";
    message = "Probably I\U2019ll read all morning \Ud83e\Udd2d";
    "message_id" = 18473;
    "message_type" = 0;
    "prev_session_message_id" = 18472;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("operation_type"): 0]
[21:22:27] [PUSH_EMBED_VC] Message 18473 already in memory - skipping
[21:22:27] [PUSH] ⚡ Embedded message handled directly in ViewController
[21:22:27] [PUSH] Parsed message_id: 18473
[21:22:27] [PUSH] Parsed operation_type: 0
[21:22:27] [PUSH] Taking direct action: opType=0, messageId=18473
[21:22:27] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18473
[21:22:27] [PUSH] ⚡ Message 18473 already in memory - skipping duplicate notification entirely
[21:22:27] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:22:27] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:22:27] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:22:27] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=51
[21:22:27] [PUSH_EMBED] Got evolution data for message 18473, saving to local DB
[21:22:27] [PUSH_EMBED] Saved evolution data for message 18473
[21:22:28] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[16596, 16597, 16598, 16599, 16600]
[21:22:28] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:22:43] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:22:43] [CLIENT_SIG] Typing start from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:22:44] [CLIENT_SIG] Event received: type=0 messageId=18474
[21:22:44] [WS_EVENT] Received event: type=0, messageId=18474
[21:22:44] [WS_EVENT] 📨 New message notification (msgId=18474) - triggering incremental refresh, currentMsgCount=51
[21:22:44] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[21:22:44] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18473
[21:22:44] [PUSH] Silent push received
[21:22:44] [PUSH_EMBED] 📩 Received embedded message: id=18474, type=0, sender=Esra
[21:22:44] [PUSH_EMBED] ✅ Saved message 18474 to local DB (sync)
[21:22:44] [PUSH_EMBED] Inserted message 18474 into existing cache (now 52 messages)
[21:22:44] [PUSH_EMBED] Fetching evolution data for message 18474 in background
[21:22:44] [PUSH_EMBED] ✅ Fully processed message 18474
[21:22:44] [PUSH] Embedded message handled instantly from silent push
[21:22:44] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[21:22:44] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[21:22:44] [PUSH_UI] Inserted message 18474 into UI (now 52 messages)
[21:22:44] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18474, AnyHashable("message_data"): {
    datesent = "2026-01-21 20:22:43";
    "file_name" = "";
    message = "Its 23:22 here, almost bedtime for me";
    "message_id" = 18474;
    "message_type" = 0;
    "prev_session_message_id" = 18473;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 0]
[21:22:44] [PUSH_EMBED_VC] Message 18474 already in memory - skipping
[21:22:44] [PUSH] ⚡ Embedded message handled directly in ViewController
[21:22:44] [PUSH] Parsed message_id: 18474
[21:22:44] [PUSH] Parsed operation_type: 0
[21:22:44] [PUSH] Taking direct action: opType=0, messageId=18474
[21:22:44] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18474
[21:22:44] [PUSH] ⚡ Message 18474 already in memory - skipping duplicate notification entirely
[21:22:44] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:22:44] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:22:44] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:22:44] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=52
[21:22:44] [PUSH_EMBED] Got evolution data for message 18474, saving to local DB
[21:22:44] [PUSH_EMBED] Saved evolution data for message 18474
[21:22:45] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=52, first5Ids=[16596, 16597, 16598, 16599, 16600]
[21:22:48] [MENU] dismissAnyExistingMenu called
[21:22:48] [MENU] dismissAnyExistingMenu completed
[21:22:48] [SCROLL_BTN] Showing button - 384pt from bottom > half 379pt
[21:22:48] [MENU] dismissAnyExistingMenu called
[21:22:48] [MENU] dismissAnyExistingMenu completed
[21:22:48] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18472 → 18473
[21:22:48] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18473 → 18474
[21:22:49] [CLIENT_SIG] Typing stop from: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:22:50] [PUSH] Silent push received
[21:22:50] [PUSH_EMBED] No embedded message_data in notification
[21:22:50] [PUSH] No embedded data, pre-loading messages from server
[21:22:50] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:22:50] [PUSH] Silent push received
[21:22:50] [PUSH_EMBED] No embedded message_data in notification
[21:22:50] [PUSH] No embedded data, pre-loading messages from server
[21:22:50] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:22:50] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:22:50] [PRELOAD_CACHE] Preserving 3 push-inserted messages: [18425, 18424, 18423]
[21:22:50] [PUSH_PRELOAD] ⚡ Pre-cached 53 messages for instant display (preserved 3 from push)
[21:22:50] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:22:50] [PRELOAD_CACHE] Preserving 3 push-inserted messages: [18425, 18424, 18423]
[21:22:50] [PUSH_PRELOAD] ⚡ Pre-cached 53 messages for instant display (preserved 3 from push)
[21:22:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:22:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18474]
[21:22:50] [PUSH] Parsed message_id: 18474
[21:22:50] [PUSH] Parsed operation_type: 3
[21:22:50] [PUSH] Taking direct action: opType=3, messageId=18474
[21:22:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18474
[21:22:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:22:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18473, AnyHashable("aps"): {
    "content-available" = 1;
}]
[21:22:50] [PUSH] Parsed message_id: 18473
[21:22:50] [PUSH] Parsed operation_type: 3
[21:22:50] [PUSH] Taking direct action: opType=3, messageId=18473
[21:22:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18473
[21:22:50] [CLIENT_SIG] Event received: type=3 messageId=18474
[21:22:50] [WS_EVENT] Received event: type=3, messageId=18474
[21:22:50] [WS_EVENT] Read receipt for message 18474 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:22:50] [CLIENT_SIG] Event received: type=3 messageId=18473
[21:22:50] [WS_EVENT] Received event: type=3, messageId=18473
[21:22:50] [WS_EVENT] Read receipt for message 18473 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:22:51] [CLIENT_SIG] Event received: type=0 messageId=18475
[21:22:51] [WS_EVENT] Received event: type=0, messageId=18475
[21:22:51] [WS_EVENT] 📨 New message notification (msgId=18475) - triggering incremental refresh, currentMsgCount=52
[21:22:51] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=52
[21:22:51] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18475
[21:22:51] [INCREMENTAL_SYNC] ✅ No new messages
[21:22:51] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=52
[21:22:51] [PUSH] Silent push received
[21:22:51] [PUSH_EMBED] 📩 Received embedded message: id=18475, type=0, sender=Esra
[21:22:51] [PUSH_EMBED] ✅ Saved message 18475 to local DB (sync)
[21:22:51] [PUSH_EMBED] Fetching evolution data for message 18475 in background
[21:22:51] [PUSH_EMBED] ✅ Fully processed message 18475
[21:22:51] [PUSH] Embedded message handled instantly from silent push
[21:22:51] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[21:22:51] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[21:22:51] [PUSH_UI] Inserted message 18475 into UI (now 53 messages)
[21:22:51] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("message_data"): {
    datesent = "2026-01-21 20:22:50";
    "file_name" = "";
    message = "And office tomorrow \Ud83e\Udd72";
    "message_id" = 18475;
    "message_type" = 0;
    "prev_session_message_id" = 18474;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}, AnyHashable("operation_type"): 0, AnyHashable("message_id"): 18475, AnyHashable("aps"): {
    "content-available" = 1;
}]
[21:22:51] [PUSH_EMBED_VC] Message 18475 already in memory - skipping
[21:22:51] [PUSH] ⚡ Embedded message handled directly in ViewController
[21:22:51] [PUSH] Parsed message_id: 18475
[21:22:51] [PUSH] Parsed operation_type: 0
[21:22:51] [PUSH] Taking direct action: opType=0, messageId=18475
[21:22:51] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18475
[21:22:51] [PUSH] ⚡ Message 18475 already in memory - skipping duplicate notification entirely
[21:22:51] [PUSH_EMBED] Got evolution data for message 18475, saving to local DB
[21:22:51] [PUSH_EMBED] Saved evolution data for message 18475
[21:22:51] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=53, first5Ids=[18475, 16596, 16597, 16598, 16599]
[21:22:52] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18474 → 18475
[21:22:53] [MENU] dismissAnyExistingMenu called
[21:22:53] [MENU] dismissAnyExistingMenu completed
[21:22:53] [PUSH] Silent push received
[21:22:53] [PUSH_EMBED] No embedded message_data in notification
[21:22:53] [PUSH] No embedded data, pre-loading messages from server
[21:22:53] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:22:53] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:22:53] [PRELOAD_CACHE] Preserving 3 push-inserted messages: [18425, 18424, 18423]
[21:22:53] [PUSH_PRELOAD] ⚡ Pre-cached 53 messages for instant display (preserved 3 from push)
[21:22:53] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:22:53] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 18475]
[21:22:53] [PUSH] Parsed message_id: 18475
[21:22:53] [PUSH] Parsed operation_type: 3
[21:22:53] [PUSH] Taking direct action: opType=3, messageId=18475
[21:22:53] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18475
[21:22:54] [CLIENT_SIG] Event received: type=3 messageId=18475
[21:22:54] [WS_EVENT] Received event: type=3, messageId=18475
[21:22:54] [WS_EVENT] Read receipt for message 18475 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:23:00] [REPLY_TAP] Scrolling to message 16644 at index 50
[21:23:01] [MENU] dismissAnyExistingMenu called
[21:23:01] [MENU] dismissAnyExistingMenu completed
[21:23:01] [SCROLL_BTN] Showing button - 267pt from bottom > half 223pt
[21:23:06] [LIFECYCLE] App resigning active - cleared crash flag
[21:23:07] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[21:23:07] [SECURITY] Saved background timestamp
[21:23:07] [LIFECYCLE] App entering background - cleared crash flag
[21:23:07] [CLIENT_SIG] Disconnecting
[21:23:07] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[21:23:07] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[21:23:07] [WS] Canceling WebSocket for query connection to iosILUIWU
[21:23:07] In cleanupPeer
[21:23:07] In cleanupPeer
[21:23:07] [LIFECYCLE] WebRTC audio disabled
[21:23:07] [LIFECYCLE] AVAudioSession deactivated
[21:23:07] [LIFECYCLE] All connections stopped
[21:23:07] [CLIENT_SIG] WebSocket closed with code 1001
[21:23:07] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:23:07] [SERVER] Stopped reconnect polling
[21:23:07] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[21:23:07] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:23:07] [WS] WebSocket task completed with error - isQueryOnly=true: cancelled
[21:23:07] [WS] Query connection error - cleaning up all agent connections and views
[21:23:07] Will request stop of video 0
[21:23:07] Will request stop of video 0
[21:23:07] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[21:23:07] [WS] Query connection failed - cleaning up all agent connections and views[21:23:08] [LOG] Pruned 12 entries older than 3 hours
[21:23:08] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:23:08] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:23:08] [GIPHY] SDK not available - using REST API fallback
[21:23:08] [BACKGROUND] Background fetch enabled
[21:23:08] [CLEANUP] No old timer messages to delete
[21:23:08] [SECURITY] Initial launch - within timeout (0.9098479747772217s < 300.0s)
[21:23:08] [AUTH] Starting PIN authentication
[21:23:08] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:23:08] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:23:08] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:23:08] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:23:08] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:23:08] [USER] ✅ User registered successfully
[21:23:08] [PUSH] User registration after token update: success
[21:23:08] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:23:08] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:23:08] [CLIENT_SIG] WebSocket opened
[21:23:08] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:23:08] [CLIENT_SIG] Connected! clientId=NFOMiMU4O58a7i7y
[21:23:08] [CLIENT_SIG] Received 2 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:23:08] [CLIENT_SIG]   - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:23:08] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:23:08] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18475)...
[21:23:09] [PRELOAD] No messages or parse error[21:23:10] [LOG] Pruned 9 entries older than 3 hours
[21:23:10] [SECURITY] Restored real session: ILUIWU
[21:23:10] [SECURITY] Restored real session: ILUIWU
[21:23:10] [SECURITY] Saved real session: ILUIWU
[21:23:10] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:23:10] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:23:10] Documents Directory: /var/mobile/Containers/Data/Application/F776C3C0-01D6-435D-9177-CBEB18C3217C/Documents
[21:23:10] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:23:10] [THEME] Applying current theme
[21:23:10] [CHAT] Applied day theme (mode: day)
[21:23:10] [SECURITY] Saved real session: ILUIWU
[21:23:10] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:23:10] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:23:10] [NETWORK] Network monitor started
[21:23:10] [NETWORK] Status changed: connected
[21:23:10] Did transition
[21:23:10] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:23:10] [VIEWER] Screen lock enabled - normal idle behavior
[21:23:10] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:23:10] [VCC] ========== VideoConnectionClass INIT ==========
[21:23:10] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:23:10] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:23:10] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:23:10] [DATA AUDIO] Creating encoder/decoder factories...
[21:23:10] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:23:10] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:23:10] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:23:10] [DATA AUDIO] ✅ Factory created
[21:23:10] [DATA AUDIO] RTCAudioSession locked
[21:23:10] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:23:10] [DATA AUDIO] RTCAudioSession unlocked
[21:23:10] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:23:10] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:23:10] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:23:10] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:23:10] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:23:10] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:23:10] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:23:10] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:23:10] Did transition
[21:23:10] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:23:10] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:23:10] [CHUNK] Merged 879 reactions synchronously
[21:23:10] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:23:10] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:23:10] [MIGRATION] No messages need sender_name backfill
[21:23:10] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:23:10] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:23:10] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:23:10] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:23:10] [USER] ✅ User registered successfully
[21:23:10] [USER] User registration successful
[21:23:10] [GALLERY_DB] ✅ Loaded 477 media messages
[21:23:10] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18475
[21:23:10] [INCREMENTAL_SYNC] ✅ No new messages
[21:23:10] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:23:10] [GALLERY] First 5 after sort (newest first):
[21:23:10] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:23:10] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:23:10] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:23:10] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:23:10] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:23:10] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:23:10] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18426, 18427, 18428, 18429, 18430]
[21:23:10] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:23:10] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:23:10] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:23:10] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:23:10] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[21:23:10] [GIF] msgId=18430 START fresh animation
[21:23:10] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:23:10] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:23:10] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:23:10] [SERVER] Starting reconnect polling (5s interval)
[21:23:10] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:23:10] [ICONS] Offset applied: -14.6
[21:23:10] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:23:10] [ICONS] Chat center: (31.2, 87.0)
[21:23:10] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:23:10] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:23:10] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:23:10] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:23:10] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:23:10] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:23:10] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:23:10] [ICONS] Screen width: 440.0
[21:23:10] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:23:10] [UNSENT_RETRY] Checking for unsent messages...
[21:23:10] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:23:10] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:23:10] [UPLOAD_RECOVERY] Session: ILUIWU
[21:23:10] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:23:10] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:23:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:23:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:23:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:23:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:23:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:23:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:23:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:23:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:23:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:23:10] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:23:10] [UPLOAD_RECOVERY] Verifying 10 media files exist on server...
[21:23:10] [PENDING_UPLOAD] Total pending upload messages: 0
[21:23:10] [UNSENT_RETRY] No unsent messages found
[21:23:10] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:23:10] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:23:10] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:23:10] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:23:10] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:23:10] new_session POST ok: token len=157
[21:23:10] HELLO → sent (fetched token, role=query)
[21:23:10] [SIG] hello_ok received for query connection - ready to query agents
[21:23:10] [SIG] get_agents request sent for sessionId=ILUIWU
[21:23:10] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:23:10] [SERVER] Stopped reconnect polling
[21:23:10] [SIG] agents_list received: []
[21:23:10] [SIG] agents_list received: []
[21:23:11] [COMBINED_FETCH] Loaded 7241 read receipts, 879 messages with reactions
[21:23:11] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:23:11] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18426, 18427, 18428, 18429, 18430]
[21:23:49] [CLIENT_SIG] Client disconnected: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE) on session 'ILUIWU' (my session: 'ILUIWU')
[21:23:49] [CLIENT_SIG] Client disconnected: Esra (EDAD55A1-003F-415D-AA60-672B34B504FE) on session 'ILUIWU' (my session: 'ILUIWU')
[21:23:49] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:23:49] [SEND_MESSAGE] 📤 Sending message, currentMsgCount=50, isReloading=false
[21:23:49] [SEND_MESSAGE] ✅ Added optimistic message id=-1 to arrays, newMsgCount=51
[21:23:49] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[-1, 18475, 18474, 18473, 18472]
[21:23:50] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:23:50] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:23:51] [LIFECYCLE] App resigning active - cleared crash flag
[21:23:52] [CLIENT_SIG] Event received: type=0 messageId=18476
[21:23:52] [WS_EVENT] Received event: type=0, messageId=18476
[21:23:52] [WS_EVENT] 📨 New message notification (msgId=18476) - triggering incremental refresh, currentMsgCount=51
[21:23:52] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=51
[21:23:52] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18475
[21:23:52] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":18476,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2026-01-21 20:23:50"}
[21:23:52] [CHAT] receive_message.php JSON: ["file_name": , "ok": 1, "message_id": 18476, "message_type": 0, "datesent_utc": 2026-01-21 20:23:50, "session_id": ILUIWU]
[21:23:52] [DB_UPGRADE] Upgrading message ID: -1 → 18476, preserveOriginalDate=false
[21:23:52] [DB_UPGRADE] ✅ Upgraded -1 → 18476 with send_status=0, 1 row(s) affected
[21:23:52] [SEND_UPGRADE] ✅ Updated chatMessages[0].id: -1 → 18476
[21:23:52] [SEND_UPGRADE] ✅ Updated allMessagesWithReadBy[0].id: -1 → 18476
[21:23:52] ReloadData 9
[21:23:52] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:23:52] [BLACKOUT_DEBUG] blackoutView=nil, newMessages.count=1
[21:23:52] [WS_EVENT] ✅ Incremental refresh complete, newMsgCount=51
[21:23:52] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[21:23:52] [SECURITY] Saved background timestamp
[21:23:52] [LIFECYCLE] App entering background - cleared crash flag
[21:23:52] [CLIENT_SIG] Disconnecting
[21:23:52] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[21:23:52] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[21:23:52] [WS] Canceling WebSocket for query connection to iosILUIWU
[21:23:52] In cleanupPeer
[21:23:52] In cleanupPeer
[21:23:52] [LIFECYCLE] WebRTC audio disabled
[21:23:52] [LIFECYCLE] AVAudioSession deactivated
[21:23:52] [LIFECYCLE] All connections stopped
[21:23:52] [CLIENT_SIG] WebSocket closed with code 1001
[21:23:52] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:23:52] [SERVER] Stopped reconnect polling
[21:23:52] Will request stop of video 0
[21:23:52] Will request stop of video 0
[21:23:52] [WS] WebSocket ACTUALLY CLOSED - isQueryOnly=true, connectionStr=iosILUIWU, closeCode=1001
[21:23:52] [WS] Query connection to iosILUIWU closed - cleaning up all agent connections and views
[21:23:52] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[21:23:52] [WS] Query connection failed - cleaning up all agent connections and views
[21:23:52] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[21:23:52] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:23:52] [PIP] Removing 0 tracks from PiP for connection 0
[21:23:52] [PIP] ✅ All tracks removed for connection 0
[21:23:52] [PIP] Removing 0 tracks from PiP for connection 0
[21:23:52] [PIP] ✅ All tracks removed for connection 0
[21:23:52] [CLEANUP] ========================================
[21:23:52] [CLEANUP] Cleaning up all agent connections and views
[21:23:52] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:23:52] [CLEANUP] Stopped and removed 0 video connections
[21:23:52] [CLEANUP] Removed 0 video views
[21:23:52] [CLEANUP] Removed 0 feed scroll views
[21:23:52] [CLEANUP] Removed 0 status labels
[21:23:52] [CLEANUP] Reset agent query state
[21:23:52] [CLEANUP] Updated page indicator
[21:23:52] [CLEANUP] Rebuilt video layout
[21:23:52] [CLEANUP] ✅ All agent connections and views cleaned up
[21:23:52] [CLEANUP] ========================================
[21:23:52] [SERVER] Skipping reconnect polling - app is in background
[21:23:52] [WS] URLSession invalidated successfully
[21:23:52] [CLEANUP] ========================================
[21:23:52] [CLEANUP] Cleaning up all agent connections and views
[21:23:52] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:23:52] [CLEANUP] Stopped and removed 0 video connections
[21:23:52] [CLEANUP] Removed 0 video views
[21:23:52] [CLEANUP] Removed 0 feed scroll views
[21:23:52] [CLEANUP] Removed 0 status labels
[21:23:52] [CLEANUP] Reset agent query state
[21:23:52] [CLEANUP] Updated page indicator
[21:23:52] [CLEANUP] Rebuilt video layout
[21:23:52] [CLEANUP] ✅ All agent connections and views cleaned up
[21:23:52] [CLEANUP] ========================================
[21:23:52] [SERVER] Skipping reconnect polling - app is in background
[21:23:52] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=51, first5Ids=[18426, 18427, 18428, 18429, 18430][21:23:59] [LOG] Pruned 79 entries older than 3 hours
[21:23:59] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:23:59] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:23:59] [GIPHY] SDK not available - using REST API fallback
[21:23:59] [BACKGROUND] Background fetch enabled
[21:23:59] [SECURITY] Initial launch - within timeout (7.765679836273193s < 300.0s)
[21:23:59] [AUTH] Starting PIN authentication
[21:23:59] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:23:59] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:23:59] [CLEANUP] No old timer messages to delete
[21:23:59] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:23:59] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:23:59] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:23:59] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:23:59] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:23:59] [USER] ✅ User registered successfully
[21:23:59] [PUSH] User registration after token update: success
[21:24:00] [CLIENT_SIG] WebSocket opened
[21:24:00] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:24:00] [CLIENT_SIG] Connected! clientId=BjqTu2rm7-E-X-pP
[21:24:00] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:24:00] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:24:00] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18476)...
[21:24:00] [PRELOAD] No messages or parse error
[21:24:01] [PIN_AUTH] Correct PIN
[21:24:01] [SECURITY] Restored real session: ILUIWU
[21:24:01] [SECURITY] Restored real session: ILUIWU
[21:24:01] [SECURITY] Saved real session: ILUIWU
[21:24:01] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:24:01] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:24:01] Documents Directory: /var/mobile/Containers/Data/Application/098FFAE9-4F04-4E84-8B7E-28EE465560ED/Documents
[21:24:01] [THEME] Applying current theme
[21:24:01] [CHAT] Applied day theme (mode: day)
[21:24:01] [SECURITY] Saved real session: ILUIWU
[21:24:01] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:24:01] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:24:01] [NETWORK] Network monitor started
[21:24:01] [NETWORK] Status changed: connected
[21:24:01] Did transition
[21:24:01] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:24:01] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:24:01] [VIEWER] Screen lock enabled - normal idle behavior
[21:24:01] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:24:01] [VCC] ========== VideoConnectionClass INIT ==========
[21:24:01] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:24:01] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:24:01] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:24:01] [DATA AUDIO] Creating encoder/decoder factories...
[21:24:01] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:24:01] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:24:01] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:24:01] [DATA AUDIO] ✅ Factory created
[21:24:01] [DATA AUDIO] RTCAudioSession locked
[21:24:01] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:24:01] [DATA AUDIO] RTCAudioSession unlocked
[21:24:01] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:24:01] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:24:01] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:24:01] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:24:01] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:24:01] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:24:01] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:24:01] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:24:01] Did transition
[21:24:01] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:24:01] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:24:01] [CHUNK] Merged 879 reactions synchronously
[21:24:01] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:24:01] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:24:01] [MIGRATION] No messages need sender_name backfill
[21:24:01] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:24:01] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:24:01] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:24:01] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:24:01] [USER] ✅ User registered successfully
[21:24:01] [USER] User registration successful
[21:24:01] [GALLERY_DB] ✅ Loaded 477 media messages
[21:24:01] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18476
[21:24:01] [INCREMENTAL_SYNC] ✅ No new messages
[21:24:01] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:24:01] [GALLERY] First 5 after sort (newest first):
[21:24:01] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:24:01] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:24:01] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:24:01] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:24:01] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:24:01] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:24:01] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18427, 18428, 18429, 18430, 18431]
[21:24:01] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:24:02] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:02] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:02] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:24:02] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[21:24:02] [GIF] msgId=18430 START fresh animation
[21:24:02] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:24:02] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:24:02] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:24:02] [SERVER] Starting reconnect polling (5s interval)
[21:24:02] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:24:02] [ICONS] Offset applied: -14.6
[21:24:02] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:24:02] [ICONS] Chat center: (31.2, 87.0)
[21:24:02] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:24:02] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:24:02] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:24:02] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:24:02] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:24:02] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:24:02] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:24:02] [ICONS] Screen width: 440.0
[21:24:02] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:24:02] [UNSENT_RETRY] Checking for unsent messages...
[21:24:02] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:24:02] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:24:02] [UPLOAD_RECOVERY] Session: ILUIWU
[21:24:02] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:24:02] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:24:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:24:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:24:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:24:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:24:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:24:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:24:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:24:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:24:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:24:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:24:02] [UPLOAD_RECOVERY] Verifying 10 media files exist on server...
[21:24:02] [PENDING_UPLOAD] Total pending upload messages: 0
[21:24:02] [UNSENT_RETRY] No unsent messages found
[21:24:02] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:24:02] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:24:02] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:24:02] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:24:02] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:24:02] new_session POST ok: token len=157
[21:24:02] HELLO → sent (fetched token, role=query)
[21:24:02] [SIG] hello_ok received for query connection - ready to query agents
[21:24:02] [SIG] get_agents request sent for sessionId=ILUIWU
[21:24:02] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:24:02] [SERVER] Stopped reconnect polling
[21:24:02] [SIG] agents_list received: []
[21:24:02] [SIG] agents_list received: []
[21:24:02] [COMBINED_FETCH] Loaded 7242 read receipts, 879 messages with reactions
[21:24:02] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:24:02] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18427, 18428, 18429, 18430, 18431]
[21:24:04] [MENU] dismissAnyExistingMenu called
[21:24:04] [MENU] dismissAnyExistingMenu completed
[21:24:05] [SEARCH] Found 2482 messages matching 'b' in local DB
[21:24:06] [SEARCH] Found 1326 messages matching 'ba' in local DB
[21:24:06] [SEARCH] Found 1189 messages matching 'bab' in local DB
[21:24:06] [SEARCH] Found 1162 messages matching 'baby' in local DB
[21:24:11] [SEARCH] 🔍 User selected search result: id=16389, text='Hello, sorry for my silence baby. We had dinner wi', sender='Esra'
[21:24:11] [SEARCH] 🔍 scrollToMessage called for id=16389, chatRows.count=51, allMessages.count=50, totalInDB=7238
[21:24:11] [SEARCH] ⚠️ Message 16389 NOT in chatRows (range: 18427...18476), need to load more
[21:24:11] [SEARCH] 📅 countMessagesNewerThan(16389): found date='2025-12-23 19:54:05', newerCount=2050
[21:24:11] [SEARCH] 📊 countMessagesNewerThan(16389) = 2050
[21:24:11] [SEARCH] 📥 Loading window: offset=1800, limit=500 (target at position 2050, window centered)
[21:24:11] [SEARCH] 📥 Loaded 500 messages from DB
[21:24:11] [SEARCH] 📊 Loaded messages range: 16136...16646, contains target 16389: true
[21:24:11] [SEARCH] 🔄 Calling reloadMessagesForCurrentTabImmediate()
[21:24:11] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=500, first5Ids=[16136, 16137, 16138, 16139, 16140]
[21:24:12] [CELL_UPLOAD] configure: msgId=16185, file=c495501efe348b60.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=c495501efe348b60.jpg, overlayExists=true
[21:24:12] [CELL_UPLOAD] configure: msgId=16188, file=268ec35ef086ceaa.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → not my message, setting complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=268ec35ef086ceaa.jpg, overlayExists=true
[21:24:12] [SEARCH] 📊 After reload: chatRows.count=514, range: 16136...16646, contains target 16389: true
[21:24:12] DOWNLOADIIING 647896418f5c016a.jpg
[21:24:12] [SEARCH] 🎯 tryScrollToMessage called for id=16389, chatRows.count=514
[21:24:12] [SEARCH] ✅ Message 16389 found at index 254, scrolling and flashing
[21:24:12] [SCROLL_BTN] Showing button - 51700pt from bottom > half 379pt
[21:24:12] [CELL_UPLOAD] configure: msgId=16192, file=6a558e921cc3a4ea.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=6a558e921cc3a4ea.jpg, overlayExists=true
[21:24:12] [CELL_UPLOAD] configure: msgId=16213, file=440097b3eaf3df08.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=440097b3eaf3df08.heic, overlayExists=true
[21:24:12] [CELL_UPLOAD] configure: msgId=16214, file=2f375f3b72ae18cd.jpeg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=2f375f3b72ae18cd.jpeg, overlayExists=true
[21:24:12] [CELL_UPLOAD] configure: msgId=16252, file=8c6dad23c19f69d6.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → not my message, setting complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=8c6dad23c19f69d6.jpg, overlayExists=true
[21:24:12] [CELL_UPLOAD] configure: msgId=16373, file=22542ba10656c304.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=22542ba10656c304.jpg, overlayExists=true
[21:24:12] [CELL_UPLOAD] configure: msgId=16376, file=c017c56b3076028e.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=c017c56b3076028e.jpg, overlayExists=true
[21:24:12] [CELL_UPLOAD] configure: msgId=16379, file=118571124f56cee7.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → not my message, setting complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=118571124f56cee7.jpg, overlayExists=true
[21:24:12] [CELL_UPLOAD] configure: msgId=16381, file=77cc72d740781cfa.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=77cc72d740781cfa.heic, overlayExists=true
[21:24:12] [CELL_UPLOAD] configure: msgId=16382, file=78c6c6f62d293b49.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=78c6c6f62d293b49.heic, overlayExists=true
[21:24:12] [CELL_UPLOAD] configure: msgId=16384, file=ec3ba70fa71dbb83.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=ec3ba70fa71dbb83.heic, overlayExists=true
[21:24:12] [CELL_UPLOAD] configure: msgId=16385, file=608268d29c8a276e.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=608268d29c8a276e.heic, overlayExists=true
[21:24:12] [CELL_UPLOAD] configure: msgId=16386, file=6816e036dc9ffbe7.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=6816e036dc9ffbe7.heic, overlayExists=true
[21:24:12] [CELL_UPLOAD] configure: msgId=16387, file=8605d977daf39847.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=8605d977daf39847.heic, overlayExists=true
[21:24:13] [SEARCH] 🔄 Returning to newest messages (had 500 messages loaded)
[21:24:13] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18427, 18428, 18429, 18430, 18431]
[21:24:13] [SEARCH] ✅ Reloaded 50 newest messages
[21:24:15] [MENU] dismissAnyExistingMenu called
[21:24:15] [MENU] dismissAnyExistingMenu completed
[21:24:15] [SCROLL_BTN] Showing button - 405pt from bottom > half 379pt
[21:24:16] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:16] [CELL_UPLOAD] → not my message, setting complete
[21:24:16] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:24:17] [MENU] dismissAnyExistingMenu called
[21:24:17] [MENU] dismissAnyExistingMenu completed
[21:24:17] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=true
[21:24:17] [GIF] msgId=18430 globally completed - showing static frame
[21:24:17] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:24:17] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:24:17] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:24:17] [MENU] dismissAnyExistingMenu called
[21:24:17] [MENU] dismissAnyExistingMenu completed
[21:24:17] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:17] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:17] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:24:17] [COMBINED_FETCH] Loaded 7242 read receipts, 879 messages with reactions
[21:24:17] [PAGINATION] 📜 Loading 50 older messages, firstVisibleRow=3, oldOffset=443.6666666666667
[21:24:17] [PAGINATION] 📜 Total now: 100
[21:24:17] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=100, first5Ids=[18377, 18378, 18379, 18380, 18381]
[21:24:17] [CELL_UPLOAD] configure: msgId=18378, file=7fcf17ed21a942d6.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:17] [CELL_UPLOAD] → not my message, setting complete
[21:24:17] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7fcf17ed21a942d6.jpg, overlayExists=true
[21:24:17] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:17] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:17] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:24:17] [PAGINATION] 📜 newHeight=10044.0, heightDiff=5131.0, newOffset=5574.666666666667
[21:24:17] [PAGINATION] 📜 After setContentOffset, actual offset=5574.666666666667
[21:24:17] [PAGINATION] 📜 After main queue, offset=5574.666666666667
[21:24:17] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=true
[21:24:17] [GIF] msgId=18430 globally completed - showing static frame
[21:24:17] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:24:17] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:24:17] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:24:18] [MENU] dismissAnyExistingMenu called
[21:24:18] [MENU] dismissAnyExistingMenu completed
[21:24:18] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:24:18] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:24:18] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:24:19] [SEARCH] 🔄 Returning to newest messages (had 100 messages loaded)
[21:24:19] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18427, 18428, 18429, 18430, 18431]
[21:24:19] [SEARCH] ✅ Reloaded 50 newest messages[21:27:59] [LOG] Pruned 294 entries older than 3 hours
[21:27:59] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:27:59] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:27:59] [GIPHY] SDK not available - using REST API fallback
[21:27:59] [BACKGROUND] Background fetch enabled
[21:27:59] [AUTH] Starting PIN authentication
[21:27:59] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:27:59] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:27:59] [CLEANUP] No old timer messages to delete
[21:28:00] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:28:00] [CLIENT_SIG] WebSocket opened
[21:28:00] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:28:00] [CLIENT_SIG] Connected! clientId=5kXp9k-Zgm4W7BuT
[21:28:00] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:28:00] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:28:00] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18476)...
[21:28:00] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:28:00] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:28:00] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:28:00] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:28:00] [USER] ✅ User registered successfully
[21:28:00] [PUSH] User registration after token update: success
[21:28:00] [PRELOAD] No messages or parse error
[21:28:01] [PIN_AUTH] Correct PIN
[21:28:01] [SECURITY] Restored real session: ILUIWU
[21:28:01] [SECURITY] Restored real session: ILUIWU
[21:28:01] [SECURITY] Saved real session: ILUIWU
[21:28:01] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:28:01] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:28:01] Documents Directory: /var/mobile/Containers/Data/Application/D9A16C1A-0149-486A-BF8C-BFC5033B5BEF/Documents
[21:28:01] [THEME] Applying current theme
[21:28:01] [CHAT] Applied day theme (mode: day)
[21:28:01] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:28:01] [SECURITY] Saved real session: ILUIWU
[21:28:01] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:28:01] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:28:01] [NETWORK] Network monitor started
[21:28:01] [NETWORK] Status changed: connected
[21:28:01] Did transition
[21:28:01] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:28:01] [VIEWER] Screen lock enabled - normal idle behavior
[21:28:01] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:28:01] [VCC] ========== VideoConnectionClass INIT ==========
[21:28:01] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:28:01] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:28:01] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:28:01] [DATA AUDIO] Creating encoder/decoder factories...
[21:28:01] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:28:01] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:28:01] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:28:01] [DATA AUDIO] ✅ Factory created
[21:28:01] [DATA AUDIO] RTCAudioSession locked
[21:28:01] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:28:01] [DATA AUDIO] RTCAudioSession unlocked
[21:28:01] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:28:01] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:28:01] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:28:01] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:28:01] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:28:01] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:28:01] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:28:02] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:28:02] Did transition
[21:28:02] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:28:02] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:28:02] [CHUNK] Merged 879 reactions synchronously
[21:28:02] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:28:02] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:28:02] [MIGRATION] No messages need sender_name backfill
[21:28:02] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:28:02] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:28:02] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:28:02] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:28:02] [USER] ✅ User registered successfully
[21:28:02] [USER] User registration successful
[21:28:02] [GALLERY_DB] ✅ Loaded 477 media messages
[21:28:02] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18476
[21:28:02] [INCREMENTAL_SYNC] ✅ No new messages
[21:28:02] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:28:02] [GALLERY] First 5 after sort (newest first):
[21:28:02] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:28:02] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:28:02] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:28:02] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:28:02] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:28:02] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:28:02] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18427, 18428, 18429, 18430, 18431]
[21:28:02] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:28:02] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:28:02] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:28:02] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:28:02] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[21:28:02] [GIF] msgId=18430 START fresh animation
[21:28:02] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:28:02] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:28:02] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:28:02] [SERVER] Starting reconnect polling (5s interval)
[21:28:02] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:28:02] [ICONS] Offset applied: -14.6
[21:28:02] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:28:02] [ICONS] Chat center: (31.2, 87.0)
[21:28:02] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:28:02] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:28:02] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:28:02] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:28:02] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:28:02] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:28:02] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:28:02] [ICONS] Screen width: 440.0
[21:28:02] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:28:02] [UNSENT_RETRY] Checking for unsent messages...
[21:28:02] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:28:02] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:28:02] [UPLOAD_RECOVERY] Session: ILUIWU
[21:28:02] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:28:02] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:28:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:28:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:28:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:28:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:28:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:28:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:28:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:28:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:28:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:28:02] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:28:02] [UPLOAD_RECOVERY] Verifying 10 media files exist on server...
[21:28:02] [PENDING_UPLOAD] Total pending upload messages: 0
[21:28:02] [UNSENT_RETRY] No unsent messages found
[21:28:02] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:28:02] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:28:02] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:28:02] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:28:02] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:28:02] new_session POST ok: token len=157
[21:28:02] HELLO → sent (fetched token, role=query)
[21:28:02] [SIG] hello_ok received for query connection - ready to query agents
[21:28:02] [SIG] get_agents request sent for sessionId=ILUIWU
[21:28:02] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:28:02] [SERVER] Stopped reconnect polling
[21:28:02] [SIG] agents_list received: []
[21:28:02] [SIG] agents_list received: []
[21:28:02] [COMBINED_FETCH] Loaded 7242 read receipts, 879 messages with reactions
[21:28:02] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:28:02] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18427, 18428, 18429, 18430, 18431]
[21:28:04] [MENU] dismissAnyExistingMenu called
[21:28:04] [MENU] dismissAnyExistingMenu completed
[21:28:09] [MENU] dismissAnyExistingMenu called
[21:28:09] [MENU] dismissAnyExistingMenu completed
[21:29:03] [MENU] dismissAnyExistingMenu called
[21:29:03] [MENU] dismissAnyExistingMenu completed
[21:29:05] [LIFECYCLE] App resigning active - cleared crash flag
[21:29:07] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[21:29:07] [SECURITY] Saved background timestamp
[21:29:07] [LIFECYCLE] App entering background - cleared crash flag
[21:29:07] [CLIENT_SIG] Disconnecting
[21:29:07] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[21:29:07] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[21:29:07] [WS] Canceling WebSocket for query connection to iosILUIWU
[21:29:07] In cleanupPeer
[21:29:07] In cleanupPeer
[21:29:07] [LIFECYCLE] WebRTC audio disabled
[21:29:07] [LIFECYCLE] AVAudioSession deactivated
[21:29:07] [LIFECYCLE] All connections stopped
[21:29:07] [CLIENT_SIG] WebSocket closed with code 1001
[21:29:07] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:29:07] [SERVER] Stopped reconnect polling
[21:29:07] Will request stop of video 0
[21:29:07] [WS] WebSocket task completed with error - isQueryOnly=true: cancelled
[21:29:07] [WS] Query connection error - cleaning up all agent connections and views
[21:29:07] Will request stop of video 0
[21:29:07] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[21:29:07] [WS] Query connection failed - cleaning up all agent connections and views
[21:29:07] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[21:29:07] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:29:07] [PIP] Removing 0 tracks from PiP for connection 0
[21:29:07] [PIP] ✅ All tracks removed for connection 0
[21:29:07] [CLEANUP] ========================================
[21:29:07] [CLEANUP] Cleaning up all agent connections and views
[21:29:07] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:29:07] [CLEANUP] Stopped and removed 0 video connections
[21:29:07] [CLEANUP] Removed 0 video views
[21:29:07] [CLEANUP] Removed 0 feed scroll views
[21:29:07] [CLEANUP] Removed 0 status labels
[21:29:07] [CLEANUP] Reset agent query state
[21:29:07] [CLEANUP] Updated page indicator
[21:29:07] [CLEANUP] Rebuilt video layout
[21:29:07] [CLEANUP] ✅ All agent connections and views cleaned up
[21:29:07] [CLEANUP] ========================================
[21:29:07] [SERVER] Skipping reconnect polling - app is in background
[21:29:07] [WS] URLSession invalidated successfully
[21:29:07] [PIP] Removing 0 tracks from PiP for connection 0
[21:29:07] [PIP] ✅ All tracks removed for connection 0
[21:29:07] [CLEANUP] ========================================
[21:29:07] [CLEANUP] Cleaning up all agent connections and views
[21:29:07] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:29:07] [CLEANUP] Stopped and removed 0 video connections
[21:29:07] [CLEANUP] Removed 0 video views
[21:29:07] [CLEANUP] Removed 0 feed scroll views
[21:29:07] [CLEANUP] Removed 0 status labels
[21:29:07] [CLEANUP] Reset agent query state
[21:29:07] [CLEANUP] Updated page indicator
[21:29:07] [CLEANUP] Rebuilt video layout
[21:29:07] [CLEANUP] ✅ All agent connections and views cleaned up
[21:29:07] [CLEANUP] ========================================
[21:29:07] [SERVER] Skipping reconnect polling - app is in background
[21:29:09] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[21:29:09] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:29:09] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:29:09] HELLO → sent (cached token, role=query)
[21:29:09] [SIG] hello_ok received for query connection - ready to query agents
[21:29:09] [SIG] get_agents request sent for sessionId=ILUIWU
[21:29:09] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:29:09] [SERVER] Stopped reconnect polling
[21:29:09] [SIG] agents_list received: []
[21:29:09] [SIG] agents_list received: []
[21:29:11] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:29:11] [CLIENT_SIG] WebSocket opened
[21:29:11] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:29:11] [CLIENT_SIG] Connected! clientId=6bMziil_9Bn70-zV
[21:29:12] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:29:12] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:29:16] [SECURITY] Timeout check: elapsed=9.477184057235718s, timeout=300.0s
[21:29:16] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:29:16] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:29:16] [LIFECYCLE] App entering foreground - restoring connections
[21:29:16] [UPLOAD_RETRY] No pending uploads to retry
[21:29:16] [LIFECYCLE] Merged 879 reactions from local DB
[21:29:16] [LIFECYCLE] WebRTC audio re-enabled
[21:29:16] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:29:16] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:29:16] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:29:16] [VIEWER] Reconnecting after background - querying agents
[21:29:16] [UNSENT_RETRY] Checking for unsent messages...
[21:29:16] [PENDING_UPLOAD] Total pending upload messages: 0
[21:29:16] [UNSENT_RETRY] No unsent messages found
[21:29:16] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18427, 18428, 18429, 18430, 18431]
[21:29:16] [SECURITY] sceneDidBecomeActive - isAuthenticated=true, didEnterBackground=true
[21:29:16] [SECURITY] Within timeout - cleared background flag
[21:29:16] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:29:16] [PUSH] handlePollEventsNotification userInfo: [:]
[21:29:16] [PUSH] No message_id in userInfo
[21:29:16] [PUSH] No operation_type in userInfo
[21:29:16] [FAST_REFRESH] Evolution disabled - performing incremental sync
[21:29:16] [FAST_REFRESH] Already have 50 messages - skipping local DB load
[21:29:16] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[21:29:16] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[21:29:16] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:29:16] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18476
[21:29:17] [INCREMENTAL_SYNC] ✅ No new messages
[21:29:17] [FAST_REFRESH] Incremental sync complete - 50 messages
[21:29:17] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18427, 18428, 18429, 18430, 18431]
[21:29:17] [COMBINED_FETCH] Loaded 7242 read receipts, 879 messages with reactions
[21:29:17] [FOREGROUND] Enriched 0 messages with readBy data from server
[21:29:17] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18427, 18428, 18429, 18430, 18431]
[21:29:17] [COMBINED_FETCH] Loaded 7242 read receipts, 879 messages with reactions
[21:29:17] [FAST_REFRESH] Enriched 50 messages with readBy data
[21:29:17] [MENU] dismissAnyExistingMenu called
[21:29:17] [MENU] dismissAnyExistingMenu completed
[21:29:17] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18427, 18428, 18429, 18430, 18431]
[21:29:19] [WS] WebSocket task completed with error - isQueryOnly=true: The request timed out.
[21:29:19] [WS] Query connection error - cleaning up all agent connections and views
[21:29:19] [CLEANUP] ========================================
[21:29:19] [CLEANUP] Cleaning up all agent connections and views
[21:29:19] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:29:19] [CLEANUP] Stopped and removed 0 video connections
[21:29:19] [CLEANUP] Removed 0 video views
[21:29:19] [CLEANUP] Removed 0 feed scroll views
[21:29:19] [CLEANUP] Removed 0 status labels
[21:29:19] [CLEANUP] Reset agent query state
[21:29:19] [CLEANUP] Updated page indicator
[21:29:19] [CLEANUP] Rebuilt video layout
[21:29:19] [CLEANUP] ✅ All agent connections and views cleaned up
[21:29:19] [CLEANUP] ========================================
[21:29:19] [SERVER] Starting reconnect polling (5s interval)
[21:29:24] [SERVER] Polling - attempting to reconnect...
[21:31:14] [CRASH] No crash detected
[21:31:14] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:31:14] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:31:14] [GIPHY] SDK not available - using REST API fallback
[21:31:14] [BACKGROUND] Background fetch enabled
[21:31:14] [SECURITY] Initial launch - within timeout (127.18290400505066s < 300.0s)
[21:31:14] [AUTH] Starting PIN authentication
[21:31:14] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:31:14] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:14] [CLEANUP] No old timer messages to delete
[21:31:14] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:31:14] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:31:14] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:31:14] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:31:14] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:31:14] [CLIENT_SIG] WebSocket opened
[21:31:14] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:31:14] [USER] ✅ User registered successfully
[21:31:14] [PUSH] User registration after token update: success
[21:31:14] [CLIENT_SIG] Connected! clientId=aU_96HO2DU-bEgVn
[21:31:14] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:31:14] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:14] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18476)...
[21:31:14] [PRELOAD] Fetched 2 messages
[21:31:14] [PRELOAD] ✅ Saved 2 messages to local DB
[21:31:14] [PRELOAD] ⚡ Cached 2 messages for instant display (preserved 0 from push)
[21:31:15] [PIN_AUTH] Correct PIN
[21:31:15] [SECURITY] Restored real session: ILUIWU
[21:31:15] [SECURITY] Restored real session: ILUIWU
[21:31:16] [SECURITY] Saved real session: ILUIWU
[21:31:16] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:31:16] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:31:16] Documents Directory: /var/mobile/Containers/Data/Application/A67B3A45-2C33-4C31-835F-E3FA13A100EB/Documents
[21:31:16] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:31:16] [THEME] Applying current theme
[21:31:16] [CHAT] Applied day theme (mode: day)
[21:31:16] [SECURITY] Saved real session: ILUIWU
[21:31:16] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:31:16] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:31:16] [NETWORK] Network monitor started
[21:31:16] [NETWORK] Status changed: connected
[21:31:16] Did transition
[21:31:16] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:31:16] [VIEWER] Screen lock enabled - normal idle behavior
[21:31:16] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:31:16] [VCC] ========== VideoConnectionClass INIT ==========
[21:31:16] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:31:16] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:31:16] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:31:16] [DATA AUDIO] Creating encoder/decoder factories...
[21:31:16] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:31:16] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:31:16] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:31:16] [DATA AUDIO] ✅ Factory created
[21:31:16] [DATA AUDIO] RTCAudioSession locked
[21:31:16] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:31:16] [DATA AUDIO] RTCAudioSession unlocked
[21:31:16] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:31:16] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:31:16] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:31:16] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:31:16] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:31:16] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:31:16] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:31:16] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:31:16] Did transition
[21:31:16] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:31:16] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:31:16] [CHUNK] Merged 879 reactions synchronously
[21:31:16] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:31:16] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:31:16] [MIGRATION] No messages need sender_name backfill
[21:31:16] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:31:16] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:31:16] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:31:16] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:31:16] [USER] ✅ User registered successfully
[21:31:16] [USER] User registration successful
[21:31:16] [GALLERY_DB] ✅ Loaded 477 media messages
[21:31:16] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18478
[21:31:16] [INCREMENTAL_SYNC] ✅ No new messages
[21:31:16] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:31:16] [GALLERY] First 5 after sort (newest first):
[21:31:16] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:31:16] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:31:16] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:31:16] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:31:16] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:31:16] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:31:16] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:31:16] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:31:16] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[21:31:16] [GIF] msgId=18430 START fresh animation
[21:31:16] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:31:16] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:31:16] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:31:16] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18476 → 18477
[21:31:16] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 18477 → 18478
[21:31:16] [SERVER] Starting reconnect polling (5s interval)
[21:31:16] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:31:16] [ICONS] Offset applied: -14.6
[21:31:16] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:31:16] [ICONS] Chat center: (31.2, 87.0)
[21:31:16] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:31:16] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:31:16] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:31:16] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:31:16] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:31:16] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:31:16] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:31:16] [ICONS] Screen width: 440.0
[21:31:16] [PUSH] Silent push received
[21:31:16] [PUSH_EMBED] 📩 Received embedded message: id=18478, type=0, sender=Esra
[21:31:16] [PUSH_EMBED] ✅ Saved message 18478 to local DB (sync)
[21:31:16] [PUSH_EMBED] Created new cache with embedded message 18478
[21:31:16] [PUSH_EMBED] Fetching evolution data for message 18478 in background
[21:31:16] [PUSH_EMBED] ✅ Fully processed message 18478
[21:31:16] [PUSH] Embedded message handled instantly from silent push
[21:31:16] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:31:16] [UNSENT_RETRY] Checking for unsent messages...
[21:31:16] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:31:16] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:31:16] [UPLOAD_RECOVERY] Session: ILUIWU
[21:31:16] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:31:16] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:31:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:31:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:31:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:31:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:31:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:31:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:31:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:31:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:31:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:31:16] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:31:16] [UPLOAD_RECOVERY] Verifying 10 media files exist on server...
[21:31:16] [PENDING_UPLOAD] Total pending upload messages: 0
[21:31:16] [UNSENT_RETRY] No unsent messages found
[21:31:16] [PUSH_UI] 🔔 handlePushMessageReceived CALLED
[21:31:16] [PUSH_UI_BLACKOUT] blackoutView=false, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, type=0
[21:31:16] [PUSH_UI] Message 18478 already in memory - skipping insert
[21:31:16] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 18478, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 0, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_data"): {
    datesent = "2026-01-21 20:30:25";
    "file_name" = "";
    message = "Good night \Ud83d\Ude0f\Ud83d\Ude0f\Ud83d\Ude0f";
    "message_id" = 18478;
    "message_type" = 0;
    "prev_session_message_id" = 18477;
    "sender_id" = "EDAD55A1-003F-415D-AA60-672B34B504FE";
    "sender_name" = Esra;
    "session_id" = ILUIWU;
    timer = 0;
}]
[21:31:16] [PUSH_EMBED_VC] Message 18478 already in memory - skipping
[21:31:16] [PUSH] ⚡ Embedded message handled directly in ViewController
[21:31:16] [PUSH] Parsed message_id: 18478
[21:31:16] [PUSH] Parsed operation_type: 0
[21:31:16] [PUSH] Taking direct action: opType=0, messageId=18478
[21:31:16] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=18478
[21:31:16] [PUSH] ⚡ Message 18478 already in memory - skipping duplicate notification entirely
[21:31:16] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:31:16] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:31:16] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:31:16] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:31:16] [PUSH_EMBED] Got evolution data for message 18478, saving to local DB
[21:31:16] [PUSH_EMBED] Saved evolution data for message 18478
[21:31:16] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:31:16] new_session POST ok: token len=157
[21:31:16] HELLO → sent (fetched token, role=query)
[21:31:16] [SIG] hello_ok received for query connection - ready to query agents
[21:31:16] [SIG] get_agents request sent for sessionId=ILUIWU
[21:31:16] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:31:16] [SERVER] Stopped reconnect polling
[21:31:16] [SIG] agents_list received: []
[21:31:16] [SIG] agents_list received: []
[21:31:17] [COMBINED_FETCH] Loaded 7244 read receipts, 879 messages with reactions
[21:31:17] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:31:17] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:31:18] [PUSH] Silent push received
[21:31:18] [PUSH_EMBED] No embedded message_data in notification
[21:31:18] [PUSH] No embedded data, pre-loading messages from server
[21:31:18] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:18] [PUSH] Silent push received
[21:31:18] [PUSH_EMBED] No embedded message_data in notification
[21:31:18] [PUSH] No embedded data, pre-loading messages from server
[21:31:18] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:18] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:18] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:18] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:18] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:18] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:18] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 18477, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU]
[21:31:18] [PUSH] Parsed message_id: 18477
[21:31:18] [PUSH] Parsed operation_type: 3
[21:31:18] [PUSH] Taking direct action: opType=3, messageId=18477
[21:31:18] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18477
[21:31:18] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:18] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 18478]
[21:31:18] [PUSH] Parsed message_id: 18478
[21:31:18] [PUSH] Parsed operation_type: 3
[21:31:18] [PUSH] Taking direct action: opType=3, messageId=18478
[21:31:18] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=18478
[21:31:18] [CLIENT_SIG] Event received: type=3 messageId=18477
[21:31:18] [WS_EVENT] Received event: type=3, messageId=18477
[21:31:18] [WS_EVENT] Read receipt for message 18477 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:18] [CLIENT_SIG] Event received: type=3 messageId=18478
[21:31:18] [WS_EVENT] Received event: type=3, messageId=18478
[21:31:18] [WS_EVENT] Read receipt for message 18478 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:20] [MENU] dismissAnyExistingMenu called
[21:31:20] [MENU] dismissAnyExistingMenu completed
[21:31:20] [EMOJI_PICKER] Starting emoji picker for message 18477
[21:31:20] [MENU] Created button 'Reply' at index 0
[21:31:20] [MENU] Created button 'Copy' at index 1
[21:31:20] [MENU] Created button 'Delete' at index 2
[21:31:20] [MENU] Menu added at y=506.5
[21:31:20] [EMOJI_PICKER] ✅ Fetched 6 recent emojis
[21:31:20] [EMOJI_PICKER] ✅ Creating picker with 6 recent emojis
[21:31:20] [EMOJI_PICKER] ✅ Picker shown at y=369.5
[21:31:21] [REACTION] add 👄 to message 18477 (alreadyReacted: false)
[21:31:21] [MENU] dismissAnyExistingMenu called
[21:31:21] [MENU] Found menu with tag 9999, removing
[21:31:21] [MENU] Removing blur effect
[21:31:21] [MENU] Removing floating message snapshot
[21:31:21] [MENU] Dismissing emoji picker
[21:31:21] [MENU] Recorded dismissal time for debounce
[21:31:21] [MENU] dismissAnyExistingMenu completed
[21:31:21] [REACTION] Added 👄 reaction to message 18477
[21:31:22] [MENU] dismissAnyExistingMenu called
[21:31:22] [MENU] dismissAnyExistingMenu completed
[21:31:22] [SCROLL_BTN] Showing button - 303pt from bottom > half 223pt
[21:31:26] [MENU] dismissAnyExistingMenu called
[21:31:26] [MENU] dismissAnyExistingMenu completed
[21:31:29] [SEARCH] Found 3461 messages matching 'h' in local DB
[21:31:30] [SEARCH] Found 1373 messages matching 'he' in local DB
[21:31:30] [SEARCH] Found 115 messages matching 'hel' in local DB
[21:31:30] [SEARCH] Found 100 messages matching 'hell' in local DB
[21:31:30] [SEARCH] Found 99 messages matching 'hello' in local DB
[21:31:33] [SEARCH] Found 100 messages matching 'hell' in local DB
[21:31:33] [SEARCH] Found 115 messages matching 'hel' in local DB
[21:31:33] [SEARCH] Found 1373 messages matching 'he' in local DB
[21:31:34] [SEARCH] Found 3461 messages matching 'h' in local DB
[21:31:36] [SEARCH] Found 3461 messages matching 'h' in local DB
[21:31:36] [SEARCH] Found 1373 messages matching 'he' in local DB
[21:31:36] [SEARCH] Found 115 messages matching 'hel' in local DB
[21:31:36] [SEARCH] Found 100 messages matching 'hell' in local DB
[21:31:36] [SEARCH] Found 99 messages matching 'hello' in local DB
[21:31:40] [SEARCH] 🔍 User selected search result: id=827, text='Helloooo', sender='Laurent'
[21:31:40] [SEARCH] 🔍 scrollToMessage called for id=827, chatRows.count=51, allMessages.count=50, totalInDB=7240
[21:31:40] [SEARCH] ⚠️ Message 827 NOT in chatRows (range: 18429...18478), need to load more
[21:31:40] [SEARCH] 📅 countMessagesNewerThan(827): found date='2025-10-24 12:40:20', newerCount=6743
[21:31:40] [SEARCH] 📊 countMessagesNewerThan(827) = 6743
[21:31:40] [SEARCH] 📥 Loading window: offset=6493, limit=500 (target at position 6743, window centered)
[21:31:40] [SEARCH] 📥 Loaded 500 messages from DB
[21:31:40] [SEARCH] 📊 Loaded messages range: 563...4190, contains target 827: true
[21:31:40] [SEARCH] 🔄 Calling reloadMessagesForCurrentTabImmediate()
[21:31:40] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=500, first5Ids=[563, 564, 565, 566, 567]
[21:31:40] [TIMER] Timer 934 already played - skipping
[21:31:40] [SEARCH] 📊 After reload: chatRows.count=516, range: 563...4190, contains target 827: true
[21:31:40] [SEARCH] 🎯 tryScrollToMessage called for id=827, chatRows.count=516
[21:31:40] [SEARCH] ✅ Message 827 found at index 255, scrolling and flashing
[21:31:40] [SCROLL_BTN] Showing button - 43257pt from bottom > half 379pt
[21:31:40] [CELL_UPLOAD] configure: msgId=640, file=e1d06c52c18e20ce.jpg, senderId=599FA68E-4C92-45AD-A10D-58875E5D596dDD, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:31:40] [CELL_UPLOAD] → not my message, setting complete
[21:31:40] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=e1d06c52c18e20ce.jpg, overlayExists=true
[21:31:40] DOWNLOADIIING t_e1d06c52c18e20ce.jpg
[21:31:40] DOWNLOADIIING e1d06c52c18e20ce.jpg
[21:31:40] [CELL_UPLOAD] configure: msgId=707, file=cc85a7eabfa8ba33.jpg, senderId=599FA68E-4C92-45AD-A10D-58875E5D596D, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:31:40] [CELL_UPLOAD] → not my message, setting complete
[21:31:40] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=cc85a7eabfa8ba33.jpg, overlayExists=true
[21:31:40] [CELL_UPLOAD] configure: msgId=710, file=df64b89cd58fdabb.jpg, senderId=599FA68E-4C92-45AD-A10D-58875E5D596D, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:31:40] [CELL_UPLOAD] → not my message, setting complete
[21:31:40] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=df64b89cd58fdabb.jpg, overlayExists=true
[21:31:40] [CELL_UPLOAD] configure: msgId=714, file=f6ad546846eed078.jpg, senderId=599FA68E-4C92-45AD-A10D-58875E5D596D, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:31:40] [CELL_UPLOAD] → not my message, setting complete
[21:31:40] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f6ad546846eed078.jpg, overlayExists=true
[21:31:40] [CELL_UPLOAD] configure: msgId=715, file=5b58ff034f7bd7ac.jpg, senderId=599FA68E-4C92-45AD-A10D-58875E5D596D, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:31:40] [CELL_UPLOAD] → not my message, setting complete
[21:31:40] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=5b58ff034f7bd7ac.jpg, overlayExists=true
[21:31:40] [CELL_UPLOAD] configure: msgId=722, file=f4d9bbe2fc21d5ae.mov, senderId=599FA68E-4C92-45AD-A10D-58875E5D596D, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:31:40] [CELL_UPLOAD] → not my message, setting complete
[21:31:40] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f4d9bbe2fc21d5ae.mov, overlayExists=true
[21:31:40] [CELL_UPLOAD] configure: msgId=736, file=66e5f4c7c82fef18.heic, senderId=599FA68E-4C92-45AD-A10D-58875E5D596D, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:31:40] [CELL_UPLOAD] → not my message, setting complete
[21:31:40] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=66e5f4c7c82fef18.heic, overlayExists=true
[21:31:40] [CELL_UPLOAD] configure: msgId=738, file=7f3c34ff05eb7c95.jpg, senderId=599FA68E-4C92-45AD-A10D-58875E5D596D, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:31:40] [CELL_UPLOAD] → not my message, setting complete
[21:31:40] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7f3c34ff05eb7c95.jpg, overlayExists=true
[21:31:40] [CELL_UPLOAD] configure: msgId=755, file=e75a4dfe36e48d00.jpg, senderId=599FA68E-4C92-45AD-A10D-58875E5D596D, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:31:40] [CELL_UPLOAD] → not my message, setting complete
[21:31:40] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=e75a4dfe36e48d00.jpg, overlayExists=true
[21:31:40] [CELL_UPLOAD] configure: msgId=824, file=08fdc161309680e2.jpg, senderId=599FA68E-4C92-45AD-A10D-58875E5D596dDD, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:31:40] [CELL_UPLOAD] → not my message, setting complete
[21:31:40] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=08fdc161309680e2.jpg, overlayExists=true
[21:31:40] [CELL_UPLOAD] configure: msgId=830, file=0594af535b2841c4.jpg, senderId=599FA68E-4C92-45AD-A10D-58875E5D596D, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:31:40] [CELL_UPLOAD] → not my message, setting complete
[21:31:40] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=0594af535b2841c4.jpg, overlayExists=true
[21:31:40] [CELL_UPLOAD] configure: msgId=640, file=e1d06c52c18e20ce.jpg, senderId=599FA68E-4C92-45AD-A10D-58875E5D596dDD, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:31:40] [CELL_UPLOAD] → not my message, setting complete
[21:31:40] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=e1d06c52c18e20ce.jpg, overlayExists=true
[21:31:40] DOWNLOADIIING t_f4d9bbe2fc21d5ae.jpg
[21:31:40] DOWNLOADIIING f4d9bbe2fc21d5ae.mov
[21:31:40] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[21:31:40] DOWNLOADIIING 66e5f4c7c82fef18.heic
[21:31:40] DOWNLOADIIING t_7f3c34ff05eb7c95.jpg
[21:31:40] DOWNLOADIIING 7f3c34ff05eb7c95.jpg
[21:31:40] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=e1d06c52c18e20ce.jpg, overlayExists=true
[21:31:42] [MEDIA_DOWNLOAD] ✅ f4d9bbe2fc21d5ae.mov complete
[21:31:42] [PUSH] Silent push received
[21:31:42] [PUSH_EMBED] No embedded message_data in notification
[21:31:42] [PUSH] No embedded data, pre-loading messages from server
[21:31:42] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:42] [PUSH] Silent push received
[21:31:42] [PUSH_EMBED] No embedded message_data in notification
[21:31:42] [PUSH] No embedded data, pre-loading messages from server
[21:31:42] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:42] [PUSH] Silent push received
[21:31:42] [PUSH_EMBED] No embedded message_data in notification
[21:31:42] [PUSH] No embedded data, pre-loading messages from server
[21:31:42] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:43] [PUSH] Silent push received
[21:31:43] [PUSH_EMBED] No embedded message_data in notification
[21:31:43] [PUSH] No embedded data, pre-loading messages from server
[21:31:43] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:43] [PUSH] Silent push received
[21:31:43] [PUSH_EMBED] No embedded message_data in notification
[21:31:43] [PUSH] No embedded data, pre-loading messages from server
[21:31:43] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:43] [CLIENT_SIG] Event received: type=3 messageId=663
[21:31:43] [WS_EVENT] Received event: type=3, messageId=663
[21:31:43] [WS_EVENT] Read receipt for message 663 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:43] [TIMER] Timer 934 already played - skipping
[21:31:43] [CLIENT_SIG] Event received: type=3 messageId=662
[21:31:43] [WS_EVENT] Received event: type=3, messageId=662
[21:31:43] [WS_EVENT] Read receipt for message 662 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:43] [TIMER] Timer 934 already played - skipping
[21:31:43] [CLIENT_SIG] Event received: type=3 messageId=665
[21:31:43] [WS_EVENT] Received event: type=3, messageId=665
[21:31:43] [WS_EVENT] Read receipt for message 665 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:43] [TIMER] Timer 934 already played - skipping
[21:31:43] [CLIENT_SIG] Event received: type=3 messageId=664
[21:31:43] [WS_EVENT] Received event: type=3, messageId=664
[21:31:43] [WS_EVENT] Read receipt for message 664 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:43] [TIMER] Timer 934 already played - skipping
[21:31:43] [CLIENT_SIG] Event received: type=3 messageId=667
[21:31:43] [WS_EVENT] Received event: type=3, messageId=667
[21:31:43] [WS_EVENT] Read receipt for message 667 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:43] [TIMER] Timer 934 already played - skipping
[21:31:43] [PUSH] Silent push received
[21:31:43] [PUSH_EMBED] No embedded message_data in notification
[21:31:43] [PUSH] No embedded data, pre-loading messages from server
[21:31:43] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:44] [CLIENT_SIG] Event received: type=3 messageId=697
[21:31:44] [WS_EVENT] Received event: type=3, messageId=697
[21:31:44] [WS_EVENT] Read receipt for message 697 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:44] [TIMER] Timer 934 already played - skipping
[21:31:44] [SEARCH] 🔄 Returning to newest messages (had 500 messages loaded)
[21:31:44] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:31:44] [SEARCH] ✅ Reloaded 50 newest messages
[21:31:45] [PUSH] Silent push received
[21:31:45] [PUSH_EMBED] No embedded message_data in notification
[21:31:45] [PUSH] No embedded data, pre-loading messages from server
[21:31:45] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:45] [PUSH] Silent push received
[21:31:45] [PUSH_EMBED] No embedded message_data in notification
[21:31:45] [PUSH] No embedded data, pre-loading messages from server
[21:31:45] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:45] [PUSH] Silent push received
[21:31:45] [PUSH_EMBED] No embedded message_data in notification
[21:31:45] [PUSH] No embedded data, pre-loading messages from server
[21:31:45] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:45] [PUSH] Silent push received
[21:31:45] [PUSH_EMBED] No embedded message_data in notification
[21:31:45] [PUSH] No embedded data, pre-loading messages from server
[21:31:45] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:45] [PUSH] Silent push received
[21:31:45] [PUSH_EMBED] No embedded message_data in notification
[21:31:45] [PUSH] No embedded data, pre-loading messages from server
[21:31:45] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:45] [CLIENT_SIG] Event received: type=3 messageId=698
[21:31:45] [WS_EVENT] Received event: type=3, messageId=698
[21:31:45] [WS_EVENT] Read receipt for message 698 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:45] [CLIENT_SIG] Event received: type=3 messageId=699
[21:31:45] [WS_EVENT] Received event: type=3, messageId=699
[21:31:45] [WS_EVENT] Read receipt for message 699 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:45] [CLIENT_SIG] Event received: type=3 messageId=700
[21:31:45] [WS_EVENT] Received event: type=3, messageId=700
[21:31:45] [WS_EVENT] Read receipt for message 700 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:45] [CLIENT_SIG] Event received: type=3 messageId=701
[21:31:45] [WS_EVENT] Received event: type=3, messageId=701
[21:31:45] [WS_EVENT] Read receipt for message 701 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:45] [CLIENT_SIG] Event received: type=3 messageId=703
[21:31:45] [WS_EVENT] Received event: type=3, messageId=703
[21:31:45] [WS_EVENT] Read receipt for message 703 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:45] [PUSH] Silent push received
[21:31:45] [PUSH_EMBED] No embedded message_data in notification
[21:31:45] [PUSH] No embedded data, pre-loading messages from server
[21:31:45] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:46] [CLIENT_SIG] Event received: type=3 messageId=704
[21:31:46] [WS_EVENT] Received event: type=3, messageId=704
[21:31:46] [WS_EVENT] Read receipt for message 704 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:47] [MENU] dismissAnyExistingMenu called
[21:31:47] [MENU] dismissAnyExistingMenu completed
[21:31:47] [PUSH] Silent push received
[21:31:47] [PUSH_EMBED] No embedded message_data in notification
[21:31:47] [PUSH] No embedded data, pre-loading messages from server
[21:31:47] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:47] [PUSH] Silent push received
[21:31:47] [PUSH_EMBED] No embedded message_data in notification
[21:31:47] [PUSH] No embedded data, pre-loading messages from server
[21:31:47] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:47] [PUSH] Silent push received
[21:31:47] [PUSH_EMBED] No embedded message_data in notification
[21:31:47] [PUSH] No embedded data, pre-loading messages from server
[21:31:47] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:47] [PUSH] Silent push received
[21:31:47] [PUSH_EMBED] No embedded message_data in notification
[21:31:47] [PUSH] No embedded data, pre-loading messages from server
[21:31:47] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:47] [PUSH] Silent push received
[21:31:47] [PUSH_EMBED] No embedded message_data in notification
[21:31:47] [PUSH] No embedded data, pre-loading messages from server
[21:31:47] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:47] [CLIENT_SIG] Event received: type=3 messageId=705
[21:31:47] [WS_EVENT] Received event: type=3, messageId=705
[21:31:47] [WS_EVENT] Read receipt for message 705 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:47] [CLIENT_SIG] Event received: type=3 messageId=706
[21:31:47] [WS_EVENT] Received event: type=3, messageId=706
[21:31:47] [WS_EVENT] Read receipt for message 706 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:47] [CLIENT_SIG] Event received: type=3 messageId=707
[21:31:47] [WS_EVENT] Received event: type=3, messageId=707
[21:31:47] [WS_EVENT] Read receipt for message 707 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:47] [CLIENT_SIG] Event received: type=3 messageId=709
[21:31:47] [WS_EVENT] Received event: type=3, messageId=709
[21:31:47] [WS_EVENT] Read receipt for message 709 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:47] [CLIENT_SIG] Event received: type=3 messageId=708
[21:31:47] [WS_EVENT] Received event: type=3, messageId=708
[21:31:47] [WS_EVENT] Read receipt for message 708 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:47] [SCROLL_BTN] Showing button - 298pt from bottom > half 223pt
[21:31:47] [PUSH] Silent push received
[21:31:47] [PUSH_EMBED] No embedded message_data in notification
[21:31:47] [PUSH] No embedded data, pre-loading messages from server
[21:31:47] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:48] [CLIENT_SIG] Event received: type=3 messageId=710
[21:31:48] [WS_EVENT] Received event: type=3, messageId=710
[21:31:48] [WS_EVENT] Read receipt for message 710 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:48] [MENU] dismissAnyExistingMenu called
[21:31:48] [MENU] dismissAnyExistingMenu completed
[21:31:49] [REFRESH_ALL] 🔄 refreshAllFromServer called from: editMessage, currentMsgCount=50
[21:31:49] [REFRESH_ALL] 📸 Captured 50 message IDs before request
[21:31:49] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:31:49] [PUSH] Silent push received
[21:31:49] [PUSH_EMBED] No embedded message_data in notification
[21:31:49] [PUSH] No embedded data, pre-loading messages from server
[21:31:49] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:49] [PUSH] Silent push received
[21:31:49] [PUSH_EMBED] No embedded message_data in notification
[21:31:49] [PUSH] No embedded data, pre-loading messages from server
[21:31:49] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:49] [PUSH] Silent push received
[21:31:49] [PUSH_EMBED] No embedded message_data in notification
[21:31:49] [PUSH] No embedded data, pre-loading messages from server
[21:31:49] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:49] [PUSH] Silent push received
[21:31:49] [PUSH_EMBED] No embedded message_data in notification
[21:31:49] [PUSH] No embedded data, pre-loading messages from server
[21:31:49] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:49] [PUSH] Silent push received
[21:31:49] [PUSH_EMBED] No embedded message_data in notification
[21:31:49] [PUSH] No embedded data, pre-loading messages from server
[21:31:49] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:49] [CLIENT_SIG] Event received: type=3 messageId=717
[21:31:49] [WS_EVENT] Received event: type=3, messageId=717
[21:31:49] [WS_EVENT] Read receipt for message 717 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:49] [CLIENT_SIG] Event received: type=3 messageId=716
[21:31:49] [WS_EVENT] Received event: type=3, messageId=716
[21:31:49] [WS_EVENT] Read receipt for message 716 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:49] [CLIENT_SIG] Event received: type=3 messageId=718
[21:31:49] [WS_EVENT] Received event: type=3, messageId=718
[21:31:49] [WS_EVENT] Read receipt for message 718 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:49] [CLIENT_SIG] Event received: type=3 messageId=719
[21:31:49] [WS_EVENT] Received event: type=3, messageId=719
[21:31:49] [WS_EVENT] Read receipt for message 719 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [CLIENT_SIG] Event received: type=3 messageId=720
[21:31:49] [WS_EVENT] Received event: type=3, messageId=720
[21:31:49] [WS_EVENT] Read receipt for message 720 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:49] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:49] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:50] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:50] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:50] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:50] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:50] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:50] [PUSH] Silent push received
[21:31:50] [PUSH_EMBED] No embedded message_data in notification
[21:31:50] [PUSH] No embedded data, pre-loading messages from server
[21:31:50] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:31:50] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:50] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:50] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:50] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:50] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:50] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:50] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 662]
[21:31:50] [PUSH] Parsed message_id: 662
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=662
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=662
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 664, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3]
[21:31:50] [PUSH] Parsed message_id: 664
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=664
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=664
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 665, AnyHashable("session_id"): ILUIWU]
[21:31:50] [PUSH] Parsed message_id: 665
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=665
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=665
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("message_id"): 663, AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    "content-available" = 1;
}]
[21:31:50] [PUSH] Parsed message_id: 663
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=663
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=663
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 667, AnyHashable("aps"): {
    "content-available" = 1;
}]
[21:31:50] [PUSH] Parsed message_id: 667
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=667
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=667
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 699, AnyHashable("session_id"): ILUIWU]
[21:31:50] [PUSH] Parsed message_id: 699
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=699
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=699
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 700]
[21:31:50] [PUSH] Parsed message_id: 700
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=700
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=700
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 697, AnyHashable("aps"): {
    "content-available" = 1;
}]
[21:31:50] [PUSH] Parsed message_id: 697
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=697
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=697
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 701]
[21:31:50] [PUSH] Parsed message_id: 701
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=701
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=701
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 698, AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3]
[21:31:50] [PUSH] Parsed message_id: 698
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=698
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=698
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 705]
[21:31:50] [PUSH] Parsed message_id: 705
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=705
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=705
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 706, AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU]
[21:31:50] [PUSH] Parsed message_id: 706
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=706
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=706
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("message_id"): 703, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU]
[21:31:50] [PUSH] Parsed message_id: 703
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=703
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=703
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 704]
[21:31:50] [PUSH] Parsed message_id: 704
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=704
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=704
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 709, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU]
[21:31:50] [PUSH] Parsed message_id: 709
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=709
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=709
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("message_id"): 708, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU]
[21:31:50] [PUSH] Parsed message_id: 708
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=708
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=708
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 707, AnyHashable("session_id"): ILUIWU]
[21:31:50] [PUSH] Parsed message_id: 707
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=707
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=707
[21:31:50] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:50] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 717, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU]
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] Parsed message_id: 717
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=717
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=717
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 710, AnyHashable("session_id"): ILUIWU]
[21:31:50] [PUSH] Parsed message_id: 710
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=710
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=710
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 719, AnyHashable("operation_type"): 3]
[21:31:50] [PUSH] Parsed message_id: 719
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=719
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=719
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 718, AnyHashable("session_id"): ILUIWU]
[21:31:50] [PUSH] Parsed message_id: 718
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=718
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=718
[21:31:50] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:50] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:50] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:31:50] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("message_id"): 716]
[21:31:50] [PUSH] Parsed message_id: 716
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=716
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=716
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 720, AnyHashable("session_id"): ILUIWU, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3]
[21:31:50] [PUSH] Parsed message_id: 720
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=720
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=720
[21:31:50] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:31:50] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 721, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("operation_type"): 3]
[21:31:50] [PUSH] Parsed message_id: 721
[21:31:50] [PUSH] Parsed operation_type: 3
[21:31:50] [PUSH] Taking direct action: opType=3, messageId=721
[21:31:50] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=721
[21:31:50] [CLIENT_SIG] Event received: type=3 messageId=721
[21:31:50] [WS_EVENT] Received event: type=3, messageId=721
[21:31:50] [WS_EVENT] Read receipt for message 721 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:31:50] [PENDING_UPLOAD] Total pending upload messages: 0
[21:31:50] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[21:31:50] [TIMER] Preserving 4 played timer IDs before DB refresh
[21:31:50] [TIMER] Restored 4 played timer flags after DB refresh
[21:31:50] DOWNLOADIIING t_A838C8A7-6ACB-4EC0-8A9C-B457DDC4006E.jpg
[21:31:50] DOWNLOADIIING t_203DADEC-DEED-4A33-908B-8F8E344461B1.jpg
[21:31:51] DOWNLOADIIING t_1b1a78050ebe099b.jpg
[21:31:51] DOWNLOADIIING t_bae538c2a3076c11.jpg
[21:31:51] DOWNLOADIIING t_ee42d57ffd8ab767.jpg
[21:31:51] DOWNLOADIIING t_5cfd84d52271d308.jpg
[21:31:51] DOWNLOADIIING t_919f4df51be24b2c.jpg
[21:31:51] DOWNLOADIIING t_0f2dda66cccdeadf.jpg
[21:31:51] DOWNLOADIIING t_32675c319a37fee7.jpg
[21:31:51] DOWNLOADIIING t_a45f085b5a2c50aa.jpg
[21:31:51] DOWNLOADIIING t_7cd3ce3d7797eb3c.jpg
[21:31:51] DOWNLOADIIING t_abb65f630e55dc61.jpg
[21:31:51] DOWNLOADIIING t_2a4c7380908d6595.jpg
[21:31:51] DOWNLOADIIING t_1ee77a72ee5013e0.jpg
[21:31:51] DOWNLOADIIING t_02f48c94671cc64e.jpg
[21:31:51] DOWNLOADIIING t_d0fd8cabebf807d5.jpg
[21:31:51] DOWNLOADIIING t_364b0669ed2f3378.jpg
[21:31:51] DOWNLOADIIING t_722d39e0d91dd954.jpg
[21:31:51] DOWNLOADIIING t_97828ef5de49a612.jpg
[21:31:51] DOWNLOADIIING t_98986cbb2cd2ae48.jpg
[21:31:51] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7244
[21:31:51] [REFRESH_ALL] 📊 Server returned 7244 messages
[21:31:51] [REFRESH_ALL] 📊 Final merge: server=7244, preserved=0, total=7244
[21:31:51] [REFRESH_ALL] 📊 Displaying 50 of 7244 messages, hasMore=true
[21:31:51] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:31:52] [MENU] dismissAnyExistingMenu called
[21:31:52] [MENU] dismissAnyExistingMenu completed
[21:31:53] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[21:31:53] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:31:59] [MENU] dismissAnyExistingMenu called
[21:31:59] [MENU] dismissAnyExistingMenu completed
[21:31:59] [SCROLL_BTN] Showing button - 406pt from bottom > half 379pt
[21:31:59] [MENU] dismissAnyExistingMenu called
[21:31:59] [MENU] dismissAnyExistingMenu completed
[21:31:59] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:31:59] [CELL_UPLOAD] → not my message, setting complete
[21:31:59] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:31:59] [MENU] dismissAnyExistingMenu called
[21:31:59] [MENU] dismissAnyExistingMenu completed
[21:32:00] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=true
[21:32:00] [GIF] msgId=18430 globally completed - showing static frame
[21:32:00] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:32:00] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:32:00] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:32:00] [MENU] dismissAnyExistingMenu called
[21:32:00] [MENU] dismissAnyExistingMenu completed
[21:32:00] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:32:00] [PAGINATION] 📜 Loading 50 older messages, firstVisibleRow=0, oldOffset=-56.0
[21:32:00] [PAGINATION] 📜 Total now: 100
[21:32:00] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=100, first5Ids=[18379, 18380, 18381, 18382, 18383]
[21:32:00] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:00] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:32:00] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:32:00] [PAGINATION] 📜 newHeight=9871.0, heightDiff=5051.0, newOffset=4995.0
[21:32:00] [PAGINATION] 📜 After setContentOffset, actual offset=4995.0
[21:32:00] [PAGINATION] 📜 After main queue, offset=4995.0
[21:32:00] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:00] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:32:00] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:32:00] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=true
[21:32:00] [GIF] msgId=18430 globally completed - showing static frame
[21:32:00] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:32:00] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:32:00] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:32:00] [MENU] dismissAnyExistingMenu called
[21:32:00] [MENU] dismissAnyExistingMenu completed
[21:32:01] [MENU] dismissAnyExistingMenu called
[21:32:01] [MENU] dismissAnyExistingMenu completed
[21:32:01] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:01] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:32:01] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:32:01] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:01] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:32:01] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:32:01] [MENU] dismissAnyExistingMenu called
[21:32:01] [MENU] dismissAnyExistingMenu completed
[21:32:02] [SEARCH] 🔄 Returning to newest messages (had 100 messages loaded)
[21:32:02] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:32:02] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:02] [CELL_UPLOAD] → not my message, setting complete
[21:32:02] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:32:02] [SEARCH] ✅ Reloaded 50 newest messages
[21:32:02] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:02] [CELL_UPLOAD] → not my message, setting complete
[21:32:02] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:32:03] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:32:03] [PAGINATION] 📜 Loading 50 older messages, firstVisibleRow=9, oldOffset=1215.3333333333333
[21:32:03] [PAGINATION] 📜 Total now: 100
[21:32:03] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=100, first5Ids=[18379, 18380, 18381, 18382, 18383]
[21:32:03] [PAGINATION] 📜 newHeight=9731.0, heightDiff=5051.0, newOffset=6266.333333333333
[21:32:03] [SCROLL_BTN] Showing button - 2706pt from bottom > half 379pt
[21:32:03] [PAGINATION] 📜 After setContentOffset, actual offset=6266.333333333333
[21:32:03] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:03] [CELL_UPLOAD] → not my message, setting complete
[21:32:03] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:32:03] [PAGINATION] 📜 After main queue, offset=6266.333333333333
[21:32:06] [MENU] dismissAnyExistingMenu called
[21:32:06] [MENU] dismissAnyExistingMenu completed
[21:32:07] [SEARCH] 🔄 Returning to newest messages (had 100 messages loaded)
[21:32:07] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:32:07] [SEARCH] ✅ Reloaded 50 newest messages
[21:32:14] [MENU] dismissAnyExistingMenu called
[21:32:14] [MENU] dismissAnyExistingMenu completed
[21:32:15] [SCROLL_BTN] Showing button - 387pt from bottom > half 379pt
[21:32:16] [MENU] dismissAnyExistingMenu called
[21:32:16] [MENU] dismissAnyExistingMenu completed
[21:32:17] [MENU] dismissAnyExistingMenu called
[21:32:17] [MENU] dismissAnyExistingMenu completed
[21:32:17] [SCROLL_BTN] Showing button - 252pt from bottom > half 223pt
[21:32:18] [MENU] dismissAnyExistingMenu called
[21:32:18] [MENU] dismissAnyExistingMenu completed
[21:32:18] [REFRESH_ALL] 🔄 refreshAllFromServer called from: editMessage, currentMsgCount=50
[21:32:18] [REFRESH_ALL] 📸 Captured 50 message IDs before request
[21:32:18] [REFRESH_ALL] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:32:19] [PENDING_UPLOAD] Total pending upload messages: 0
[21:32:19] [PENDING_UPLOAD] Preserved 0 pending messages before server refresh
[21:32:19] [TIMER] Preserving 4 played timer IDs before DB refresh
[21:32:19] [TIMER] Restored 4 played timer flags after DB refresh
[21:32:20] ReloadData 14 (all 42 media thumbnails loaded) - applying tab 0 filtering
[21:32:20] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=7244
[21:32:20] [REFRESH_ALL] 📊 Server returned 7244 messages
[21:32:20] [REFRESH_ALL] 📊 Final merge: server=7244, preserved=0, total=7244
[21:32:20] [REFRESH_ALL] 📊 Displaying 50 of 7244 messages, hasMore=true
[21:32:20] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:32:20] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:32:21] [TAP_REPLAY] 🔄 replayEvolutionAnimation called for messageId=18472
[21:32:21] [TAP_REPLAY] 📦 Found message: text.count=13, evolutionData.isEmpty=true
[21:32:21] [TAP_REPLAY] 📡 No local evolution data - fetching from server
[21:32:21] [TAP_REPLAY] 🔍 Server response keys: ["created_at", "evolution", "has_evolution", "message_id", "ok"]
[21:32:21] [TAP_REPLAY] ✅ Successfully fetched 23 events from server - calling playEvolutionInline
[21:32:21] [EVOLUTION] 🎬 playEvolutionInline called for message 18472 with 23 events
[21:32:21] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:21] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:21] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:21] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText=' ', text='Please baby😏😏'
[21:32:21] [UPDATE_CELL] ✅ Updating ChatCell label to: ' '
[21:32:22] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:22] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:22] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:22] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='P', text='Please baby😏😏'
[21:32:22] [UPDATE_CELL] ✅ Updating ChatCell label to: 'P'
[21:32:22] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:22] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:22] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:22] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Pl', text='Please baby😏😏'
[21:32:22] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Pl'
[21:32:22] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:22] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:22] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:22] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Ple', text='Please baby😏😏'
[21:32:22] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Ple'
[21:32:22] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:22] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:22] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:22] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Plea', text='Please baby😏😏'
[21:32:22] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Plea'
[21:32:23] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:23] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:23] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:23] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Pleaa', text='Please baby😏😏'
[21:32:23] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Pleaa'
[21:32:23] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:23] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:23] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:23] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Pleaae', text='Please baby😏😏'
[21:32:23] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Pleaae'
[21:32:23] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:23] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:23] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:23] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Pleaae ', text='Please baby😏😏'
[21:32:23] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Pleaae '
[21:32:23] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:23] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:23] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:23] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Pleaae', text='Please baby😏😏'
[21:32:23] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Pleaae'
[21:32:23] [MENU] dismissAnyExistingMenu called
[21:32:23] [MENU] dismissAnyExistingMenu completed
[21:32:23] [SCROLL_BTN] Showing button - 445pt from bottom > half 379pt
[21:32:24] [MENU] dismissAnyExistingMenu called
[21:32:24] [MENU] dismissAnyExistingMenu completed
[21:32:24] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:24] [CELL_UPLOAD] → not my message, setting complete
[21:32:24] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:32:24] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=true
[21:32:24] [GIF] msgId=18430 globally completed - showing static frame
[21:32:24] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:32:24] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:32:24] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:32:24] [MENU] dismissAnyExistingMenu called
[21:32:24] [MENU] dismissAnyExistingMenu completed
[21:32:25] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:32:25] [PAGINATION] 📜 Loading 50 older messages, firstVisibleRow=0, oldOffset=-50.0
[21:32:25] [PAGINATION] 📜 Total now: 100
[21:32:25] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=100, first5Ids=[18379, 18380, 18381, 18382, 18383]
[21:32:25] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:25] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:32:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:32:25] [PAGINATION] 📜 newHeight=9871.0, heightDiff=5051.0, newOffset=5001.0
[21:32:25] [PAGINATION] 📜 After setContentOffset, actual offset=5001.0
[21:32:25] [PAGINATION] 📜 After main queue, offset=5001.0
[21:32:25] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:25] [UPDATE_CELL] Initial targetRowIndex=94
[21:32:25] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:25] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Pleaa', text='Please baby😏😏'
[21:32:25] [UPDATE_CELL] ⚠️ Cell at row 94 not visible - skipping update
[21:32:25] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:25] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:32:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:32:25] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=true
[21:32:25] [GIF] msgId=18430 globally completed - showing static frame
[21:32:25] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:32:25] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:32:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:32:25] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:25] [UPDATE_CELL] Initial targetRowIndex=94
[21:32:25] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:25] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Plea', text='Please baby😏😏'
[21:32:25] [UPDATE_CELL] ⚠️ Cell at row 94 not visible - skipping update
[21:32:25] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:25] [UPDATE_CELL] Initial targetRowIndex=94
[21:32:25] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:25] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Pleas', text='Please baby😏😏'
[21:32:25] [UPDATE_CELL] ⚠️ Cell at row 94 not visible - skipping update
[21:32:25] [MENU] dismissAnyExistingMenu called
[21:32:25] [MENU] dismissAnyExistingMenu completed
[21:32:25] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:25] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:32:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:32:26] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:26] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:32:26] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:32:26] [MENU] dismissAnyExistingMenu called
[21:32:26] [MENU] dismissAnyExistingMenu completed
[21:32:27] [MENU] dismissAnyExistingMenu called
[21:32:27] [MENU] dismissAnyExistingMenu completed
[21:32:27] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:32:27] [PAGINATION] 📜 Loading 50 older messages, firstVisibleRow=6, oldOffset=654.6666666666666
[21:32:27] [PAGINATION] 📜 Total now: 150
[21:32:27] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=150, first5Ids=[18329, 18330, 18331, 18332, 18333]
[21:32:27] [CELL_UPLOAD] configure: msgId=18338, file=587faef97c05d266.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:27] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:32:27] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=587faef97c05d266.jpg, overlayExists=true
[21:32:27] [CELL_UPLOAD] configure: msgId=18340, file=a4f205035ad487c7.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:27] [CELL_UPLOAD] → not my message, setting complete
[21:32:27] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=a4f205035ad487c7.jpg, overlayExists=true
[21:32:27] [PAGINATION] 📜 newHeight=14940.0, heightDiff=5069.0, newOffset=5723.666666666667
[21:32:27] [PAGINATION] 📜 After setContentOffset, actual offset=5723.666666666667
[21:32:27] [PAGINATION] 📜 After main queue, offset=651.0
[21:32:27] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:27] [UPDATE_CELL] Initial targetRowIndex=144
[21:32:27] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:27] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Please', text='Please baby😏😏'
[21:32:27] [UPDATE_CELL] ⚠️ Cell at row 144 not visible - skipping update
[21:32:27] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:27] [UPDATE_CELL] Initial targetRowIndex=144
[21:32:27] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:27] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Please ', text='Please baby😏😏'
[21:32:27] [UPDATE_CELL] ⚠️ Cell at row 144 not visible - skipping update
[21:32:27] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:27] [UPDATE_CELL] Initial targetRowIndex=144
[21:32:27] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:27] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Please', text='Please baby😏😏'
[21:32:27] [UPDATE_CELL] ⚠️ Cell at row 144 not visible - skipping update
[21:32:27] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:32:27] [PAGINATION] 📜 Loading 50 older messages, firstVisibleRow=5, oldOffset=651.0
[21:32:27] [PAGINATION] 📜 Total now: 200
[21:32:27] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=200, first5Ids=[18278, 18279, 18280, 18281, 18282]
[21:32:27] [CELL_UPLOAD] configure: msgId=18282, file=5b09a034a7f26203.png, senderId=EYE-SYSTEM-00000000-0000-0000-0000-000000000000, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:27] [CELL_UPLOAD] → not my message, setting complete
[21:32:27] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=5b09a034a7f26203.png, overlayExists=true
[21:32:28] [CELL_UPLOAD] configure: msgId=18285, file=37654be40c253c4f.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:28] [CELL_UPLOAD] → not my message, setting complete
[21:32:28] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=37654be40c253c4f.jpg, overlayExists=true
[21:32:28] [PAGINATION] 📜 newHeight=21198.75, heightDiff=6258.75, newOffset=6909.75
[21:32:28] [PAGINATION] 📜 After setContentOffset, actual offset=6909.666666666667
[21:32:28] [CELL_UPLOAD] configure: msgId=18338, file=587faef97c05d266.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:28] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:32:28] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=587faef97c05d266.jpg, overlayExists=true
[21:32:28] [CELL_UPLOAD] configure: msgId=18340, file=a4f205035ad487c7.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:32:28] [CELL_UPLOAD] → not my message, setting complete
[21:32:28] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=a4f205035ad487c7.jpg, overlayExists=true
[21:32:28] [PAGINATION] 📜 After main queue, offset=6909.666666666667
[21:32:28] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:28] [UPDATE_CELL] Initial targetRowIndex=196
[21:32:28] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:28] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Please ', text='Please baby😏😏'
[21:32:28] [UPDATE_CELL] ⚠️ Cell at row 196 not visible - skipping update
[21:32:28] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:28] [UPDATE_CELL] Initial targetRowIndex=196
[21:32:28] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:28] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Please b', text='Please baby😏😏'
[21:32:28] [UPDATE_CELL] ⚠️ Cell at row 196 not visible - skipping update
[21:32:28] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:28] [UPDATE_CELL] Initial targetRowIndex=196
[21:32:28] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:28] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Please ba', text='Please baby😏😏'
[21:32:28] [UPDATE_CELL] ⚠️ Cell at row 196 not visible - skipping update
[21:32:29] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:29] [UPDATE_CELL] Initial targetRowIndex=196
[21:32:29] [UPDATE_CELL] ⚡ Updated chatRows in place (evolution mode)
[21:32:29] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=true, evolutionText='Please bay', text='Please baby😏😏'
[21:32:29] [UPDATE_CELL] ⚠️ Cell at row 196 not visible - skipping update
[21:32:29] [SEARCH] 🔄 Returning to newest messages (had 200 messages loaded)
[21:32:29] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:32:29] [SEARCH] ✅ Reloaded 50 newest messages
[21:32:29] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:29] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:29] [UPDATE_CELL] Rebuilt chatRows, count=51
[21:32:29] [UPDATE_CELL] After rebuild targetRowIndex=44
[21:32:29] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=false, evolutionText='Please ba', text='Please baby😏😏'
[21:32:29] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Please baby😏😏'
[21:32:29] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:29] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:29] [UPDATE_CELL] Rebuilt chatRows, count=51
[21:32:29] [UPDATE_CELL] After rebuild targetRowIndex=44
[21:32:29] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=false, evolutionText='Please bab', text='Please baby😏😏'
[21:32:29] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Please baby😏😏'
[21:32:29] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:29] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:29] [UPDATE_CELL] Rebuilt chatRows, count=51
[21:32:29] [UPDATE_CELL] After rebuild targetRowIndex=44
[21:32:29] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=false, evolutionText='Please baby', text='Please baby😏😏'
[21:32:29] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Please baby😏😏'
[21:32:30] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:30] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:30] [UPDATE_CELL] Rebuilt chatRows, count=51
[21:32:30] [UPDATE_CELL] After rebuild targetRowIndex=44
[21:32:30] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=false, evolutionText='Please baby😏', text='Please baby😏😏'
[21:32:30] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Please baby😏😏'
[21:32:31] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:31] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:31] [UPDATE_CELL] Rebuilt chatRows, count=51
[21:32:31] [UPDATE_CELL] After rebuild targetRowIndex=44
[21:32:31] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=false, evolutionText='Please baby😏😏', text='Please baby😏😏'
[21:32:31] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Please baby😏😏'
[21:32:31] [UPDATE_CELL] 🔍 updateMessageCell called for message 18472
[21:32:31] [UPDATE_CELL] Initial targetRowIndex=44
[21:32:31] [UPDATE_CELL] Rebuilt chatRows, count=51
[21:32:31] [UPDATE_CELL] After rebuild targetRowIndex=44
[21:32:31] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=false, evolutionText='Please baby😏😏', text='Please baby😏😏'
[21:32:31] [UPDATE_CELL] ✅ Updating ChatCell label to: 'Please baby😏😏'
[21:32:31] [EVOLUTION] ✅ Animation complete for message 18472 - marking as read now
[21:35:38] [CRASH] Previous session did not exit cleanly - crash detected
[21:35:38] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:35:38] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:35:38] [GIPHY] SDK not available - using REST API fallback
[21:35:38] [BACKGROUND] Background fetch enabled
[21:35:38] [AUTH] Starting PIN authentication
[21:35:38] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:35:38] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:35:38] [CLEANUP] ✅ Deleted 4 timer messages older than 24h
[21:35:38] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:35:38] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:35:38] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:35:38] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:35:38] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:35:38] [USER] ✅ User registered successfully
[21:35:38] [PUSH] User registration after token update: success
[21:35:38] [CLIENT_SIG] WebSocket opened
[21:35:38] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:35:38] [CLIENT_SIG] Connected! clientId=Qr5tZsWiHiuB4Twm
[21:35:38] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:35:38] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:35:38] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18478)...
[21:35:38] [PRELOAD] No messages or parse error
[21:35:42] [PIN_AUTH] Correct PIN
[21:35:42] [SECURITY] Restored real session: ILUIWU
[21:35:42] [SECURITY] Restored real session: ILUIWU
[21:35:42] [SECURITY] Saved real session: ILUIWU
[21:35:42] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:35:42] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:35:42] Documents Directory: /var/mobile/Containers/Data/Application/50923808-4F84-4B10-8BC3-969FC4903B19/Documents
[21:35:42] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:35:42] [THEME] Applying current theme
[21:35:42] [CHAT] Applied day theme (mode: day)
[21:35:42] [SECURITY] Saved real session: ILUIWU
[21:35:42] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:35:42] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:35:42] [NETWORK] Network monitor started
[21:35:42] [NETWORK] Status changed: connected
[21:35:42] Did transition
[21:35:42] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:35:42] [VIEWER] Screen lock enabled - normal idle behavior
[21:35:42] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:35:42] [VCC] ========== VideoConnectionClass INIT ==========
[21:35:42] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:35:42] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:35:42] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:35:42] [DATA AUDIO] Creating encoder/decoder factories...
[21:35:42] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:35:42] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:35:42] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:35:42] [DATA AUDIO] ✅ Factory created
[21:35:42] [DATA AUDIO] RTCAudioSession locked
[21:35:42] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:35:42] [DATA AUDIO] RTCAudioSession unlocked
[21:35:42] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:35:42] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:35:42] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:35:42] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:35:42] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:35:42] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:35:42] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:35:42] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:35:42] Did transition
[21:35:42] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:35:42] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:35:42] [CHUNK] Merged 880 reactions synchronously
[21:35:42] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:35:42] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:35:42] [MIGRATION] No messages need sender_name backfill
[21:35:42] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:35:42] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:35:42] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:35:42] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:35:43] [GALLERY_DB] ✅ Loaded 477 media messages
[21:35:43] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18478
[21:35:43] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:35:43] [GALLERY] First 5 after sort (newest first):
[21:35:43] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:35:43] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:35:43] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:35:43] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:35:43] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:35:43] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:35:43] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:35:43] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:35:43] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[21:35:43] [GIF] msgId=18430 START fresh animation
[21:35:43] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:35:43] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:35:43] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:35:43] [SERVER] Starting reconnect polling (5s interval)
[21:35:43] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:35:43] [ICONS] Offset applied: -14.6
[21:35:43] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:35:43] [ICONS] Chat center: (31.2, 87.0)
[21:35:43] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:35:43] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:35:43] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:35:43] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:35:43] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:35:43] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:35:43] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:35:43] [ICONS] Screen width: 440.0
[21:35:43] [USER] ✅ User registered successfully
[21:35:43] [USER] User registration successful
[21:35:43] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:35:43] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:35:43] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:35:43] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:35:43] new_session POST ok: token len=157
[21:35:43] HELLO → sent (fetched token, role=query)
[21:35:43] [SIG] hello_ok received for query connection - ready to query agents
[21:35:43] [SIG] get_agents request sent for sessionId=ILUIWU
[21:35:43] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:35:43] [SERVER] Stopped reconnect polling
[21:35:43] [SIG] agents_list received: []
[21:35:43] [SIG] agents_list received: []
[21:35:43] [INCREMENTAL_SYNC] ✅ No new messages
[21:35:43] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:35:43] [UNSENT_RETRY] Checking for unsent messages...
[21:35:43] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:35:43] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:35:43] [UPLOAD_RECOVERY] Session: ILUIWU
[21:35:43] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:35:43] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:35:43] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:35:43] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:35:43] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:35:43] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:35:43] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:35:43] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:35:43] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:35:43] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:35:43] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:35:43] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:35:43] [UPLOAD_RECOVERY] Verifying 10 media files exist on server...
[21:35:43] [PENDING_UPLOAD] Total pending upload messages: 0
[21:35:43] [UNSENT_RETRY] No unsent messages found
[21:35:43] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:35:44] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:35:44] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:35:44] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:35:45] [MENU] dismissAnyExistingMenu called
[21:35:45] [MENU] dismissAnyExistingMenu completed
[21:35:45] [SCROLL_BTN] Showing button - 411pt from bottom > half 379pt
[21:35:45] [MENU] dismissAnyExistingMenu called
[21:35:45] [MENU] dismissAnyExistingMenu completed
[21:35:45] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:45] [CELL_UPLOAD] → not my message, setting complete
[21:35:45] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:35:45] [MENU] dismissAnyExistingMenu called
[21:35:45] [MENU] dismissAnyExistingMenu completed
[21:35:46] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[21:35:46] [GIF] msgId=18430 CONTINUE animation (elapsed=3.016476035118103s)
[21:35:46] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:35:46] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:35:46] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:35:46] [MENU] dismissAnyExistingMenu called
[21:35:46] [MENU] dismissAnyExistingMenu completed
[21:35:46] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:35:46] [PAGINATION] 📜 Loading 50 older messages, firstVisibleRow=0, oldOffset=-95.0
[21:35:46] [PAGINATION] 📜 Total now: 100
[21:35:46] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=100, first5Ids=[18379, 18380, 18381, 18382, 18383]
[21:35:46] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:46] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:35:46] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:35:46] [PAGINATION] 📜 newHeight=9871.0, heightDiff=5051.0, newOffset=4956.0
[21:35:46] [PAGINATION] 📜 After setContentOffset, actual offset=4956.0
[21:35:46] [PAGINATION] 📜 After main queue, offset=4956.0
[21:35:46] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:46] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:35:46] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:35:46] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[21:35:46] [GIF] msgId=18430 CONTINUE animation (elapsed=3.4370760917663574s)
[21:35:46] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:35:46] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:35:46] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:35:46] [MENU] dismissAnyExistingMenu called
[21:35:46] [MENU] dismissAnyExistingMenu completed
[21:35:47] [MENU] dismissAnyExistingMenu called
[21:35:47] [MENU] dismissAnyExistingMenu completed
[21:35:47] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:35:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:35:47] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:35:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:35:47] [MENU] dismissAnyExistingMenu called
[21:35:47] [MENU] dismissAnyExistingMenu completed
[21:35:47] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:35:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:35:48] [MENU] dismissAnyExistingMenu called
[21:35:48] [MENU] dismissAnyExistingMenu completed
[21:35:48] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:35:48] [PAGINATION] 📜 Loading 50 older messages, firstVisibleRow=0, oldOffset=-139.0
[21:35:48] [PAGINATION] 📜 Total now: 150
[21:35:48] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=150, first5Ids=[18329, 18330, 18331, 18332, 18333]
[21:35:48] [CELL_UPLOAD] configure: msgId=18329, file=41e6d3f8b6fc3362.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:48] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:35:48] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41e6d3f8b6fc3362.jpg, overlayExists=true
[21:35:48] [PAGINATION] 📜 newHeight=14940.0, heightDiff=5069.0, newOffset=4930.0
[21:35:48] [PAGINATION] 📜 After setContentOffset, actual offset=4930.0
[21:35:48] [CELL_UPLOAD] configure: msgId=18378, file=7fcf17ed21a942d6.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:48] [CELL_UPLOAD] → not my message, setting complete
[21:35:48] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7fcf17ed21a942d6.jpg, overlayExists=true
[21:35:48] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:48] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:35:48] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:35:48] [PAGINATION] 📜 After main queue, offset=4930.0
[21:35:49] [MENU] dismissAnyExistingMenu called
[21:35:49] [MENU] dismissAnyExistingMenu completed
[21:35:49] [MENU] dismissAnyExistingMenu called
[21:35:49] [MENU] dismissAnyExistingMenu completed
[21:35:50] [SEARCH] 🔄 Returning to newest messages (had 150 messages loaded)
[21:35:50] [CELL_UPLOAD] configure: msgId=18378, file=7fcf17ed21a942d6.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:50] [CELL_UPLOAD] → not my message, setting complete
[21:35:50] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7fcf17ed21a942d6.jpg, overlayExists=true
[21:35:50] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:50] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:35:50] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:35:50] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:50] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:35:50] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:35:50] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:50] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:35:50] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:35:50] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:50] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:35:50] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:35:50] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[21:35:50] [GIF] msgId=18430 CONTINUE animation (elapsed=7.345310091972351s)
[21:35:50] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:35:50] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:35:50] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:35:50] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:35:50] [CELL_UPLOAD] → not my message, setting complete
[21:35:50] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:35:50] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:35:50] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:35:50] [SEARCH] ✅ Reloaded 50 newest messages
[21:36:05] [MENU] dismissAnyExistingMenu called
[21:36:05] [MENU] dismissAnyExistingMenu completed
[21:36:05] [SCROLL_BTN] Showing button - 403pt from bottom > half 379pt
[21:36:05] [MENU] dismissAnyExistingMenu called
[21:36:05] [MENU] dismissAnyExistingMenu completed
[21:36:06] [MENU] dismissAnyExistingMenu called
[21:36:06] [MENU] dismissAnyExistingMenu completed
[21:36:06] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:06] [CELL_UPLOAD] → not my message, setting complete
[21:36:06] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:36:06] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=false owner=false animating=false completed=true
[21:36:06] [GIF] SKIP - same msg, completed
[21:36:06] [MENU] dismissAnyExistingMenu called
[21:36:06] [MENU] dismissAnyExistingMenu completed
[21:36:06] [MENU] dismissAnyExistingMenu called
[21:36:06] [MENU] dismissAnyExistingMenu completed
[21:36:06] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:36:06] [PAGINATION] 📜 Loading 50 older messages, firstVisibleRow=0, oldOffset=-158.66666666666666
[21:36:06] [PAGINATION] 📜 Total now: 100
[21:36:06] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=100, first5Ids=[18379, 18380, 18381, 18382, 18383]
[21:36:06] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:06] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:06] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:36:06] [PAGINATION] 📜 newHeight=9871.0, heightDiff=5051.0, newOffset=4892.333333333333
[21:36:06] [PAGINATION] 📜 After setContentOffset, actual offset=4892.333333333333
[21:36:06] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:06] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:06] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:36:06] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=true
[21:36:06] [GIF] msgId=18430 globally completed - showing static frame
[21:36:06] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:36:06] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:36:06] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:36:06] [PAGINATION] 📜 After main queue, offset=4892.333333333333
[21:36:07] [MENU] dismissAnyExistingMenu called
[21:36:07] [MENU] dismissAnyExistingMenu completed
[21:36:07] [MENU] dismissAnyExistingMenu called
[21:36:07] [MENU] dismissAnyExistingMenu completed
[21:36:07] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:07] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:07] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:36:07] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:07] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:07] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:36:07] [MENU] dismissAnyExistingMenu called
[21:36:07] [MENU] dismissAnyExistingMenu completed
[21:36:07] [MENU] dismissAnyExistingMenu called
[21:36:07] [MENU] dismissAnyExistingMenu completed
[21:36:08] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:08] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:08] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:36:08] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:36:08] [PAGINATION] 📜 Loading 50 older messages, firstVisibleRow=0, oldOffset=-10.0
[21:36:08] [PAGINATION] 📜 Total now: 150
[21:36:08] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=150, first5Ids=[18329, 18330, 18331, 18332, 18333]
[21:36:08] [CELL_UPLOAD] configure: msgId=18329, file=41e6d3f8b6fc3362.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:08] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:08] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41e6d3f8b6fc3362.jpg, overlayExists=true
[21:36:08] [PAGINATION] 📜 newHeight=14940.0, heightDiff=5069.0, newOffset=5059.0
[21:36:08] [PAGINATION] 📜 After setContentOffset, actual offset=5059.0
[21:36:08] [PAGINATION] 📜 After main queue, offset=5059.0
[21:36:08] [CELL_UPLOAD] configure: msgId=18378, file=7fcf17ed21a942d6.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:08] [CELL_UPLOAD] → not my message, setting complete
[21:36:08] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7fcf17ed21a942d6.jpg, overlayExists=true
[21:36:08] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:08] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:08] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:36:08] [MENU] dismissAnyExistingMenu called
[21:36:08] [MENU] dismissAnyExistingMenu completed
[21:36:09] [MENU] dismissAnyExistingMenu called
[21:36:09] [MENU] dismissAnyExistingMenu completed
[21:36:09] [MENU] dismissAnyExistingMenu called
[21:36:09] [MENU] dismissAnyExistingMenu completed
[21:36:09] [CELL_UPLOAD] configure: msgId=18340, file=a4f205035ad487c7.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:09] [CELL_UPLOAD] → not my message, setting complete
[21:36:09] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=a4f205035ad487c7.jpg, overlayExists=true
[21:36:09] [CELL_UPLOAD] configure: msgId=18338, file=587faef97c05d266.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:09] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:09] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=587faef97c05d266.jpg, overlayExists=true
[21:36:10] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:36:10] [PAGINATION] 📜 Loading 50 older messages, firstVisibleRow=4, oldOffset=612.3333333333334
[21:36:10] [PAGINATION] 📜 Total now: 200
[21:36:10] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=200, first5Ids=[18278, 18279, 18280, 18281, 18282]
[21:36:10] [CELL_UPLOAD] configure: msgId=18282, file=5b09a034a7f26203.png, senderId=EYE-SYSTEM-00000000-0000-0000-0000-000000000000, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:10] [CELL_UPLOAD] → not my message, setting complete
[21:36:10] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=5b09a034a7f26203.png, overlayExists=true
[21:36:10] [CELL_UPLOAD] configure: msgId=18285, file=37654be40c253c4f.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:10] [CELL_UPLOAD] → not my message, setting complete
[21:36:10] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=37654be40c253c4f.jpg, overlayExists=true
[21:36:10] [PAGINATION] 📜 newHeight=21198.75, heightDiff=6258.75, newOffset=6871.083333333333
[21:36:10] [PAGINATION] 📜 After setContentOffset, actual offset=6871.0
[21:36:10] [MENU] dismissAnyExistingMenu called
[21:36:10] [MENU] dismissAnyExistingMenu completed
[21:36:10] [CELL_UPLOAD] configure: msgId=18338, file=587faef97c05d266.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:10] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:10] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=587faef97c05d266.jpg, overlayExists=true
[21:36:10] [PAGINATION] 📜 After main queue, offset=6862.0
[21:36:10] [CELL_UPLOAD] configure: msgId=18340, file=a4f205035ad487c7.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:10] [CELL_UPLOAD] → not my message, setting complete
[21:36:10] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=a4f205035ad487c7.jpg, overlayExists=true
[21:36:10] [SEARCH] 🔄 Returning to newest messages (had 200 messages loaded)
[21:36:10] [CELL_UPLOAD] configure: msgId=18378, file=7fcf17ed21a942d6.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:10] [CELL_UPLOAD] → not my message, setting complete
[21:36:10] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7fcf17ed21a942d6.jpg, overlayExists=true
[21:36:11] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:11] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:11] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:36:11] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:11] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:11] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:36:11] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:11] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:11] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:36:11] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:11] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:11] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:36:11] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=true
[21:36:11] [GIF] msgId=18430 globally completed - showing static frame
[21:36:11] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:36:11] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:36:11] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:36:11] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:11] [CELL_UPLOAD] → not my message, setting complete
[21:36:11] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:36:11] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:36:11] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:36:11] [SEARCH] ✅ Reloaded 50 newest messages
[21:36:23] [CRASH] Previous session did not exit cleanly - crash detected
[21:36:23] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:36:23] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:36:23] [GIPHY] SDK not available - using REST API fallback
[21:36:23] [BACKGROUND] Background fetch enabled
[21:36:23] [AUTH] Starting PIN authentication
[21:36:23] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:36:23] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:36:23] [CLEANUP] No old timer messages to delete
[21:36:23] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:36:23] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:36:23] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:36:23] [USER] ✅ User registered successfully
[21:36:23] [PUSH] User registration after token update: success
[21:36:23] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:36:23] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:36:23] [CLIENT_SIG] WebSocket opened
[21:36:23] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:36:23] [CLIENT_SIG] Connected! clientId=0krTwYyKprtkQSes
[21:36:23] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:36:23] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:36:23] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18478)...
[21:36:23] [PRELOAD] No messages or parse error
[21:36:24] [PIN_AUTH] Correct PIN
[21:36:24] [SECURITY] Restored real session: ILUIWU
[21:36:24] [SECURITY] Restored real session: ILUIWU
[21:36:25] [SECURITY] Saved real session: ILUIWU
[21:36:25] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:36:25] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:36:25] Documents Directory: /var/mobile/Containers/Data/Application/9F79C80D-CC08-4B5C-9770-FC1A522FF7B4/Documents
[21:36:25] [THEME] Applying current theme
[21:36:25] [CHAT] Applied day theme (mode: day)
[21:36:25] [SECURITY] Saved real session: ILUIWU
[21:36:25] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:36:25] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:36:25] [NETWORK] Network monitor started
[21:36:25] [NETWORK] Status changed: connected
[21:36:25] Did transition
[21:36:25] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:36:25] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:36:25] [VIEWER] Screen lock enabled - normal idle behavior
[21:36:25] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:36:25] [VCC] ========== VideoConnectionClass INIT ==========
[21:36:25] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:36:25] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:36:25] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:36:25] [DATA AUDIO] Creating encoder/decoder factories...
[21:36:25] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:36:25] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:36:25] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:36:25] [DATA AUDIO] ✅ Factory created
[21:36:25] [DATA AUDIO] RTCAudioSession locked
[21:36:25] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:36:25] [DATA AUDIO] RTCAudioSession unlocked
[21:36:25] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:36:25] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:36:25] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:36:25] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:36:25] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:36:25] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:36:25] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:36:25] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:36:25] Did transition
[21:36:25] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:36:25] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:36:25] [CHUNK] Merged 880 reactions synchronously
[21:36:25] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:36:25] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:36:25] [MIGRATION] No messages need sender_name backfill
[21:36:25] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:36:25] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:36:25] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:36:25] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:36:25] [USER] ✅ User registered successfully
[21:36:25] [USER] User registration successful
[21:36:25] [GALLERY_DB] ✅ Loaded 477 media messages
[21:36:25] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18478
[21:36:25] [INCREMENTAL_SYNC] ✅ No new messages
[21:36:25] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:36:25] [GALLERY] First 5 after sort (newest first):
[21:36:25] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:36:25] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:36:25] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:36:25] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:36:25] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:36:25] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:36:25] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:36:25] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:36:25] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[21:36:25] [GIF] msgId=18430 START fresh animation
[21:36:25] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:36:25] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:36:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:36:25] [SERVER] Starting reconnect polling (5s interval)
[21:36:25] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:36:25] [ICONS] Offset applied: -14.6
[21:36:25] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:36:25] [ICONS] Chat center: (31.2, 87.0)
[21:36:25] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:36:25] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:36:25] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:36:25] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:36:25] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:36:25] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:36:25] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:36:25] [ICONS] Screen width: 440.0
[21:36:25] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:36:25] [UNSENT_RETRY] Checking for unsent messages...
[21:36:25] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:36:25] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:36:25] [UPLOAD_RECOVERY] Session: ILUIWU
[21:36:25] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:36:25] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:36:25] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:36:25] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:36:25] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:36:25] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:36:25] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:36:25] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:36:25] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:36:25] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:36:25] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:36:25] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:36:25] [UPLOAD_RECOVERY] Verifying 10 media files exist on server...
[21:36:25] [PENDING_UPLOAD] Total pending upload messages: 0
[21:36:25] [UNSENT_RETRY] No unsent messages found
[21:36:25] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:36:25] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:36:25] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:36:25] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:36:25] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:36:25] new_session POST ok: token len=157
[21:36:25] HELLO → sent (fetched token, role=query)
[21:36:25] [SIG] hello_ok received for query connection - ready to query agents
[21:36:25] [SIG] get_agents request sent for sessionId=ILUIWU
[21:36:25] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:36:25] [SERVER] Stopped reconnect polling
[21:36:25] [SIG] agents_list received: []
[21:36:25] [SIG] agents_list received: []
[21:36:25] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:36:25] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:36:25] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:36:32] [MENU] dismissAnyExistingMenu called
[21:36:32] [MENU] dismissAnyExistingMenu completed
[21:36:32] [SCROLL_BTN] Showing button - 406pt from bottom > half 379pt
[21:36:33] [MENU] dismissAnyExistingMenu called
[21:36:33] [MENU] dismissAnyExistingMenu completed
[21:36:33] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:33] [CELL_UPLOAD] → not my message, setting complete
[21:36:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:36:33] [MENU] dismissAnyExistingMenu called
[21:36:33] [MENU] dismissAnyExistingMenu completed
[21:36:33] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=true
[21:36:33] [GIF] msgId=18430 globally completed - showing static frame
[21:36:33] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:36:33] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:36:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:36:34] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:36:34] [PAGINATION] 📜 Loading 50 older messages, firstVisibleRow=0, oldOffset=-64.0
[21:36:34] [PAGINATION] 📜 Total now: 100
[21:36:34] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=100, first5Ids=[18379, 18380, 18381, 18382, 18383]
[21:36:34] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:34] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:34] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:36:34] [PAGINATION] 📜 newHeight=9871.0, heightDiff=5051.0, newOffset=4987.0
[21:36:34] [PAGINATION] 📜 After setContentOffset, actual offset=4987.0
[21:36:34] [PAGINATION] 📜 After main queue, offset=4987.0
[21:36:34] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:34] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:34] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:36:34] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=true
[21:36:34] [GIF] msgId=18430 globally completed - showing static frame
[21:36:34] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:36:34] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:36:34] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:36:34] [MENU] dismissAnyExistingMenu called
[21:36:34] [MENU] dismissAnyExistingMenu completed
[21:36:34] [MENU] dismissAnyExistingMenu called
[21:36:34] [MENU] dismissAnyExistingMenu completed
[21:36:35] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:35] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:35] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:36:35] [MENU] dismissAnyExistingMenu called
[21:36:35] [MENU] dismissAnyExistingMenu completed
[21:36:35] [MENU] dismissAnyExistingMenu called
[21:36:35] [MENU] dismissAnyExistingMenu completed
[21:36:35] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:35] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:35] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:36:36] [MENU] dismissAnyExistingMenu called
[21:36:36] [MENU] dismissAnyExistingMenu completed
[21:36:36] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:36:36] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:36:36] [PAGINATION] 📜 Loading 50 older messages, firstVisibleRow=0, oldOffset=-14.666666666666666
[21:36:36] [PAGINATION] 📜 Total now: 150
[21:36:36] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=150, first5Ids=[18329, 18330, 18331, 18332, 18333]
[21:36:36] [CELL_UPLOAD] configure: msgId=18329, file=41e6d3f8b6fc3362.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41e6d3f8b6fc3362.jpg, overlayExists=true
[21:36:36] [PAGINATION] 📜 newHeight=14940.0, heightDiff=5069.0, newOffset=5054.333333333333
[21:36:36] [PAGINATION] 📜 After setContentOffset, actual offset=5054.333333333333
[21:36:36] [PAGINATION] 📜 After main queue, offset=5054.333333333333
[21:36:36] [CELL_UPLOAD] configure: msgId=18378, file=7fcf17ed21a942d6.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:36] [CELL_UPLOAD] → not my message, setting complete
[21:36:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7fcf17ed21a942d6.jpg, overlayExists=true
[21:36:36] [CELL_UPLOAD] configure: msgId=18380, file=47f0a79ffd2469ec.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:36:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:36:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=47f0a79ffd2469ec.jpg, overlayExists=true
[21:36:37] [MENU] dismissAnyExistingMenu called
[21:36:37] [MENU] dismissAnyExistingMenu completed
[21:36:37] [MENU] dismissAnyExistingMenu called
[21:36:37] [MENU] dismissAnyExistingMenu completed
[21:36:38] [MENU] dismissAnyExistingMenu called
[21:36:38] [MENU] dismissAnyExistingMenu completed
[21:37:10] [CRASH] Previous session did not exit cleanly - crash detected
[21:37:10] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:37:10] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:37:10] [GIPHY] SDK not available - using REST API fallback
[21:37:10] [BACKGROUND] Background fetch enabled
[21:37:10] [CLEANUP] No old timer messages to delete
[21:37:10] [AUTH] Starting PIN authentication
[21:37:10] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:37:10] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:37:10] [PUSH] APNs token: 6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c
[21:37:10] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:37:10] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:37:10] [USER] ✅ User registered successfully
[21:37:10] [PUSH] User registration after token update: success
[21:37:10] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:37:10] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:37:10] [CLIENT_SIG] WebSocket opened
[21:37:10] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:37:10] [CLIENT_SIG] Connected! clientId=jq1Y2gYVtlM6lO4W
[21:37:10] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:37:10] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:37:11] [PRELOAD] ⚡ Starting message pre-load during authentication (since_id=18478)...
[21:37:11] [PRELOAD] No messages or parse error
[21:37:12] [PIN_AUTH] Correct PIN
[21:37:12] [SECURITY] Restored real session: ILUIWU
[21:37:12] [SECURITY] Restored real session: ILUIWU
[21:37:12] [SECURITY] Saved real session: ILUIWU
[21:37:12] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:37:12] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:37:12] Documents Directory: /var/mobile/Containers/Data/Application/9F79C80D-CC08-4B5C-9770-FC1A522FF7B4/Documents
[21:37:12] [UPLOAD_QUEUE] Found 0 pending uploads to resume
[21:37:12] [THEME] Applying current theme
[21:37:12] [CHAT] Applied day theme (mode: day)
[21:37:12] [SECURITY] Saved real session: ILUIWU
[21:37:12] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:37:12] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:37:12] [NETWORK] Network monitor started
[21:37:12] [NETWORK] Status changed: connected
[21:37:12] Did transition
[21:37:12] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:37:12] [VIEWER] Screen lock enabled - normal idle behavior
[21:37:12] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:37:12] [VCC] ========== VideoConnectionClass INIT ==========
[21:37:12] [VCC] Session: iosILUIWU, ViewIdx: 0, AgentId: nil
[21:37:12] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:37:12] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:37:12] [DATA AUDIO] Creating encoder/decoder factories...
[21:37:12] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:37:12] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:37:12] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:37:12] [DATA AUDIO] ✅ Factory created
[21:37:12] [DATA AUDIO] RTCAudioSession locked
[21:37:12] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:37:12] [DATA AUDIO] RTCAudioSession unlocked
[21:37:12] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:37:12] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:37:12] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:37:12] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:37:12] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:37:12] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:37:12] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:37:12] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:37:12] Did transition
[21:37:12] [TABLEVIEW] cellForRowAt index 0 out of bounds (count=0)
[21:37:12] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:37:12] [CHUNK] Merged 880 reactions synchronously
[21:37:12] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:37:12] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:37:12] [MIGRATION] No messages need sender_name backfill
[21:37:12] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:37:12] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:37:12] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:37:12] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:37:12] [USER] ✅ User registered successfully
[21:37:12] [USER] User registration successful
[21:37:12] [GALLERY_DB] ✅ Loaded 477 media messages
[21:37:12] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18478
[21:37:12] [INCREMENTAL_SYNC] ✅ No new messages
[21:37:12] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:37:12] [GALLERY] First 5 after sort (newest first):
[21:37:12] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:37:12] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:37:12] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:37:12] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:37:12] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:37:12] [SCROLL_BTN] Showing button - 32pt from bottom > half 22pt
[21:37:12] [SERVER] Starting reconnect polling (5s interval)
[21:37:12] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:37:12] [ICONS] Offset applied: -14.6
[21:37:12] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:37:12] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:37:12] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:37:12] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=false
[21:37:12] [GIF] msgId=18430 START fresh animation
[21:37:12] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:37:12] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:37:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:37:12] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:37:12] [UNSENT_RETRY] Checking for unsent messages...
[21:37:12] [UPLOAD_RECOVERY] ========== CHECKING FOR MISSING UPLOADS ==========
[21:37:12] [UPLOAD_RECOVERY] User ID: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF
[21:37:12] [UPLOAD_RECOVERY] Session: ILUIWU
[21:37:12] [UPLOAD_RECOVERY] ✅ No stuck uploads found
[21:37:12] [UPLOAD_RECOVERY] Checking recent media messages on server...
[21:37:12] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18428, file=f36a462089f1685a.jpg, upload_status=complete
[21:37:12] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18409, file=f733dc0a9f704916.jpg, upload_status=complete
[21:37:12] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18407, file=7494d317859e38fb.jpg, upload_status=complete
[21:37:12] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18380, file=47f0a79ffd2469ec.jpg, upload_status=complete
[21:37:12] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18338, file=587faef97c05d266.jpg, upload_status=complete
[21:37:12] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18329, file=41e6d3f8b6fc3362.jpg, upload_status=complete
[21:37:12] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18320, file=79f8421197610988.jpg, upload_status=complete
[21:37:12] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18312, file=077bf4aba425ab65.jpg, upload_status=complete
[21:37:12] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18306, file=8c29dab4be6eb199.jpg, upload_status=complete
[21:37:12] [UPLOAD_RECOVERY] 📋 Recent media: msgId=18296, file=e27abe61119a26c3.mov, upload_status=complete
[21:37:12] [UPLOAD_RECOVERY] Verifying 10 media files exist on server...
[21:37:12] [PENDING_UPLOAD] Total pending upload messages: 0
[21:37:12] [UNSENT_RETRY] No unsent messages found
[21:37:12] [ICONS] Chat center: (31.2, 87.0)
[21:37:12] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:37:12] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:37:12] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:37:12] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:37:12] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:37:12] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:37:12] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:37:12] [ICONS] Screen width: 440.0
[21:37:12] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:37:12] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:37:12] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:37:12] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:37:13] [UPLOAD_RECOVERY] ✅ All media files verified on server
[21:37:13] new_session POST ok: token len=157
[21:37:13] HELLO → sent (fetched token, role=query)
[21:37:13] [SIG] hello_ok received for query connection - ready to query agents
[21:37:13] [SIG] get_agents request sent for sessionId=ILUIWU
[21:37:13] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:37:13] [SERVER] Stopped reconnect polling
[21:37:13] [SIG] agents_list received: []
[21:37:13] [SIG] agents_list received: []
[21:37:13] [COMBINED_FETCH] Loaded 7244 read receipts, 880 messages with reactions
[21:37:13] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:37:13] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:37:17] [MENU] dismissAnyExistingMenu called
[21:37:17] [MENU] dismissAnyExistingMenu completed
[21:37:17] [EMOJI_PICKER] Starting emoji picker for message 18478
[21:37:17] [MENU] Created button 'Reply' at index 0
[21:37:17] [MENU] Created button 'Copy' at index 1
[21:37:17] [MENU] Created button 'Delete' at index 2
[21:37:17] [MENU] Menu added at y=494.0
[21:37:17] [EMOJI_PICKER] ✅ Fetched 6 recent emojis
[21:37:17] [EMOJI_PICKER] ✅ Creating picker with 6 recent emojis
[21:37:17] [EMOJI_PICKER] ✅ Picker shown at y=382.0
[21:37:23] [REACTION] add ❤️ to message 18478 (alreadyReacted: false)
[21:37:23] [MENU] dismissAnyExistingMenu called
[21:37:23] [MENU] Found menu with tag 9999, removing
[21:37:23] [MENU] Removing blur effect
[21:37:23] [MENU] Removing floating message snapshot
[21:37:23] [MENU] Dismissing emoji picker
[21:37:23] [MENU] Recorded dismissal time for debounce
[21:37:23] [MENU] dismissAnyExistingMenu completed
[21:37:23] [REACTION] Added ❤️ reaction to message 18478
[21:37:33] [MENU] dismissAnyExistingMenu called
[21:37:33] [MENU] dismissAnyExistingMenu completed
[21:37:33] [EMOJI_PICKER] Starting emoji picker for message 18473
[21:37:33] [MENU] Created button 'Reply' at index 0
[21:37:33] [MENU] Created button 'Copy' at index 1
[21:37:33] [MENU] Created button 'Delete' at index 2
[21:37:33] [MENU] Menu added at y=494.0
[21:37:33] [EMOJI_PICKER] ✅ Fetched 6 recent emojis
[21:37:33] [EMOJI_PICKER] ✅ Creating picker with 6 recent emojis
[21:37:33] [EMOJI_PICKER] ✅ Picker shown at y=382.0
[21:37:34] [REACTION] add 👄 to message 18473 (alreadyReacted: false)
[21:37:34] [MENU] dismissAnyExistingMenu called
[21:37:34] [MENU] Found menu with tag 9999, removing
[21:37:34] [MENU] Removing blur effect
[21:37:34] [MENU] Removing floating message snapshot
[21:37:34] [MENU] Dismissing emoji picker
[21:37:34] [MENU] Recorded dismissal time for debounce
[21:37:34] [MENU] dismissAnyExistingMenu completed
[21:37:34] [REACTION] Added 👄 reaction to message 18473
[21:37:37] [MENU] dismissAnyExistingMenu called
[21:37:37] [MENU] dismissAnyExistingMenu completed
[21:37:38] [SCROLL_BTN] Showing button - 380pt from bottom > half 379pt
[21:37:39] [MENU] dismissAnyExistingMenu called
[21:37:39] [MENU] dismissAnyExistingMenu completed
[21:37:40] [MENU] dismissAnyExistingMenu called
[21:37:40] [MENU] dismissAnyExistingMenu completed
[21:37:40] [EMOJI_PICKER] Starting emoji picker for message 18467
[21:37:40] [MENU] Created button 'Reply' at index 0
[21:37:40] [MENU] Created button 'Copy' at index 1
[21:37:40] [MENU] Created button 'Delete' at index 2
[21:37:40] [MENU] Menu added at y=528.0
[21:37:40] [EMOJI_PICKER] ✅ Fetched 6 recent emojis
[21:37:40] [EMOJI_PICKER] ✅ Creating picker with 6 recent emojis
[21:37:40] [EMOJI_PICKER] ✅ Picker shown at y=348.0
[21:37:41] [REACTION] add 👄 to message 18467 (alreadyReacted: false)
[21:37:41] [MENU] dismissAnyExistingMenu called
[21:37:41] [MENU] Found menu with tag 9999, removing
[21:37:41] [MENU] Removing blur effect
[21:37:41] [MENU] Removing floating message snapshot
[21:37:41] [MENU] Dismissing emoji picker
[21:37:41] [MENU] Recorded dismissal time for debounce
[21:37:41] [MENU] dismissAnyExistingMenu completed
[21:37:41] [REACTION] Added 👄 reaction to message 18467
[21:37:42] [MENU] dismissAnyExistingMenu called
[21:37:42] [MENU] dismissAnyExistingMenu completed
[21:37:42] [EMOJI_PICKER] Starting emoji picker for message 18468
[21:37:42] [MENU] Created button 'Reply' at index 0
[21:37:42] [MENU] Created button 'Copy' at index 1
[21:37:42] [MENU] Created button 'Delete' at index 2
[21:37:42] [MENU] Menu added at y=504.5
[21:37:42] [EMOJI_PICKER] ✅ Fetched 6 recent emojis
[21:37:42] [EMOJI_PICKER] ✅ Creating picker with 6 recent emojis
[21:37:42] [EMOJI_PICKER] ✅ Picker shown at y=371.5
[21:37:43] [REACTION] add 👄 to message 18468 (alreadyReacted: false)
[21:37:43] [MENU] dismissAnyExistingMenu called
[21:37:43] [MENU] Found menu with tag 9999, removing
[21:37:43] [MENU] Removing blur effect
[21:37:43] [MENU] Removing floating message snapshot
[21:37:43] [MENU] Dismissing emoji picker
[21:37:43] [MENU] Recorded dismissal time for debounce
[21:37:43] [MENU] dismissAnyExistingMenu completed
[21:37:43] [REACTION] Added 👄 reaction to message 18468
[21:37:47] [MENU] dismissAnyExistingMenu called
[21:37:47] [MENU] dismissAnyExistingMenu completed
[21:37:57] [MENU] dismissAnyExistingMenu called
[21:37:57] [MENU] dismissAnyExistingMenu completed
[21:37:58] [LIFECYCLE] App resigning active - cleared crash flag
[21:37:59] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[21:37:59] [SECURITY] Saved background timestamp
[21:37:59] [LIFECYCLE] App entering background - cleared crash flag
[21:37:59] [CLIENT_SIG] Disconnecting
[21:37:59] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[21:37:59] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[21:37:59] [WS] Canceling WebSocket for query connection to iosILUIWU
[21:37:59] In cleanupPeer
[21:37:59] In cleanupPeer
[21:37:59] [LIFECYCLE] WebRTC audio disabled
[21:37:59] [LIFECYCLE] AVAudioSession deactivated
[21:37:59] [LIFECYCLE] All connections stopped
[21:37:59] [CLIENT_SIG] WebSocket closed with code 1001
[21:37:59] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:37:59] [SERVER] Stopped reconnect polling
[21:37:59] Will request stop of video 0
[21:37:59] Will request stop of video 0
[21:37:59] [WS] WebSocket task completed with error - isQueryOnly=true: cancelled
[21:37:59] [WS] Query connection error - cleaning up all agent connections and views
[21:37:59] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[21:37:59] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:37:59] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[21:37:59] [WS] Query connection failed - cleaning up all agent connections and views
[21:37:59] [PIP] Removing 0 tracks from PiP for connection 0
[21:37:59] [PIP] ✅ All tracks removed for connection 0
[21:37:59] [PIP] Removing 0 tracks from PiP for connection 0
[21:37:59] [PIP] ✅ All tracks removed for connection 0
[21:37:59] [CLEANUP] ========================================
[21:37:59] [CLEANUP] Cleaning up all agent connections and views
[21:37:59] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:37:59] [CLEANUP] Stopped and removed 0 video connections
[21:37:59] [CLEANUP] Removed 0 video views
[21:37:59] [CLEANUP] Removed 0 feed scroll views
[21:37:59] [CLEANUP] Removed 0 status labels
[21:37:59] [CLEANUP] Reset agent query state
[21:37:59] [CLEANUP] Updated page indicator
[21:37:59] [CLEANUP] Rebuilt video layout
[21:38:00] [CLEANUP] ✅ All agent connections and views cleaned up
[21:38:00] [CLEANUP] ========================================
[21:38:00] [SERVER] Skipping reconnect polling - app is in background
[21:38:00] [WS] URLSession invalidated successfully
[21:38:00] [CLEANUP] ========================================
[21:38:00] [CLEANUP] Cleaning up all agent connections and views
[21:38:00] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:38:00] [CLEANUP] Stopped and removed 0 video connections
[21:38:00] [CLEANUP] Removed 0 video views
[21:38:00] [CLEANUP] Removed 0 feed scroll views
[21:38:00] [CLEANUP] Removed 0 status labels
[21:38:00] [CLEANUP] Reset agent query state
[21:38:00] [CLEANUP] Updated page indicator
[21:38:00] [CLEANUP] Rebuilt video layout
[21:38:00] [CLEANUP] ✅ All agent connections and views cleaned up
[21:38:00] [CLEANUP] ========================================
[21:38:00] [SERVER] Skipping reconnect polling - app is in background
[21:39:04] [SECURITY] Timeout check: elapsed=64.60987997055054s, timeout=300.0s
[21:39:04] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:39:04] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:39:04] [LIFECYCLE] App entering foreground - restoring connections
[21:39:04] [UPLOAD_RETRY] No pending uploads to retry
[21:39:04] [LIFECYCLE] Merged 884 reactions from local DB
[21:39:04] [LIFECYCLE] WebRTC audio re-enabled
[21:39:04] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:39:04] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:39:04] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:39:04] [VIEWER] Reconnecting after background - querying agents
[21:39:04] [UNSENT_RETRY] Checking for unsent messages...
[21:39:04] [PENDING_UPLOAD] Total pending upload messages: 0
[21:39:04] [UNSENT_RETRY] No unsent messages found
[21:39:04] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[21:39:04] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:39:04] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:39:04] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:39:04] [SECURITY] sceneDidBecomeActive - isAuthenticated=true, didEnterBackground=true
[21:39:04] [SECURITY] Within timeout - cleared background flag
[21:39:04] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:39:04] [PUSH] handlePollEventsNotification userInfo: [:]
[21:39:04] [PUSH] No message_id in userInfo
[21:39:04] [PUSH] No operation_type in userInfo
[21:39:04] [FAST_REFRESH] Evolution disabled - performing incremental sync
[21:39:04] [FAST_REFRESH] Already have 50 messages - skipping local DB load
[21:39:04] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[21:39:04] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[21:39:04] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:39:04] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18478
[21:39:04] [CLIENT_SIG] WebSocket opened
[21:39:04] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:39:04] [CLIENT_SIG] Connected! clientId=AnX6plzH0gFPDT6x
[21:39:04] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:39:04] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:39:04] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:39:04] HELLO → sent (cached token, role=query)
[21:39:04] [SIG] hello_ok received for query connection - ready to query agents
[21:39:04] [SIG] get_agents request sent for sessionId=ILUIWU
[21:39:04] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:39:04] [SERVER] Stopped reconnect polling
[21:39:04] [SIG] agents_list received: []
[21:39:04] [SIG] agents_list received: []
[21:39:04] [INCREMENTAL_SYNC] ✅ No new messages
[21:39:04] [FAST_REFRESH] Incremental sync complete - 50 messages
[21:39:04] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:39:05] [COMBINED_FETCH] Loaded 7244 read receipts, 884 messages with reactions
[21:39:05] [FOREGROUND] Enriched 0 messages with readBy data from server
[21:39:05] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:39:05] [COMBINED_FETCH] Loaded 7244 read receipts, 884 messages with reactions
[21:39:05] [FAST_REFRESH] Enriched 50 messages with readBy data
[21:39:05] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:39:10] [MENU] dismissAnyExistingMenu called
[21:39:10] [MENU] dismissAnyExistingMenu completed
[21:39:10] [SCROLL_BTN] Showing button - 379pt from bottom > half 379pt
[21:39:11] [MENU] dismissAnyExistingMenu called
[21:39:11] [MENU] dismissAnyExistingMenu completed
[21:39:14] [WS] WebSocket task completed with error - isQueryOnly=true: The request timed out.
[21:39:14] [WS] Query connection error - cleaning up all agent connections and views
[21:39:14] [CLEANUP] ========================================
[21:39:14] [CLEANUP] Cleaning up all agent connections and views
[21:39:14] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:39:14] [CLEANUP] Stopped and removed 0 video connections
[21:39:14] [CLEANUP] Removed 0 video views
[21:39:14] [CLEANUP] Removed 0 feed scroll views
[21:39:14] [CLEANUP] Removed 0 status labels
[21:39:14] [CLEANUP] Reset agent query state
[21:39:14] [CLEANUP] Updated page indicator
[21:39:14] [CLEANUP] Rebuilt video layout
[21:39:14] [CLEANUP] ✅ All agent connections and views cleaned up
[21:39:14] [CLEANUP] ========================================
[21:39:14] [SERVER] Starting reconnect polling (5s interval)
[21:39:15] [MENU] dismissAnyExistingMenu called
[21:39:15] [MENU] dismissAnyExistingMenu completed
[21:39:15] [MENU] dismissAnyExistingMenu called
[21:39:15] [MENU] dismissAnyExistingMenu completed
[21:39:16] [MENU] dismissAnyExistingMenu called
[21:39:16] [MENU] dismissAnyExistingMenu completed
[21:39:17] [MENU] dismissAnyExistingMenu called
[21:39:17] [MENU] dismissAnyExistingMenu completed
[21:39:19] [SERVER] Polling - attempting to reconnect...
[21:39:20] [LIFECYCLE] App resigning active - cleared crash flag
[21:39:21] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[21:39:21] [SECURITY] Saved background timestamp
[21:39:21] [LIFECYCLE] App entering background - cleared crash flag
[21:39:21] [CLIENT_SIG] Disconnecting
[21:39:21] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[21:39:21] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=3
[21:39:21] [WS] Canceling WebSocket for query connection to iosILUIWU
[21:39:21] In cleanupPeer
[21:39:21] In cleanupPeer
[21:39:21] [LIFECYCLE] WebRTC audio disabled
[21:39:21] [LIFECYCLE] AVAudioSession deactivated
[21:39:21] [LIFECYCLE] All connections stopped
[21:39:21] [CLIENT_SIG] WebSocket closed with code 1001
[21:39:21] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:39:21] [SERVER] Stopped reconnect polling
[21:39:21] Will request stop of video 0
[21:39:21] Will request stop of video 0
[21:39:21] [WS] URLSession invalidated successfully
[21:39:21] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[21:39:21] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:39:21] [PIP] Removing 0 tracks from PiP for connection 0
[21:39:21] [PIP] ✅ All tracks removed for connection 0
[21:39:21] [PIP] Removing 0 tracks from PiP for connection 0
[21:39:21] [PIP] ✅ All tracks removed for connection 0
[21:45:08] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:45:08] [SECURITY] Timeout check: elapsed=347.3520131111145s, timeout=300.0s
[21:45:08] [SECURITY] sceneWillEnterForeground - timeout exceeded, showing lock screen immediately
[21:45:08] [AUTH] ✅ All guards passed, showing privacy cover
[21:45:09] [LIFECYCLE] App entering foreground - restoring connections
[21:45:09] [LIFECYCLE] Away > 2 minutes (347s) - will scroll to bottom
[21:45:09] [UPLOAD_RETRY] No pending uploads to retry
[21:45:09] [LIFECYCLE] Merged 884 reactions from local DB
[21:45:09] [LIFECYCLE] WebRTC audio re-enabled
[21:45:09] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:45:09] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:45:09] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:45:09] [VIEWER] Reconnecting after background - querying agents
[21:45:09] [UNSENT_RETRY] Checking for unsent messages...
[21:45:09] [PENDING_UPLOAD] Total pending upload messages: 0
[21:45:09] [UNSENT_RETRY] No unsent messages found
[21:45:09] [WS] Connection failed: The operation couldn’t be completed. Software caused connection abort
[21:45:09] [WS] Query connection failed - cleaning up all agent connections and views
[21:45:09] [CLEANUP] ========================================
[21:45:09] [CLEANUP] Cleaning up all agent connections and views
[21:45:09] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:45:09] [CLEANUP] Stopped and removed 0 video connections
[21:45:09] [CLEANUP] Removed 0 video views
[21:45:09] [CLEANUP] Removed 0 feed scroll views
[21:45:09] [CLEANUP] Removed 0 status labels
[21:45:09] [CLEANUP] Reset agent query state
[21:45:09] [CLEANUP] Updated page indicator
[21:45:09] [CLEANUP] Rebuilt video layout
[21:45:09] [CLEANUP] ✅ All agent connections and views cleaned up
[21:45:09] [CLEANUP] ========================================
[21:45:09] [SERVER] Starting reconnect polling (5s interval)
[21:45:09] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:45:09] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:45:09] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:45:09] [PUSH] handlePollEventsNotification userInfo: [:]
[21:45:09] [PUSH] No message_id in userInfo
[21:45:09] [PUSH] No operation_type in userInfo
[21:45:09] [FAST_REFRESH] Evolution disabled - performing incremental sync
[21:45:09] [FAST_REFRESH] Already have 50 messages - skipping local DB load
[21:45:09] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[21:45:09] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[21:45:09] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:45:09] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18478
[21:45:09] [CLIENT_SIG] WebSocket opened
[21:45:09] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:45:09] [CLIENT_SIG] Connected! clientId=kHyljzGyFWXorvbU
[21:45:09] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:45:09] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:45:09] [INCREMENTAL_SYNC] ✅ No new messages
[21:45:09] [FAST_REFRESH] Incremental sync complete - 50 messages
[21:45:09] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:45:09] [COMBINED_FETCH] Loaded 7244 read receipts, 884 messages with reactions
[21:45:09] [FOREGROUND] Enriched 0 messages with readBy data from server
[21:45:09] [COMBINED_FETCH] Loaded 7244 read receipts, 884 messages with reactions
[21:45:09] [FAST_REFRESH] Enriched 50 messages with readBy data
[21:45:09] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:45:10] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:45:10] [PIN_AUTH] Correct PIN
[21:45:10] [SECURITY] Restored real session: ILUIWU
[21:45:10] [SECURITY] Restored real session: ILUIWU
[21:45:10] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[21:45:10] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:45:10] [AUTH] Authentication completed - updating UI only (data already fetched in foreground handler)
[21:45:10] [AUTH] UI update complete
[21:45:10] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:45:10] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:45:10] [FAKE MODE] Exiting fake mode, restoring real session
[21:45:10] [SECURITY] Restored real session: ILUIWU
[21:45:10] [SECURITY] Saved real session: ILUIWU
[21:45:10] [FAKE MODE] ✅ Restored real session: ILUIWU
[21:45:10] [FAKE MODE] Loaded 50 messages (limited to page size)
[21:45:10] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:45:10] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:45:10] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:45:10] HELLO → sent (cached token, role=query)
[21:45:10] [SIG] hello_ok received for query connection - ready to query agents
[21:45:10] [SIG] get_agents request sent for sessionId=ILUIWU
[21:45:10] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:45:10] [SERVER] Stopped reconnect polling
[21:45:10] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:45:10] [SIG] agents_list received: []
[21:45:10] [SIG] agents_list received: []
[21:45:11] [USER] ✅ User registered successfully
[21:45:11] [PUSH] User registration after token update: success
[21:45:11] [COMBINED_FETCH] Loaded 7244 read receipts, 884 messages with reactions
[21:45:11] [FAKE MODE] Enriched 50 messages with readBy data
[21:45:11] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:45:13] [MENU] dismissAnyExistingMenu called
[21:45:13] [MENU] dismissAnyExistingMenu completed
[21:45:14] [SCROLL_BTN] Showing button - 381pt from bottom > half 379pt
[21:45:14] [MENU] dismissAnyExistingMenu called
[21:45:14] [MENU] dismissAnyExistingMenu completed
[21:45:15] [MENU] dismissAnyExistingMenu called
[21:45:15] [MENU] dismissAnyExistingMenu completed
[21:45:15] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:45:15] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:45:15] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:45:15] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:45:15] [GALLERY_DB] ✅ Loaded 477 media messages
[21:45:16] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:45:16] [GALLERY] First 5 after sort (newest first):
[21:45:16] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:45:16] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:45:16] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:45:16] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:45:16] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:45:20] [WS] WebSocket task completed with error - isQueryOnly=true: The request timed out.
[21:45:20] [WS] Query connection error - cleaning up all agent connections and views
[21:45:20] [CLEANUP] ========================================
[21:45:20] [CLEANUP] Cleaning up all agent connections and views
[21:45:20] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:45:20] [CLEANUP] Stopped and removed 0 video connections
[21:45:20] [CLEANUP] Removed 0 video views
[21:45:20] [CLEANUP] Removed 0 feed scroll views
[21:45:20] [CLEANUP] Removed 0 status labels
[21:45:20] [CLEANUP] Reset agent query state
[21:45:20] [CLEANUP] Updated page indicator
[21:45:20] [CLEANUP] Rebuilt video layout
[21:45:20] [CLEANUP] ✅ All agent connections and views cleaned up
[21:45:20] [CLEANUP] ========================================
[21:45:20] [SERVER] Starting reconnect polling (5s interval)
[21:45:21] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:45:21] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:45:21] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:45:21] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:45:21] [GALLERY_DB] ✅ Loaded 477 media messages
[21:45:21] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:45:21] [GALLERY] First 5 after sort (newest first):
[21:45:21] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:45:21] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:45:21] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:45:21] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:45:21] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:45:25] [SERVER] Polling - attempting to reconnect...
[21:45:25] [QUERY] ⚠️ Closing existing tempQueryConnection (was: iosILUIWU) before creating new one (will be: ILUIWU)
[21:45:25] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=3
[21:45:25] [WS] Canceling WebSocket for query connection to iosILUIWU
[21:45:25] In cleanupPeer
[21:45:25] [QUERY] ✅ Cleared tempQueryConnection reference
[21:45:25] [QUERY] 🔵 Creating new query connection for sessionId=ILUIWU
[21:45:25] [VCC] ========== VideoConnectionClass INIT ==========
[21:45:25] [VCC] Session: ILUIWU, ViewIdx: 0, AgentId: nil
[21:45:25] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:45:25] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:45:25] [DATA AUDIO] Creating encoder/decoder factories...
[21:45:25] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:45:25] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:45:25] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:45:25] [DATA AUDIO] ✅ Factory created
[21:45:25] [DATA AUDIO] RTCAudioSession locked
[21:45:25] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:45:25] [DATA AUDIO] RTCAudioSession unlocked
[21:45:25] [DATA AUDIO] Skipping AVAudioSession config - handled by DataChannelAudioPlayer
[21:45:25] [VCC] Initial ICE servers: ["stun:stun.l.google.com:19302", "turn:crivello.dyndns.org:3478?transport=udp", "turn:crivello.dyndns.org:3478?transport=tcp", "turns:crivello.dyndns.org:5349?transport=tcp"]
[21:45:25] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=ILUIWU
[21:45:25] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:45:25] [QUERY] ✅ tempQueryConnection created and set to isQueryOnly=true
[21:45:25] [WS] URLSession invalidated successfully
[21:45:25] [LIFECYCLE] 🔴 VideoConnectionClass DEALLOCATING - isQueryOnly=true, connectionStr=iosILUIWU
[21:45:26] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=ILUIWU
[21:45:26] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:45:26] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:45:26] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=ILUIWU
[21:45:26] new_session POST ok: token len=153
[21:45:26] HELLO → sent (fetched token, role=query)
[21:45:26] [SIG] hello_ok received for query connection - ready to query agents
[21:45:26] [SIG] get_agents request sent for sessionId=ILUIWU
[21:45:26] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:45:26] [SERVER] Stopped reconnect polling
[21:45:26] [SIG] agents_list received: []
[21:45:26] [SIG] agents_list received: []
[21:45:27] [GALLERY] Selected message 15525 - switching to chat tab
[21:45:27] [GALLERY] Message not loaded - loading messages until found
[21:45:27] [GALLERY] loadMessagesUntilFound: looking for message 15525
[21:45:27] [GALLERY_DB] Messages >= id 15525: 2902
[21:45:27] [GALLERY] Need 2902 msgs to reach target + 50 margin = 2952 total, already have 50, loading 2902 more
[21:45:28] [COMBINED_FETCH] Loaded 7244 read receipts, 884 messages with reactions
[21:45:28] [GALLERY] Loaded 2902 messages in single batch, total: 2952
[21:45:28] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=2952, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:45:28] [GUARD] ⚠️ buildChatRows received 2952 messages - truncating to 500
[21:45:28] [CELL_UPLOAD] configure: msgId=18022, file=45d67ad603184f8b.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:28] [CELL_UPLOAD] → not my message, setting complete
[21:45:28] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=45d67ad603184f8b.jpg, overlayExists=true
[21:45:28] [GALLERY] Message not found after loading 2902 messages
[21:45:28] [GALLERY] Message 15525 not found after loading all messages
[21:45:28] DOWNLOADIIING 2360d0215b6a2ab2.mov
[21:45:30] [MENU] dismissAnyExistingMenu called
[21:45:30] [MENU] dismissAnyExistingMenu completed
[21:45:30] [SCROLL_BTN] Showing button - 47937pt from bottom > half 379pt
[21:45:31] [MENU] dismissAnyExistingMenu called
[21:45:31] [MENU] dismissAnyExistingMenu completed
[21:45:32] [SEARCH] 🔄 Returning to newest messages (had 2952 messages loaded)
[21:45:32] [CELL_UPLOAD] configure: msgId=18040, file=9517bfe6ca98fe6d.heic, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=9517bfe6ca98fe6d.heic, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18045, file=fc97f5d36a4b78a8.jpeg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=fc97f5d36a4b78a8.jpeg, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18058, file=f533b6e6646d4d9c.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f533b6e6646d4d9c.jpg, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18059, file=85d85b3da3b4b9f3.png, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=85d85b3da3b4b9f3.png, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18077, file=7a7b561868bcacae.heic, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7a7b561868bcacae.heic, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18104, file=f733fbda18a5f573.png, senderId=EYE-SYSTEM-00000000-0000-0000-0000-000000000000, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733fbda18a5f573.png, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18107, file=c3077ba7fcd9c597.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=c3077ba7fcd9c597.jpg, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18127, file=62b393a353b38c70.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=62b393a353b38c70.jpg, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18149, file=bdecbcd267d10e9d.heic, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=bdecbcd267d10e9d.heic, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18150, file=044523ae024c2e36.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=044523ae024c2e36.mov, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18196, file=034811b5c9ed7810.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=034811b5c9ed7810.jpg, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18202, file=74db1eca8b92424a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=74db1eca8b92424a.jpg, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18230, file=eef7c768c6bb98ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=eef7c768c6bb98ab.jpg, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18255, file=3f1894963f4c448e.heic, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=3f1894963f4c448e.heic, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18282, file=5b09a034a7f26203.png, senderId=EYE-SYSTEM-00000000-0000-0000-0000-000000000000, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=5b09a034a7f26203.png, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18285, file=37654be40c253c4f.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=37654be40c253c4f.jpg, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18312, file=077bf4aba425ab65.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=077bf4aba425ab65.jpg, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18329, file=41e6d3f8b6fc3362.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41e6d3f8b6fc3362.jpg, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18338, file=587faef97c05d266.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=587faef97c05d266.jpg, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18407, file=7494d317859e38fb.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7494d317859e38fb.jpg, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:45:32] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=true
[21:45:32] [GIF] msgId=18430 globally completed - showing static frame
[21:45:32] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:45:32] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:32] [CELL_UPLOAD] → not my message, setting complete
[21:45:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:45:32] [SCROLL_BTN] Showing button - 570pt from bottom > half 379pt
[21:45:32] [COMBINED_FETCH] Loaded 7244 read receipts, 884 messages with reactions
[21:45:32] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:45:32] [SEARCH] ✅ Reloaded 50 newest messages
[21:45:34] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:45:34] [GALLERY_DB] Raw datesent for msg 18439: '2026-01-21 18:54:54'
[21:45:34] [GALLERY_DB] Raw datesent for msg 18430: '2026-01-21 18:17:11'
[21:45:34] [GALLERY_DB] Raw datesent for msg 18409: '2026-01-21 15:37:22'
[21:45:34] [GALLERY_DB] ✅ Loaded 477 media messages
[21:45:34] [GALLERY] Filtered 477 -> 437 (only with local thumbnails)
[21:45:34] [GALLERY] First 5 after sort (newest first):
[21:45:34] [GALLERY]   0: id=18439, date=2026-01-21 18:54:54, file=41101b95fabc37ab.jpg
[21:45:34] [GALLERY]   1: id=18409, date=2026-01-21 15:37:22, file=f733dc0a9f704916.jpg
[21:45:34] [GALLERY]   2: id=18407, date=2026-01-21 15:35:55, file=7494d317859e38fb.jpg
[21:45:34] [GALLERY]   3: id=18380, date=2026-01-21 10:30:35, file=47f0a79ffd2469ec.jpg
[21:45:34] [GALLERY]   4: id=18378, date=2026-01-21 10:26:20, file=7fcf17ed21a942d6.jpg
[21:45:43] [GALLERY] Selected message 17248 - switching to chat tab
[21:45:43] [GALLERY] Message not loaded - loading messages until found
[21:45:43] [GALLERY] loadMessagesUntilFound: looking for message 17248
[21:45:43] [GALLERY_DB] Messages >= id 17248: 1218
[21:45:43] [GALLERY] Need 1218 msgs to reach target + 50 margin = 1268 total, already have 50, loading 1218 more
[21:45:43] [COMBINED_FETCH] Loaded 7244 read receipts, 884 messages with reactions
[21:45:43] [GALLERY] Loaded 1218 messages in single batch, total: 1268
[21:45:43] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=1268, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:45:43] [GUARD] ⚠️ buildChatRows received 1268 messages - truncating to 500
[21:45:43] [CELL_UPLOAD] configure: msgId=18022, file=45d67ad603184f8b.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:43] [CELL_UPLOAD] → not my message, setting complete
[21:45:43] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=45d67ad603184f8b.jpg, overlayExists=true
[21:45:43] [GALLERY] Message not found after loading 1218 messages
[21:45:43] [GALLERY] Message 17248 not found after loading all messages
[21:45:45] [MENU] dismissAnyExistingMenu called
[21:45:45] [MENU] dismissAnyExistingMenu completed
[21:45:45] [SCROLL_BTN] Showing button - 47854pt from bottom > half 379pt
[21:45:46] [CELL_UPLOAD] configure: msgId=18040, file=9517bfe6ca98fe6d.heic, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:46] [CELL_UPLOAD] → not my message, setting complete
[21:45:46] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=9517bfe6ca98fe6d.heic, overlayExists=true
[21:45:46] [CELL_UPLOAD] configure: msgId=18045, file=fc97f5d36a4b78a8.jpeg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:46] [CELL_UPLOAD] → not my message, setting complete
[21:45:46] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=fc97f5d36a4b78a8.jpeg, overlayExists=true
[21:45:46] [MENU] dismissAnyExistingMenu called
[21:45:46] [MENU] dismissAnyExistingMenu completed
[21:45:46] [CELL_UPLOAD] configure: msgId=18058, file=f533b6e6646d4d9c.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:46] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:46] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f533b6e6646d4d9c.jpg, overlayExists=true
[21:45:46] [CELL_UPLOAD] configure: msgId=18059, file=85d85b3da3b4b9f3.png, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:46] [CELL_UPLOAD] → not my message, setting complete
[21:45:46] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=85d85b3da3b4b9f3.png, overlayExists=true
[21:45:47] [SEARCH] 🔄 Returning to newest messages (had 1268 messages loaded)
[21:45:47] [CELL_UPLOAD] configure: msgId=18077, file=7a7b561868bcacae.heic, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → not my message, setting complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7a7b561868bcacae.heic, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18104, file=f733fbda18a5f573.png, senderId=EYE-SYSTEM-00000000-0000-0000-0000-000000000000, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → not my message, setting complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733fbda18a5f573.png, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18107, file=c3077ba7fcd9c597.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → not my message, setting complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=c3077ba7fcd9c597.jpg, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18117, file=ca2813d190665dd2.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=ca2813d190665dd2.jpg, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18150, file=044523ae024c2e36.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → not my message, setting complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=044523ae024c2e36.mov, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18154, file=80de02d18174956b.jpeg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → not my message, setting complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=80de02d18174956b.jpeg, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18171, file=6881a683a964b6bf.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=6881a683a964b6bf.heic, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18173, file=c8e574003511e75a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=c8e574003511e75a.jpg, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18192, file=4bbbc4757d54023e.png, senderId=EYE-SYSTEM-00000000-0000-0000-0000-000000000000, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → not my message, setting complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=4bbbc4757d54023e.png, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18196, file=034811b5c9ed7810.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → not my message, setting complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=034811b5c9ed7810.jpg, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18249, file=19efa1fb2f984328.heic, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → not my message, setting complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=19efa1fb2f984328.heic, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18276, file=a9dc1013e9d5a3e6.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=a9dc1013e9d5a3e6.jpg, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18296, file=e27abe61119a26c3.mov, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=e27abe61119a26c3.mov, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18319, file=69cc52974ecff2d4.png, senderId=EYE-SYSTEM-00000000-0000-0000-0000-000000000000, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → not my message, setting complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=69cc52974ecff2d4.png, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18320, file=79f8421197610988.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=79f8421197610988.jpg, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18340, file=a4f205035ad487c7.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → not my message, setting complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=a4f205035ad487c7.jpg, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18409, file=f733dc0a9f704916.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f733dc0a9f704916.jpg, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18428, file=f36a462089f1685a.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f36a462089f1685a.jpg, overlayExists=true
[21:45:47] [GIF] configure msgId=18430 file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif msgChanged=true owner=false animating=false completed=true
[21:45:47] [GIF] msgId=18430 globally completed - showing static frame
[21:45:47] [CELL_UPLOAD] configure: msgId=18430, file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=true, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → giphy file, no upload needed, setting complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=giphy:https://media3.giphy.com/media/v1.Y2lkPWE5ZTU0NDAzZGQ1dXAwMm5qMXVzanR0b2V2OTg0Y2c0cmxlOWN4ZzVid25iNHdvMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/5WSdgFuyGNK7Zt8ajG/giphy.gif, overlayExists=true
[21:45:47] [CELL_UPLOAD] configure: msgId=18439, file=41101b95fabc37ab.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:45:47] [CELL_UPLOAD] → not my message, setting complete
[21:45:47] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=41101b95fabc37ab.jpg, overlayExists=true
[21:45:48] [COMBINED_FETCH] Loaded 7244 read receipts, 884 messages with reactions
[21:45:48] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:45:48] [SEARCH] ✅ Reloaded 50 newest messages
[21:45:55] [TROUBLESHOOT] Troubleshoot button tapped!
[21:46:01] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:46:04] [MENU] dismissAnyExistingMenu called
[21:46:04] [MENU] dismissAnyExistingMenu completed
[21:46:04] [SCROLL_BTN] Showing button - 390pt from bottom > half 379pt
[21:46:05] [MENU] dismissAnyExistingMenu called
[21:46:05] [MENU] dismissAnyExistingMenu completed
[21:46:06] [MENU] dismissAnyExistingMenu called
[21:46:06] [MENU] dismissAnyExistingMenu completed
[21:46:07] [MENU] dismissAnyExistingMenu called
[21:46:07] [MENU] dismissAnyExistingMenu completed
[21:46:07] [SCROLL_BTN] Showing button - 258pt from bottom > half 223pt
[21:46:11] [SEARCH] Found 7225 messages matching 'e' in local DB
[21:46:11] [SEARCH] Found 4337 messages matching 'es' in local DB
[21:46:11] [SEARCH] Found 3622 messages matching 'esr' in local DB
[21:46:12] [SEARCH] Found 3622 messages matching 'esra' in local DB
[21:46:14] [SEARCH] Found 3622 messages matching 'esr' in local DB
[21:46:14] [SEARCH] Found 4337 messages matching 'es' in local DB
[21:46:15] [SEARCH] Found 7225 messages matching 'e' in local DB
[21:46:16] [SEARCH] Found 7225 messages matching 'e' in local DB
[21:46:17] [SEARCH] Found 4337 messages matching 'es' in local DB
[21:46:18] [SEARCH] Found 7225 messages matching 'e' in local DB
[21:46:19] [SEARCH] Found 2483 messages matching 'b' in local DB
[21:46:19] [SEARCH] Found 1326 messages matching 'ba' in local DB
[21:46:19] [SEARCH] Found 1189 messages matching 'bab' in local DB
[21:46:19] [SEARCH] Found 1162 messages matching 'baby' in local DB
[21:46:21] [SEARCH] Found 1189 messages matching 'bab' in local DB
[21:46:21] [SEARCH] Found 1326 messages matching 'ba' in local DB
[21:46:21] [SEARCH] Found 2483 messages matching 'b' in local DB
[21:46:22] [SEARCH] Found 7225 messages matching 'e' in local DB
[21:46:22] [SEARCH] Found 4337 messages matching 'es' in local DB
[21:46:23] [SEARCH] Found 3622 messages matching 'esr' in local DB
[21:46:23] [SEARCH] Found 3622 messages matching 'esra' in local DB
[21:46:28] [SEARCH] Found 3622 messages matching 'esr' in local DB
[21:46:28] [SEARCH] Found 4337 messages matching 'es' in local DB
[21:46:28] [SEARCH] Found 7225 messages matching 'e' in local DB
[21:46:28] [SEARCH] Found 9 messages matching 'ez' in local DB
[21:46:29] [SEARCH] Found 0 messages matching 'ezr' in local DB
[21:46:29] [SEARCH] Found 0 messages matching 'ezra' in local DB
[21:46:33] [SEARCH] Found 0 messages matching 'ezr' in local DB
[21:46:33] [SEARCH] Found 9 messages matching 'ez' in local DB
[21:46:33] [SEARCH] Found 1 messages matching 'ezz' in local DB
[21:46:36] [SEARCH] 🔍 User selected search result: id=14715, text='Sasa says Ezzzzra and I say Essssra. How is it bes', sender='Laurent'
[21:46:36] [SEARCH] 🔍 scrollToMessage called for id=14715, chatRows.count=51, allMessages.count=50, totalInDB=7240
[21:46:36] [SEARCH] ⚠️ Message 14715 NOT in chatRows (range: 18429...18478), need to load more
[21:46:36] [SEARCH] 📅 countMessagesNewerThan(14715): found date='2025-12-11 11:35:52', newerCount=3669
[21:46:36] [SEARCH] 📊 countMessagesNewerThan(14715) = 3669
[21:46:36] [SEARCH] 📥 Loading window: offset=3419, limit=500 (target at position 3669, window centered)
[21:46:36] [SEARCH] 📥 Loaded 500 messages from DB
[21:46:36] [SEARCH] 📊 Loaded messages range: 4441...14969, contains target 14715: true
[21:46:36] [SEARCH] 🔄 Calling reloadMessagesForCurrentTabImmediate()
[21:46:36] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=500, first5Ids=[4441, 4442, 4443, 4444, 4445]
[21:46:36] [CELL_UPLOAD] configure: msgId=4487, file=1699a18ba9dbe8af.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → not my message, setting complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1699a18ba9dbe8af.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4492, file=82396fbc454d4e3b.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=82396fbc454d4e3b.heic, overlayExists=true
[21:46:36] [SEARCH] 📊 After reload: chatRows.count=507, range: 4441...14969, contains target 14715: true
[21:46:36] [SEARCH] 🎯 tryScrollToMessage called for id=14715, chatRows.count=507
[21:46:36] [SEARCH] ✅ Message 14715 found at index 252, scrolling and flashing
[21:46:36] [SCROLL_BTN] Showing button - 48356pt from bottom > half 379pt
[21:46:36] [CELL_UPLOAD] configure: msgId=4504, file=6ebb758f81f65071.jpeg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=6ebb758f81f65071.jpeg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4521, file=dae795657486dfad.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → not my message, setting complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=dae795657486dfad.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4522, file=f8109de70d444de2.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → not my message, setting complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f8109de70d444de2.mov, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4524, file=cbd5fb7053cbeed8.mp4, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → not my message, setting complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=cbd5fb7053cbeed8.mp4, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4560, file=54705576db41657c.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → not my message, setting complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=54705576db41657c.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4561, file=aed85ec2a9e1ab84.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=aed85ec2a9e1ab84.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4575, file=55ca2241a5f1bae4.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=55ca2241a5f1bae4.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4576, file=660ea627520e76ff.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → not my message, setting complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=660ea627520e76ff.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4586, file=c9e658e16defb09b.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=c9e658e16defb09b.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4630, file=5002d65de729e79e.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=5002d65de729e79e.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4631, file=1b93c4d1af898cd0.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → not my message, setting complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1b93c4d1af898cd0.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4659, file=31c69b33f0eef0e5.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → not my message, setting complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=31c69b33f0eef0e5.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4662, file=884889c6ae7872ba.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=884889c6ae7872ba.heic, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4667, file=ccdf106ba3560b3f.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=ccdf106ba3560b3f.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4668, file=ab6a7e830632a0d4.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=ab6a7e830632a0d4.heic, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=4669, file=f93028765f502e55.jpeg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → not my message, setting complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f93028765f502e55.jpeg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=14695, file=9c92af3886571cf8.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=9c92af3886571cf8.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=14697, file=afb856ac36bfa3c1.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → not my message, setting complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=afb856ac36bfa3c1.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=14701, file=686c20ebe1ad58e0.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=686c20ebe1ad58e0.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=14702, file=28097e0108bbfa5d.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → not my message, setting complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=28097e0108bbfa5d.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=14710, file=e9cc15f2910ce775.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=e9cc15f2910ce775.jpg, overlayExists=true
[21:46:36] [CELL_UPLOAD] configure: msgId=14719, file=529d323b05c47bef.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:36] [CELL_UPLOAD] → not my message, setting complete
[21:46:36] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=529d323b05c47bef.mov, overlayExists=true
[21:46:38] [SEARCH] 🔄 Returning to newest messages (had 500 messages loaded)
[21:46:38] [CELL_UPLOAD] configure: msgId=14733, file=9d941c39a1a6281a.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:38] [CELL_UPLOAD] → not my message, setting complete
[21:46:38] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=9d941c39a1a6281a.jpg, overlayExists=true
[21:46:38] [CELL_UPLOAD] configure: msgId=14735, file=d03dc298a8dcc55f.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:38] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:38] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=d03dc298a8dcc55f.jpg, overlayExists=true
[21:46:38] [CELL_UPLOAD] configure: msgId=14769, file=f90fdc281a841b10.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:38] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:38] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=f90fdc281a841b10.jpg, overlayExists=true
[21:46:38] [CELL_UPLOAD] configure: msgId=14772, file=329d158fd1881541.jpg, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:38] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:38] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=329d158fd1881541.jpg, overlayExists=true
[21:46:38] [CELL_UPLOAD] configure: msgId=14776, file=3870a310c9a0d4a9.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:38] [CELL_UPLOAD] → not my message, setting complete
[21:46:38] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=3870a310c9a0d4a9.jpg, overlayExists=true
[21:46:38] [CELL_UPLOAD] configure: msgId=14780, file=af8d38b4b6dc052e.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:38] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:38] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=af8d38b4b6dc052e.heic, overlayExists=true
[21:46:38] [CELL_UPLOAD] configure: msgId=14795, file=4a08fd797fe25307.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:38] [CELL_UPLOAD] → not my message, setting complete
[21:46:38] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=4a08fd797fe25307.jpg, overlayExists=true
[21:46:38] [CELL_UPLOAD] configure: msgId=14899, file=dcc52899ddcf1e15.heic, senderId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=true, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:38] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:46:38] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=dcc52899ddcf1e15.heic, overlayExists=true
[21:46:38] [CELL_UPLOAD] configure: msgId=14944, file=05f8576e1850a8c2.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, isMyMessage=false, hasFilename=true, isGiphy=false, uploadStatus=0
[21:46:38] [CELL_UPLOAD] → not my message, setting complete
[21:46:38] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=05f8576e1850a8c2.jpg, overlayExists=true
[21:46:39] [COMBINED_FETCH] Loaded 7244 read receipts, 884 messages with reactions
[21:46:39] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:46:39] [SEARCH] ✅ Reloaded 50 newest messages
[21:46:42] [PUSH] Silent push received
[21:46:42] [PUSH_EMBED] No embedded message_data in notification
[21:46:42] [PUSH] No embedded data, pre-loading messages from server
[21:46:42] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:46:42] [PUSH_PRELOAD] Fetched 50 messages - caching for instant display
[21:46:42] [PUSH_PRELOAD] ⚡ Pre-cached 50 messages for instant display (preserved 0 from push)
[21:46:42] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:46:42] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 14956, AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3]
[21:46:42] [PUSH] Parsed message_id: 14956
[21:46:42] [PUSH] Parsed operation_type: 3
[21:46:42] [PUSH] Taking direct action: opType=3, messageId=14956
[21:46:42] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=14956
[21:46:42] [LIFECYCLE] App resigning active - cleared crash flag
[21:46:42] [CLIENT_SIG] Event received: type=3 messageId=14956
[21:46:42] [WS_EVENT] Received event: type=3, messageId=14956
[21:46:42] [WS_EVENT] Read receipt for message 14956 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:46:43] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[21:46:43] [SECURITY] Saved background timestamp
[21:46:43] [LIFECYCLE] App entering background - cleared crash flag
[21:46:43] [CLIENT_SIG] Disconnecting
[21:46:43] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[21:46:43] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=ILUIWU, wsState=0
[21:46:43] [WS] Canceling WebSocket for query connection to ILUIWU
[21:46:43] In cleanupPeer
[21:46:43] In cleanupPeer
[21:46:43] [LIFECYCLE] WebRTC audio disabled
[21:46:43] [LIFECYCLE] AVAudioSession deactivated
[21:46:43] [LIFECYCLE] All connections stopped
[21:46:43] [CLIENT_SIG] WebSocket closed with code 1001
[21:46:43] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:46:43] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=http://crivello.dyndns.org:8081/, NSErrorFailingURLKey=http://crivello.dyndns.org:8081/}
[21:46:43] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:46:43] [SERVER] Stopped reconnect polling
[21:46:43] Will request stop of video 0
[21:46:43] [WS] WebSocket task completed with error - isQueryOnly=true: cancelled
[21:46:43] [WS] Query connection error - cleaning up all agent connections and views
[21:46:43] Will request stop of video 0
[21:46:43] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[21:46:43] [WS] Query connection failed - cleaning up all agent connections and views
[21:46:43] [PIP] Removing 0 tracks from PiP for connection 0
[21:46:43] [PIP] ✅ All tracks removed for connection 0
[21:46:43] [CLEANUP] ========================================
[21:46:43] [CLEANUP] Cleaning up all agent connections and views
[21:46:43] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:46:43] [CLEANUP] Stopped and removed 0 video connections
[21:46:43] [CLEANUP] Removed 0 video views
[21:46:43] [CLEANUP] Removed 0 feed scroll views
[21:46:43] [CLEANUP] Removed 0 status labels
[21:46:43] [CLEANUP] Reset agent query state
[21:46:43] [CLEANUP] Updated page indicator
[21:46:43] [CLEANUP] Rebuilt video layout
[21:46:43] [CLEANUP] ✅ All agent connections and views cleaned up
[21:46:43] [CLEANUP] ========================================
[21:46:43] [SERVER] Skipping reconnect polling - app is in background
[21:46:43] [WS] URLSession invalidated successfully
[21:46:43] [PIP] Removing 0 tracks from PiP for connection 0
[21:46:43] [PIP] ✅ All tracks removed for connection 0
[21:46:43] [CLEANUP] ========================================
[21:46:43] [CLEANUP] Cleaning up all agent connections and views
[21:46:43] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:46:43] [CLEANUP] Stopped and removed 0 video connections
[21:46:43] [CLEANUP] Removed 0 video views
[21:46:43] [CLEANUP] Removed 0 feed scroll views
[21:46:43] [CLEANUP] Removed 0 status labels
[21:46:43] [CLEANUP] Reset agent query state
[21:46:43] [CLEANUP] Updated page indicator
[21:46:43] [CLEANUP] Rebuilt video layout
[21:46:43] [CLEANUP] ✅ All agent connections and views cleaned up
[21:46:43] [CLEANUP] ========================================
[21:46:43] [SERVER] Skipping reconnect polling - app is in background
[21:54:33] [SECURITY] Timeout check: elapsed=470.2991609573364s, timeout=300.0s
[21:54:33] [SECURITY] sceneWillEnterForeground - timeout exceeded, showing lock screen immediately
[21:54:33] [AUTH] ✅ All guards passed, showing privacy cover
[21:54:33] [LIFECYCLE] App entering foreground - restoring connections
[21:54:33] [LIFECYCLE] Away > 2 minutes (470s) - will scroll to bottom
[21:54:33] [UPLOAD_RETRY] No pending uploads to retry
[21:54:33] [LIFECYCLE] Merged 884 reactions from local DB
[21:54:33] [LIFECYCLE] WebRTC audio re-enabled
[21:54:33] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:54:33] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:54:33] [CLIENT_SIG] Connecting to session ILUIWU as Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:54:33] [VIEWER] Reconnecting after background - querying agents
[21:54:33] [UNSENT_RETRY] Checking for unsent messages...
[21:54:33] [PENDING_UPLOAD] Total pending upload messages: 0
[21:54:33] [UNSENT_RETRY] No unsent messages found
[21:54:33] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=ILUIWU
[21:54:33] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:54:33] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:54:33] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:54:33] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:54:33] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:54:33] [PUSH] handlePollEventsNotification userInfo: [:]
[21:54:33] [PUSH] No message_id in userInfo
[21:54:33] [PUSH] No operation_type in userInfo
[21:54:33] [FAST_REFRESH] Evolution disabled - performing incremental sync
[21:54:33] [FAST_REFRESH] Already have 50 messages - skipping local DB load
[21:54:33] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[21:54:33] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[21:54:33] [INCREMENTAL_SYNC] 🔄 Starting incremental refresh, currentMsgCount=50
[21:54:33] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 18478
[21:54:33] [INCREMENTAL_SYNC] ✅ No new messages
[21:54:33] [FAST_REFRESH] Incremental sync complete - 50 messages
[21:54:34] [CLIENT_SIG] WebSocket opened
[21:54:34] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:54:34] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=ILUIWU
[21:54:34] HELLO → sent (cached token, role=query)
[21:54:34] [CLIENT_SIG] Connected! clientId=C20xBFvHqpcbnlvV
[21:54:34] [SIG] hello_ok received for query connection - ready to query agents
[21:54:34] [SIG] get_agents request sent for sessionId=ILUIWU
[21:54:34] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:54:34] [SERVER] Stopped reconnect polling
[21:54:34] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:54:34] [CLIENT_SIG]   - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:54:34] [SIG] agents_list received: []
[21:54:34] [SIG] agents_list received: []
[21:54:34] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:54:34] [COMBINED_FETCH] Loaded 7244 read receipts, 884 messages with reactions
[21:54:34] [FOREGROUND] Enriched 0 messages with readBy data from server
[21:54:34] [COMBINED_FETCH] Loaded 7244 read receipts, 884 messages with reactions
[21:54:34] [FAST_REFRESH] Enriched 50 messages with readBy data
[21:54:34] [RELOAD_TAB] ⏳ Already pending, waiting for debounce
[21:54:34] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:54:35] [PIN_AUTH] Correct PIN
[21:54:35] [SECURITY] Restored real session: ILUIWU
[21:54:35] [SECURITY] Restored real session: ILUIWU
[21:54:35] [AUTH] Authentication completed - updating UI only (data already fetched in foreground handler)
[21:54:35] [AUTH] UI update complete
[21:54:35] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:54:35] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:54:35] [FAKE MODE] Exiting fake mode, restoring real session
[21:54:35] [SECURITY] Restored real session: ILUIWU
[21:54:35] [SECURITY] Saved real session: ILUIWU
[21:54:35] [FAKE MODE] ✅ Restored real session: ILUIWU
[21:54:35] [FAKE MODE] Loaded 50 messages (limited to page size)
[21:54:35] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"6c0571d5e4b29f63eac8424c26f3737968330e20febf8cd9a320b0952fc80c1c","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:54:35] [USER] Registering user: 3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF, name: Laurent
[21:54:35] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:54:35] [USER] ✅ User registered successfully
[21:54:35] [PUSH] User registration after token update: success
[21:54:36] [COMBINED_FETCH] Loaded 7244 read receipts, 884 messages with reactions
[21:54:36] [FAKE MODE] Enriched 50 messages with readBy data
[21:54:36] [RELOAD_TAB] 🔄 reloadMessagesForCurrentTab called, allMsgsCount=50, first5Ids=[18429, 18430, 18431, 18432, 18433]
[21:54:39] [LOG] Long press on chat icon detected! Triggering log upload...
[21:54:44] [WS] WebSocket task completed with error - isQueryOnly=true: The request timed out.
[21:54:44] [WS] Query connection error - cleaning up all agent connections and views
[21:54:44] [CLEANUP] ========================================
[21:54:44] [CLEANUP] Cleaning up all agent connections and views
[21:54:44] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:54:44] [CLEANUP] Stopped and removed 0 video connections
[21:54:44] [CLEANUP] Removed 0 video views
[21:54:44] [CLEANUP] Removed 0 feed scroll views
[21:54:44] [CLEANUP] Removed 0 status labels
[21:54:44] [CLEANUP] Reset agent query state
[21:54:44] [CLEANUP] Updated page indicator
[21:54:44] [CLEANUP] Rebuilt video layout
[21:54:44] [CLEANUP] ✅ All agent connections and views cleaned up
[21:54:44] [CLEANUP] ========================================
[21:54:44] [SERVER] Starting reconnect polling (5s interval)