=== Eye Viewer Log Cleared at 2025-12-08 18:56:04 +0000 ===
[21:56:04] [FONT] Roboto fonts loaded successfully: Roboto-Regular
[21:56:04] [FONT] ChatFont.regular(18) returns: Roboto-Regular, family: Roboto
[21:56:04] [GIPHY] SDK not available - using REST API fallback
[21:56:04] [BACKGROUND] Background fetch enabled
[21:56:04] [PRELOAD] ⚡ Starting message pre-load during authentication...
[21:56:04] [AUTH] Starting PIN authentication
[21:56:04] [LIFECYCLE] ViewController deallocated
[21:56:04] [PUSH] Silent push received
[21:56:04] [PUSH_EMBED] Processing embedded message: id=4305, type=0, sender=Laurent
[21:56:04] [PUSH_EMBED] Saved message 4305 to local DB
[21:56:04] [PUSH_EMBED] Created new cache with embedded message
[21:56:04] [PUSH_EMBED] Fetching evolution data for message 4305 in background
[21:56:04] [PUSH] Embedded message handled instantly from silent push
[21:56:04] [PUSH] APNs token: ea74d1b23419aba9c7f42f122ceaac51082c3477711ef6cb1bbd1988f213ab7f
[21:56:04] [PUSH] APNs token: ea74d1b23419aba9c7f42f122ceaac51082c3477711ef6cb1bbd1988f213ab7f
[21:56:05] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"ea74d1b23419aba9c7f42f122ceaac51082c3477711ef6cb1bbd1988f213ab7f","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:56:05] [PUSH] register_device.php HTTP 200: {"status":"ok","session_id":"ILUIWU","token":"ea74d1b23419aba9c7f42f122ceaac51082c3477711ef6cb1bbd1988f213ab7f","role":"viewer","muted":1,"removed_from_other_channels":0}
[21:56:05] [PUSH_EMBED] Got evolution data for message 4305, saving to local DB
[21:56:05] [PUSH_EMBED] Saved evolution data for message 4305
[21:56:06] [PRELOAD] Fetched 3203 messages
[21:56:10] [PUSH] Silent push received
[21:56:10] [PUSH_EMBED] Processing embedded message: id=4306, type=0, sender=Laurent
[21:56:10] [PUSH_EMBED] Saved message 4306 to local DB
[21:56:10] [PUSH_EMBED] Inserted message into existing cache (now 2 messages)
[21:56:10] [PUSH_EMBED] Fetching evolution data for message 4306 in background
[21:56:10] [PUSH] Embedded message handled instantly from silent push
[21:56:11] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:56:11] [CLIENT_SIG] Connecting to session ILUIWU as Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:56:11] [CLIENT_SIG] WebSocket opened
[21:56:11] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:56:11] [SECURITY] sceneDidBecomeActive - isAuthenticated=false, didEnterBackground=false
[21:56:11] [SECURITY] ⚠️ Skipping timeout check - conditions not met
[21:56:11] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:56:11] [CLIENT_SIG] Connected! clientId=YAVIe0_ZUqYe2rnk
[21:56:11] [PRELOAD] ⚡ Cached 3203 messages for instant display
[21:56:11] [PUSH_EMBED] Got evolution data for message 4306, saving to local DB
[21:56:11] [PUSH_EMBED] Saved evolution data for message 4306
[21:56:11] [CLIENT_SIG] Received 2 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:56:11] [CLIENT_SIG] - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:56:11] [CLIENT_SIG] - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:56:12] [PIN_AUTH] Correct PIN
[21:56:12] [SECURITY] Restored real session: ILUIWU
[21:56:12] [SECURITY] Restored real session: ILUIWU
[21:56:13] [SECURITY] Saved real session: ILUIWU
[21:56:13] [SCENE] Launched directly to chat view with sessionId: ILUIWU
[21:56:13] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:56:13] Documents Directory: /var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/Documents
[21:56:13] [CHUNKED_RESUME] Found resumable upload: 65b3c13d384997a5.mov at chunk 4/10
[21:56:13] [CHUNKED_RESUME] Found resumable upload: fb94b5fb89c4a48d.mov at chunk 3/13
[21:56:13] [CHUNKED_RESUME] Found resumable upload: 1ad0647655c35d25.mov at chunk 1/13
[21:56:13] [UPLOAD_QUEUE] Found 3 pending uploads to resume
[21:56:13] [THEME] Applying current theme
[21:56:13] [CHAT] Applied day theme (mode: day)
[21:56:13] [SECURITY] Saved real session: ILUIWU
[21:56:13] [CLIENT_SIG] Setting up client signaling for session: ILUIWU
[21:56:13] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:56:13] [SUMMARY] Already triggered summary today (2025-12-08)
[21:56:13] Did transition
[21:56:13] [MODE] 🔍 updateModeUI called - currentTabIndex=0, sessionId=ILUIWU
[21:56:13] [VIEWER] Screen lock enabled - normal idle behavior
[21:56:13] [QUERY] 🔍 Creating query connection for iOS slave: iosILUIWU
[21:56:13] [DATA AUDIO] ========== setupWebRTC() START ==========
[21:56:13] [DATA AUDIO] Using data channel for audio - bypassing WebRTC audio device
[21:56:13] [DATA AUDIO] Creating encoder/decoder factories...
[21:56:13] [CODEC] Viewer - Available video codecs: H264, H264, VP8, VP9, AV1
[21:56:13] [CODEC] Viewer selected encoder: AV1 (best quality)
[21:56:13] [DATA AUDIO] Creating RTCPeerConnectionFactory...
[21:56:13] [DATA AUDIO] ✅ Factory created
[21:56:13] [DATA AUDIO] RTCAudioSession locked
[21:56:13] [DATA AUDIO] Set useManualAudio=true, isAudioEnabled=false
[21:56:13] [DATA AUDIO] RTCAudioSession unlocked
[21:56:13] [DATA AUDIO] Setting AVAudioSession to .playback for data channel with mixWithOthers...
[21:56:13] [DATA AUDIO] ✅ AVAudioSession set to .playback with .mixWithOthers
[21:56:13] [WS] Creating new WebSocket - isQueryOnly=false, connectionStr=iosILUIWU
[21:56:13] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:56:13] [QUERY] ✅ tempQueryConnection created for iosILUIWU
[21:56:13] [VIEWER_INIT] Already have 50 messages - just filtering for tab
[21:56:13] [EMOJI] ✅ Loaded 451 emoji-to-GIF mappings
[21:56:13] [EVENT_POLL] Event polling disabled - using WebSocket events instead
[21:56:13] [ORIENTATION] Updated pagingScrollView height to 247.5 for width 440.0
[21:56:13] [SUMMARY] Already triggered summary today (2025-12-08)
[21:56:13] Did transition
[21:56:13] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 4304 → 4305
[21:56:13] [USER] Registering user: EDAD55A1-003F-415D-AA60-672B34B504FE, name: Esra
[21:56:13] [CHUNK] Merged 382 reactions synchronously
[21:56:13] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[21:56:13] [MIGRATION] No messages need sender_name backfill
[21:56:13] [GALLERY_DB] Raw datesent for msg 4301: '2025-12-08 18:53:38'
[21:56:13] [GALLERY_DB] Raw datesent for msg 4253: '2025-12-08 11:59:28'
[21:56:13] [GALLERY_DB] Raw datesent for msg 4227: '2025-12-08 08:35:52'
[21:56:13] [GALLERY_DB] ✅ Loaded 206 media messages
[21:56:13] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 4306
[21:56:13] [GALLERY] Filtered 206 -> 189 (only with local thumbnails)
[21:56:13] [GALLERY] First 5 after sort (newest first):
[21:56:13] [GALLERY] 0: id=4301, date=2025-12-08 18:53:38, file=71742c3d78ed2063.jpg
[21:56:13] [GALLERY] 1: id=4253, date=2025-12-08 11:59:28, file=10dabda8d04dc725.jpg
[21:56:13] [GALLERY] 2: id=4227, date=2025-12-08 08:35:52, file=5abfa51ac84672ca.jpg
[21:56:13] [GALLERY] 3: id=4225, date=2025-12-08 06:51:17, file=a59f6ea5b913297d.jpg
[21:56:13] [GALLERY] 4: id=4187, date=2025-12-07 14:31:41, file=8e8e62ba6f7fd7ed.jpg
[21:56:13] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:13] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:13] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:13] [CELL_UPLOAD] configure: msgId=4301, file=71742c3d78ed2063.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:13] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:13] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:13] [USER] ✅ User registered successfully
[21:56:13] [USER] User registration successful
[21:56:13] [CLIENT_SIG] Client disconnected: Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF) on session 'ILUIWU' (my session: 'ILUIWU')
[21:56:13] [SERVER] Starting reconnect polling (5s interval)
[21:56:13] [ICONS] Screen width: 440.0, Tab spacing: 75.5
[21:56:13] [ICONS] Offset applied: -14.6
[21:56:13] [ICONS] New left margin: 11.2, New right margin: 11.3
[21:56:13] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:56:13] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:56:13] Trying API base: https://crivello.dyndns.org:443/WebRTC/public/
[21:56:13] Token POST → https://crivello.dyndns.org:443/WebRTC/public/new_session.php?sid=iosILUIWU
[21:56:13] [CLIENT_SIG] Client disconnected: Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF) on session 'ILUIWU' (my session: 'ILUIWU')
[21:56:13] [ICONS] Chat center: (31.2, 87.0)
[21:56:13] [ICONS] Gallery center: (106.7, 87.0), deltaX: 75.5
[21:56:13] [ICONS] Camera center: (182.2, 87.0), deltaX: 75.5
[21:56:13] [ICONS] Settings center: (257.7, 87.0), deltaX: 75.5
[21:56:13] [ICONS] Lock centerX: 333.2, deltaX from Settings: 75.5
[21:56:13] [ICONS] Bell centerX: 408.7, deltaX from Lock: 75.5
[21:56:13] [ICONS] LEFT MARGIN (screen left to Chat left): 11.2
[21:56:13] [ICONS] RIGHT MARGIN (Bell right to screen right): 11.3
[21:56:13] [ICONS] Screen width: 440.0
[21:56:13] [INCREMENTAL_SYNC] ✅ No new messages
[21:56:13] [PURGE] ⚠️ Media cache purge DISABLED for debugging
[21:56:13] [UPLOAD_RECOVERY] Checking for missing uploads...
[21:56:13] [UPLOAD_RECOVERY] Checking 16 media files on server...
[21:56:13] new_session POST ok: token len=157
[21:56:13] HELLO → sent (fetched token, role=query)
[21:56:13] [UPLOAD_RECOVERY] ❌ Missing on server, local exists: 1ad0647655c35d25.mov
[21:56:13] [SIG] hello_ok received for query connection - ready to query agents
[21:56:13] [SIG] get_agents request sent for sessionId=ILUIWU
[21:56:13] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:56:13] [SERVER] Stopped reconnect polling
[21:56:13] [SIG] agents_list received: []
[21:56:13] [UPLOAD_RECOVERY] ❌ Missing on server, local exists: c8f0aac386a60643.jpg
[21:56:13] [SIG] agents_list received: []
[21:56:13] [UPLOAD_RECOVERY] ❌ Missing on server, local exists: 65b3c13d384997a5.mov
[21:56:13] [UPLOAD_RECOVERY] ❌ Missing on server, local exists: fb94b5fb89c4a48d.mov
[21:56:14] [UPLOAD_RECOVERY] ❌ Missing on server, local exists: c8f0aac386a60643.jpg
[21:56:14] [UPLOAD_RECOVERY] 🔄 Re-uploading 5 missing files...
[21:56:14] [UPLOAD_QUEUE] ⚠️ Duplicate prevented: 1ad0647655c35d25.mov already in queue (id=543, status=uploading_chunked)
[21:56:14] [UPLOAD_RECOVERY] ✅ Re-uploaded: 1ad0647655c35d25.mov
[21:56:14] [UPLOAD_QUEUE] ⚠️ Duplicate prevented: c8f0aac386a60643.jpg already in queue (id=537, status=uploading)
[21:56:14] [UPLOAD_RECOVERY] ✅ Re-uploaded: c8f0aac386a60643.jpg
[21:56:14] [UPLOAD_QUEUE] ⚠️ Duplicate prevented: 65b3c13d384997a5.mov already in queue (id=538, status=uploading_chunked)
[21:56:14] [UPLOAD_RECOVERY] ✅ Re-uploaded: 65b3c13d384997a5.mov
[21:56:14] [UPLOAD_QUEUE] ⚠️ Duplicate prevented: fb94b5fb89c4a48d.mov already in queue (id=539, status=uploading_chunked)
[21:56:14] [UPLOAD_RECOVERY] ✅ Re-uploaded: fb94b5fb89c4a48d.mov
[21:56:14] [UPLOAD_QUEUE] ⚠️ Duplicate prevented: c8f0aac386a60643.jpg already in queue (id=537, status=uploading)
[21:56:14] [UPLOAD_RECOVERY] ✅ Re-uploaded: c8f0aac386a60643.jpg
[21:56:14] [UPLOAD_RECOVERY] ⏭️ Thumbnail already on server: t_1ad0647655c35d25.jpg
[21:56:14] [UPLOAD_RECOVERY] ⏭️ Thumbnail already on server: t_65b3c13d384997a5.jpg
[21:56:14] [UPLOAD_RECOVERY] ⏭️ Thumbnail already on server: t_fb94b5fb89c4a48d.jpg
[21:56:14] [UPLOAD_RECOVERY] ⏭️ Thumbnail already on server: t_c8f0aac386a60643.jpg
[21:56:14] [UPLOAD_RECOVERY] ⏭️ Thumbnail already on server: t_c8f0aac386a60643.jpg
[21:56:14] [PUSH] Silent push received
[21:56:14] [PUSH_EMBED] No embedded message_data in notification
[21:56:14] [PUSH] No embedded data, pre-loading messages from server
[21:56:14] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:56:15] [CLIENT_SIG] Event received: type=3 messageId=4305
[21:56:15] [WS_EVENT] Received event: type=3, messageId=4305
[21:56:15] [WS_EVENT] Read receipt for message 4305 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:56:17] [COMBINED_FETCH] Loaded 3204 read receipts, 381 messages with reactions
[21:56:17] [READBY_ENRICH] Enriched 50 messages with readBy data
[21:56:17] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:17] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:17] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:17] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:17] [CLIENT_SIG] Client connected: Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF) on session 'ILUIWU' (my session: 'ILUIWU')
[21:56:19] [PUSH_PRELOAD] Fetched 3204 messages - caching for instant display
[21:56:19] [PUSH_PRELOAD] ⚡ Pre-cached 3204 messages for instant display
[21:56:19] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:56:19] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("aps"): {
"content-available" = 1;
}, AnyHashable("operation_type"): 3, AnyHashable("session_id"): ILUIWU, AnyHashable("message_id"): 4305]
[21:56:19] [PUSH] Parsed message_id: 4305
[21:56:19] [PUSH] Parsed operation_type: 3
[21:56:19] [PUSH] Taking direct action: opType=3, messageId=4305
[21:56:19] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=4305
[21:56:21] [UPLOAD_DEBUG] ========== START UPLOAD ==========
[21:56:21] [UPLOAD_DEBUG] Item ID: 543
[21:56:21] [UPLOAD_DEBUG] Local URL: /var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/Documents/MediaCache/1ad0647655c35d25.mov
[21:56:21] [UPLOAD_DEBUG] Random filename: 1ad0647655c35d25.mov
[21:56:21] [UPLOAD_DEBUG] Session ID: ILUIWU
[21:56:21] [UPLOAD_DEBUG] API Base: https://crivello.dyndns.org:443/WebRTC/chat/
[21:56:21] [UPLOAD_DEBUG] Retry count: 2
[21:56:21] [UPLOAD_STATUS] Updated in-memory status=2 for file: 1ad0647655c35d25.mov
[21:56:21] [UPLOAD_DEBUG] File exists: true
[21:56:21] [UPLOAD_DEBUG] File size: 1267972117 bytes (1209.2 MB)
[21:56:21] [UPLOAD_DEBUG] Chunked threshold: 104857600 bytes (100 MB)
[21:56:21] [UPLOAD_DEBUG] → Using CHUNKED upload (file > threshold)
[21:56:21] [UPLOAD_DEBUG] --- startChunkedUpload ---
[21:56:21] [UPLOAD_DEBUG] Chunked upload URL: https://crivello.dyndns.org:443/WebRTC/chat/upload_chunked.php
[21:56:21] [UPLOAD_DEBUG] File size: 1267972117 bytes (1209.2 MB)
[21:56:21] [UPLOAD_DEBUG] Chunk size: 104857600 bytes (100 MB)
[21:56:21] [UPLOAD_DEBUG] Total chunks: 13
[21:56:21] [UPLOAD_DEBUG] Updated DB status to 'uploading_chunked'
[21:56:21] [CHUNKED_RESUME] Checking resume: item.currentChunk=1, item.totalChunks=13, calculated totalChunks=13
[21:56:21] [CHUNKED_RESUME] ✅ Resuming from chunk 1/13, verifying with server...
[21:56:21] [CHUNKED_RESUME] Checking server for existing chunks: https://crivello.dyndns.org:443/WebRTC/chat/check_chunks.php?randomname=1ad0647655c35d25.mov&sessionid=ILUIWU&file_size=1267972117&total_chunks=13
[21:56:21] [CHUNKED_RESUME] Saved chunk info: totalChunks=13, fileSize=1267972117
[21:56:21] [UPLOAD_STATUS] Updated status=2 for file: 1ad0647655c35d25.mov
[21:56:21] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:21] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[21:56:21] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:21] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[21:56:21] [CHUNKED_RESUME] ❌ Invalid response:
[21:56:21] [CHUNKED_RESUME] Server verified: resuming from chunk 1
[21:56:22] [MENU] 🔍 dismissAnyExistingMenu called
[21:56:22] [MENU] ℹ️ No menu with tag 9999 found
[21:56:22] [MENU] ✅ dismissAnyExistingMenu completed
[21:56:22] [SEARCH] scrollViewWillBeginDragging - isSearchBarVisible=false, tab=0
[21:56:22] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:22] [CELL_UPLOAD] configure: msgId=4301, file=71742c3d78ed2063.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:22] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:22] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:22] [SEARCH] scrollViewDidEndDragging - scrollView=messagesTable, tab=0
[21:56:22] [SEARCH] contentOffset.y=151.0, topInset=0.0, pullDistance=-151.0
[21:56:22] [SEARCH] threshold=80.0, isSearchBarVisible=false
[21:56:22] [SEARCH] topRefresh.isRefreshing=false
[21:56:22] [SEARCH] ❌ Pull distance -151.0 < threshold 80.0
[21:56:22] [MENU] 🔍 dismissAnyExistingMenu called
[21:56:22] [MENU] ℹ️ No menu with tag 9999 found
[21:56:22] [MENU] ✅ dismissAnyExistingMenu completed
[21:56:22] [SEARCH] scrollViewWillBeginDragging - isSearchBarVisible=false, tab=0
[21:56:23] [SCROLL_BTN] Showing button - scrolled 201pt > half 196pt
[21:56:23] [SEARCH] scrollViewDidEndDragging - scrollView=messagesTable, tab=0
[21:56:23] [SEARCH] contentOffset.y=232.66666666666666, topInset=0.0, pullDistance=-232.66666666666666
[21:56:23] [SEARCH] threshold=80.0, isSearchBarVisible=false
[21:56:23] [SEARCH] topRefresh.isRefreshing=false
[21:56:23] [SEARCH] ❌ Pull distance -232.66666666666666 < threshold 80.0
[21:56:23] [REPLY_DEBUG] 📤 didTapSend - Sending message WITHOUT reply
[21:56:23] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:23] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=2
[21:56:23] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=2 → uploading
[21:56:23] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:23] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[21:56:23] [ANIMATION] 🎬 Animating 1 new bubbles - scrolling to top to show them
[21:56:23] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[21:56:23] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[21:56:24] [MENU] 🔍 dismissAnyExistingMenu called
[21:56:24] [MENU] ℹ️ No menu with tag 9999 found
[21:56:24] [MENU] ✅ dismissAnyExistingMenu completed
[21:56:24] [SEARCH] scrollViewWillBeginDragging - isSearchBarVisible=false, tab=0
[21:56:24] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:24] [CELL_UPLOAD] configure: msgId=4301, file=71742c3d78ed2063.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:24] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:24] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:24] [SCROLL_BTN] Showing button - scrolled 196pt > half 196pt
[21:56:24] [SEARCH] scrollViewDidEndDragging - scrollView=messagesTable, tab=0
[21:56:24] [SEARCH] contentOffset.y=233.33333333333334, topInset=0.0, pullDistance=-233.33333333333334
[21:56:24] [SEARCH] threshold=80.0, isSearchBarVisible=false
[21:56:24] [SEARCH] topRefresh.isRefreshing=false
[21:56:24] [SEARCH] ❌ Pull distance -233.33333333333334 < threshold 80.0
[21:56:25] [MENU] 🔍 dismissAnyExistingMenu called
[21:56:25] [MENU] ℹ️ No menu with tag 9999 found
[21:56:25] [MENU] ✅ dismissAnyExistingMenu completed
[21:56:25] [SEARCH] scrollViewWillBeginDragging - isSearchBarVisible=false, tab=0
[21:56:25] [SEARCH] scrollViewDidEndDragging - scrollView=messagesTable, tab=0
[21:56:25] [SEARCH] contentOffset.y=381.6666666666667, topInset=0.0, pullDistance=-381.6666666666667
[21:56:25] [SEARCH] threshold=80.0, isSearchBarVisible=false
[21:56:25] [SEARCH] topRefresh.isRefreshing=false
[21:56:25] [SEARCH] ❌ Pull distance -381.6666666666667 < threshold 80.0
[21:56:25] [CLIENT_SIG] Event received: type=0 messageId=4307
[21:56:25] [WS_EVENT] Received event: type=0, messageId=4307
[21:56:25] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":4307,"session_id":"ILUIWU","message_type":0,"file_name":"","datesent_utc":"2025-12-08 18:56:23"}
[21:56:25] [WS_EVENT] New message notification - refreshing
[21:56:25] [CHAT] receive_message.php JSON: ["datesent_utc": 2025-12-08 18:56:23, "message_type": 0, "ok": 1, "message_id": 4307, "session_id": ILUIWU, "file_name": ]
[21:56:25] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 4306
[21:56:25] ReloadData 9
[21:56:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:25] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=2
[21:56:25] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=2 → uploading
[21:56:25] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:25] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[21:56:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:25] [CELL_UPLOAD] configure: msgId=4301, file=71742c3d78ed2063.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:25] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:25] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[21:56:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:25] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=2
[21:56:25] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=2 → uploading
[21:56:25] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:25] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[21:56:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:25] [CELL_UPLOAD] configure: msgId=4301, file=71742c3d78ed2063.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:25] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:25] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:25] [CENTER_CONTENT] boundsSize: (0.0, 0.0), contentSize: (440.0, 956.0)
[21:56:25] [CENTER_CONTENT] topSafeArea: 0.0, controlsHeight: 76.0, visibleHeight: -76.0
[21:56:25] [CENTER_CONTENT] Content larger than visible - Setting insets: UIEdgeInsets(top: 0.0, left: 0.0, bottom: 76.0, right: 0.0)
[21:56:27] [PUSH] Silent push received
[21:56:27] [PUSH_EMBED] No embedded message_data in notification
[21:56:27] [PUSH] No embedded data, pre-loading messages from server
[21:56:27] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:56:27] [CLIENT_SIG] Event received: type=3 messageId=4307
[21:56:27] [WS_EVENT] Received event: type=3, messageId=4307
[21:56:27] [WS_EVENT] Read receipt for message 4307 by Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:56:28] [MENU] 🔍 dismissAnyExistingMenu called
[21:56:28] [MENU] ℹ️ No menu with tag 9999 found
[21:56:28] [MENU] ✅ dismissAnyExistingMenu completed
[21:56:28] [SEARCH] scrollViewWillBeginDragging - isSearchBarVisible=false, tab=0
[21:56:28] [SEARCH] scrollViewDidEndDragging - scrollView=messagesTable, tab=0
[21:56:28] [SEARCH] contentOffset.y=5.666666666666667, topInset=0.0, pullDistance=-5.666666666666667
[21:56:28] [SEARCH] threshold=80.0, isSearchBarVisible=false
[21:56:28] [SEARCH] topRefresh.isRefreshing=false
[21:56:28] [SEARCH] ❌ Pull distance -5.666666666666667 < threshold 80.0
[21:56:28] [PUSH_PRELOAD] Fetched 3205 messages - caching for instant display
[21:56:28] [MENU] 🔍 dismissAnyExistingMenu called
[21:56:28] [MENU] ℹ️ No menu with tag 9999 found
[21:56:28] [MENU] ✅ dismissAnyExistingMenu completed
[21:56:28] [SEARCH] scrollViewWillBeginDragging - isSearchBarVisible=false, tab=0
[21:56:29] [PUSH_PRELOAD] ⚡ Pre-cached 3205 messages for instant display
[21:56:29] [SEARCH] scrollViewDidEndDragging - scrollView=messagesTable, tab=0
[21:56:29] [SEARCH] contentOffset.y=-199.66666666666666, topInset=0.0, pullDistance=199.66666666666666
[21:56:29] [SEARCH] threshold=80.0, isSearchBarVisible=false
[21:56:29] [SEARCH] topRefresh.isRefreshing=false
[21:56:29] [SEARCH] ✅ Pull distance 199.66666666666666 >= threshold 80.0
[21:56:29] [SEARCH] 🔍 Showing search bar (first pull)
[21:56:29] [SEARCH] showSearchBar() called - animated=true, isSearchBarVisible=false
[21:56:29] [SEARCH] ✅ Setting isSearchBarVisible = true
[21:56:29] [SEARCH] chatSearchBar is nil? false
[21:56:29] [SEARCH] Applied theme: day
[21:56:29] [SEARCH] Adjusting table contentInset.top by +56.0
[21:56:29] [SEARCH] Table contentInset.top: 0.0 -> 56.0
[21:56:29] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:56:29] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("message_id"): 4307, AnyHashable("aps"): {
"content-available" = 1;
}]
[21:56:29] [PUSH] Parsed message_id: 4307
[21:56:29] [PUSH] Parsed operation_type: 3
[21:56:29] [PUSH] Taking direct action: opType=3, messageId=4307
[21:56:29] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=4307
[21:56:29] [SEARCH] Focusing search field
[21:56:29] [MENU] 🔍 dismissAnyExistingMenu called
[21:56:29] [MENU] ℹ️ No menu with tag 9999 found
[21:56:29] [MENU] ✅ dismissAnyExistingMenu completed
[21:56:29] [SEARCH] scrollViewWillBeginDragging - isSearchBarVisible=true, tab=0
[21:56:29] [SEARCH] 🔽 Hiding search bar (user started scrolling)
[21:56:29] [SEARCH] hideSearchBar() called - animated=true, isSearchBarVisible=true
[21:56:29] [SEARCH] ✅ Setting isSearchBarVisible = false
[21:56:29] [SEARCH] Adjusting table contentInset.top by -56.0
[21:56:29] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:29] [CELL_UPLOAD] configure: msgId=4301, file=71742c3d78ed2063.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:29] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:29] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:29] [SEARCH] handleTopRefresh called - tab=0, isSearchBarVisible=false
[21:56:29] [SEARCH] 🔍 First pull on Tab 0 - showing search bar instead of refresh
[21:56:29] [SEARCH] showSearchBar() called - animated=true, isSearchBarVisible=false
[21:56:29] [SEARCH] ✅ Setting isSearchBarVisible = true
[21:56:29] [SEARCH] chatSearchBar is nil? false
[21:56:29] [SEARCH] Applied theme: day
[21:56:29] [SEARCH] Adjusting table contentInset.top by +56.0
[21:56:29] [SEARCH] Table contentInset.top: 0.0 -> 56.0
[21:56:29] [SEARCH] handleTopRefresh called - tab=0, isSearchBarVisible=true
[21:56:29] [CHAT] top pull-to-refresh triggered on tab 0
[21:56:29] [CHANNEL_SWITCH] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=EDAD55A1-003F-415D-AA60-672B34B504FE
[21:56:29] [SEARCH] Focusing search field
[21:56:29] [SEARCH] scrollViewDidEndDragging - scrollView=messagesTable, tab=0
[21:56:29] [SEARCH] contentOffset.y=-232.33333333333334, topInset=116.0, pullDistance=116.33333333333334
[21:56:29] [SEARCH] threshold=80.0, isSearchBarVisible=true
[21:56:29] [SEARCH] topRefresh.isRefreshing=true
[21:56:29] [SEARCH] ✅ Pull distance 116.33333333333334 >= threshold 80.0
[21:56:29] [SEARCH] ℹ️ Search bar already visible, allowing refresh
[21:56:29] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:29] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=2
[21:56:29] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=2 → uploading
[21:56:29] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:30] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[21:56:30] [MENU] 🔍 dismissAnyExistingMenu called
[21:56:30] [MENU] ℹ️ No menu with tag 9999 found
[21:56:30] [MENU] ✅ dismissAnyExistingMenu completed
[21:56:30] [SEARCH] scrollViewWillBeginDragging - isSearchBarVisible=true, tab=0
[21:56:30] [SEARCH] 🔽 Hiding search bar (user started scrolling)
[21:56:30] [SEARCH] hideSearchBar() called - animated=true, isSearchBarVisible=true
[21:56:30] [SEARCH] ✅ Setting isSearchBarVisible = false
[21:56:30] [SEARCH] Adjusting table contentInset.top by -56.0
[21:56:30] [SEARCH] scrollViewDidEndDragging - scrollView=messagesTable, tab=0
[21:56:30] [SEARCH] contentOffset.y=-70.66666666666667, topInset=60.0, pullDistance=10.666666666666671
[21:56:30] [SEARCH] threshold=80.0, isSearchBarVisible=false
[21:56:30] [SEARCH] topRefresh.isRefreshing=true
[21:56:30] [SEARCH] ❌ Pull distance 10.666666666666671 < threshold 80.0
[21:56:30] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:30] [CELL_UPLOAD] configure: msgId=4301, file=71742c3d78ed2063.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:30] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:30] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:30] [PENDING_UPLOAD] Found pending message: id=-4, file=, uploadStatus=0
[21:56:30] [PENDING_UPLOAD] Found pending message: id=-9, file=c8f0aac386a60643.jpg, uploadStatus=2
[21:56:30] [PENDING_UPLOAD] Total pending upload messages: 2
[21:56:30] [PENDING_UPLOAD] Preserved 2 pending messages before server refresh
[21:56:30] [PENDING_UPLOAD] Reinserting 2 pending messages
[21:56:30] [PENDING_UPLOAD] ✅ Reinserted message -4
[21:56:30] [PENDING_UPLOAD] ✅ Reinserted message -9
[21:56:30] [MENU] 🔍 dismissAnyExistingMenu called
[21:56:30] [MENU] ℹ️ No menu with tag 9999 found
[21:56:30] [MENU] ✅ dismissAnyExistingMenu completed
[21:56:30] [SEARCH] scrollViewWillBeginDragging - isSearchBarVisible=false, tab=0
[21:56:31] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[21:56:31] DOWNLOADIIING t_97828ef5de49a612.jpg
[21:56:31] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=3205
[21:56:31] [CHANNEL_SWITCH] 📊 Setting allMessagesWithReadBy = 3205 msgs
[21:56:31] [READBY_LOADED] msg 4307: readBy.count=1, readBy=["3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF"], isMyMsg=true
[21:56:31] [READBY_LOADED] msg 4306: readBy.count=0, readBy=[], isMyMsg=false
[21:56:31] [READBY_LOADED] msg 4305: readBy.count=1, readBy=["EDAD55A1-003F-415D-AA60-672B34B504FE"], isMyMsg=false
[21:56:31] [READBY_LOADED] msg 4304: readBy.count=1, readBy=["3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF"], isMyMsg=true
[21:56:31] [READBY_LOADED] msg 4303: readBy.count=1, readBy=["EDAD55A1-003F-415D-AA60-672B34B504FE"], isMyMsg=false
[21:56:31] [PENDING_UPLOAD] ✅ Merged pending message id=-4, file=
[21:56:31] [PENDING_UPLOAD] ⏭️ Skipped pending message id=-9 - already exists in server data
[21:56:31] [PENDING_UPLOAD] Final merged count: 3206 (server: 3205, kept pending: 1)
[21:56:31] [CHANNEL_SWITCH] 📊 chatRows.count = 3254
[21:56:31] ReloadData 15 (3206 messages loaded, 17 pending media)
[21:56:31] DOWNLOADIIING 1b1a78050ebe099b.jpg
[21:56:31] DOWNLOADIIING bae538c2a3076c11.heic
[21:56:31] DOWNLOADIIING ee42d57ffd8ab767.jpg
[21:56:31] DOWNLOADIIING 5cfd84d52271d308.heic
[21:56:31] DOWNLOADIIING 0f2dda66cccdeadf.heic
[21:56:31] DOWNLOADIIING 2a4c7380908d6595.jpg
[21:56:31] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:31] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:31] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:31] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:31] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:31] [CELL_UPLOAD] configure: msgId=4301, file=71742c3d78ed2063.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:31] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:31] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:31] [PULL_REFRESH] Loaded 3206 messages (first page), displaying 3206 for tab 0, hasMore: true
[21:56:31] ReloadData 15 (pull-to-refresh completed)
[21:56:31] ReloadData 14 (all 17 media thumbnails loaded) - applying tab 0 filtering
[21:56:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:32] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:32] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:32] [CELL_UPLOAD] configure: msgId=4301, file=71742c3d78ed2063.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:32] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:32] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:32] [SEARCH] scrollViewDidEndDragging - scrollView=messagesTable, tab=0
[21:56:32] [SEARCH] contentOffset.y=153.33333333333334, topInset=0.0, pullDistance=-153.33333333333334
[21:56:32] [SEARCH] threshold=80.0, isSearchBarVisible=false
[21:56:32] [SEARCH] topRefresh.isRefreshing=false
[21:56:32] [SEARCH] ❌ Pull distance -153.33333333333334 < threshold 80.0
[21:56:32] [MENU] 🔍 dismissAnyExistingMenu called
[21:56:32] [MENU] ℹ️ No menu with tag 9999 found
[21:56:32] [MENU] ✅ dismissAnyExistingMenu completed
[21:56:32] [SEARCH] scrollViewWillBeginDragging - isSearchBarVisible=false, tab=0
[21:56:32] [SEARCH] scrollViewDidEndDragging - scrollView=messagesTable, tab=0
[21:56:32] [SEARCH] contentOffset.y=56.0, topInset=0.0, pullDistance=-56.0
[21:56:32] [SEARCH] threshold=80.0, isSearchBarVisible=false
[21:56:32] [SEARCH] topRefresh.isRefreshing=false
[21:56:32] [SEARCH] ❌ Pull distance -56.0 < threshold 80.0
[21:56:33] [PUSH] Silent push received
[21:56:33] [PUSH_EMBED] No embedded message_data in notification
[21:56:33] [PUSH] No embedded data, pre-loading messages from server
[21:56:33] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:56:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[21:56:33] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:33] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:33] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:56:33] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:56:33] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:56:33] [CLIENT_SIG] Event received: type=3 messageId=4306
[21:56:33] [WS_EVENT] Received event: type=3, messageId=4306
[21:56:33] [WS_EVENT] Read receipt for message 4306 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:56:35] [PUSH_PRELOAD] Fetched 3205 messages - caching for instant display
[21:56:35] [PUSH_PRELOAD] ⚡ Pre-cached 3205 messages for instant display
[21:56:35] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:56:35] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 4306, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3, AnyHashable("aps"): {
"content-available" = 1;
}]
[21:56:35] [PUSH] Parsed message_id: 4306
[21:56:35] [PUSH] Parsed operation_type: 3
[21:56:35] [PUSH] Taking direct action: opType=3, messageId=4306
[21:56:35] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=4306
[21:56:38] [LIFECYCLE] App resigning active - cleared crash flag
[21:56:38] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[21:56:38] [SECURITY] Saved background timestamp
[21:56:38] [LIFECYCLE] App entering background - cleared crash flag
[21:56:38] [CLIENT_SIG] Disconnecting
[21:56:38] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[21:56:38] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=0
[21:56:38] [WS] Canceling WebSocket for query connection to iosILUIWU
[21:56:38] In cleanupPeer
[21:56:38] In cleanupPeer
[21:56:38] [LIFECYCLE] WebRTC audio disabled
[21:56:38] [LIFECYCLE] AVAudioSession deactivated
[21:56:38] [LIFECYCLE] All connections stopped
[21:56:39] [CLIENT_SIG] WebSocket closed with code 1001
[21:56:39] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:56:39] [SERVER] Stopped reconnect polling
[21:56:39] Will request stop of video 0
[21:56:39] Will request stop of video 0
[21:56:39] [WS] WebSocket ACTUALLY CLOSED - isQueryOnly=true, connectionStr=iosILUIWU, closeCode=1001
[21:56:39] [WS] Query connection to iosILUIWU closed - cleaning up all agent connections and views
[21:56:39] [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:56:39] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:56:39] [WS] Connection failed: The operation couldn’t be completed. Socket is not connected
[21:56:39] [WS] Query connection failed - cleaning up all agent connections and views
[21:56:39] [PIP] Removing 0 tracks from PiP for connection 0
[21:56:39] [PIP] ✅ All tracks removed for connection 0
[21:56:39] [PIP] Removing 0 tracks from PiP for connection 0
[21:56:39] [PIP] ✅ All tracks removed for connection 0
[21:56:39] [CLEANUP] ========================================
[21:56:39] [CLEANUP] Cleaning up all agent connections and views
[21:56:39] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:56:39] [CLEANUP] Stopped and removed 0 video connections
[21:56:39] [CLEANUP] Removed 0 video views
[21:56:39] [CLEANUP] Removed 0 feed scroll views
[21:56:39] [CLEANUP] Removed 0 status labels
[21:56:39] [CLEANUP] Reset agent query state
[21:56:39] [CLEANUP] Updated page indicator
[21:56:39] [CLEANUP] Rebuilt video layout
[21:56:39] [CLEANUP] ✅ All agent connections and views cleaned up
[21:56:39] [CLEANUP] ========================================
[21:56:39] [SERVER] Skipping reconnect polling - app is in background
[21:56:39] [WS] URLSession invalidated successfully
[21:56:39] [CLEANUP] ========================================
[21:56:39] [CLEANUP] Cleaning up all agent connections and views
[21:56:39] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:56:39] [CLEANUP] Stopped and removed 0 video connections
[21:56:39] [CLEANUP] Removed 0 video views
[21:56:39] [CLEANUP] Removed 0 feed scroll views
[21:56:39] [CLEANUP] Removed 0 status labels
[21:56:39] [CLEANUP] Reset agent query state
[21:56:39] [CLEANUP] Updated page indicator
[21:56:39] [CLEANUP] Rebuilt video layout
[21:56:39] [CLEANUP] ✅ All agent connections and views cleaned up
[21:56:39] [CLEANUP] ========================================
[21:56:39] [SERVER] Skipping reconnect polling - app is in background
[21:57:05] [PUSH] Silent push received
[21:57:05] [PUSH_EMBED] Processing embedded message: id=4308, type=0, sender=Laurent
[21:57:05] [PUSH_EMBED] Saved message 4308 to local DB
[21:57:05] [PUSH_EMBED] Inserted message into existing cache (now 3206 messages)
[21:57:05] [PUSH_EMBED] Fetching evolution data for message 4308 in background
[21:57:05] [PUSH] Embedded message handled instantly from silent push
[21:57:05] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[21:57:05] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:57:05] [CLIENT_SIG] Connecting to session ILUIWU as Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:57:05] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_data"): {
datesent = "2025-12-08 18:57:03";
"file_name" = "";
message = "\Ud83d\Ude22";
"message_id" = 4308;
"message_type" = 0;
"sender_id" = "3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF";
"sender_name" = Laurent;
"session_id" = ILUIWU;
timer = 0;
}, AnyHashable("aps"): {
"content-available" = 1;
}, AnyHashable("operation_type"): 0, AnyHashable("message_id"): 4308, AnyHashable("session_id"): ILUIWU]
[21:57:05] [PUSH_EMBED_VC] Processing embedded message: id=4308, type=0, sender=Laurent
[21:57:05] [PUSH_EMBED_VC] Inserted message 4308 into allMessagesWithReadBy (now 51 messages)
[21:57:05] [PUSH] ⚡ Embedded message handled directly in ViewController
[21:57:05] [PUSH] Parsed message_id: 4308
[21:57:05] [PUSH] Parsed operation_type: 0
[21:57:05] [PUSH] Taking direct action: opType=0, messageId=4308
[21:57:05] [PUSH] TakeActionFromPush called: OperationType=0, MessageIds=4308
[21:57:05] [PUSH] ⚡ Message 4308 already in memory (embedded push) - skipping server fetch
[21:57:05] [UPLOAD_QUEUE] Scheduling retry #3 for id=543 in 16.0s
[21:57:05] [PUSH_EMBED_VC] Saved message 4308 to local DB
[21:57:05] [EVOLUTION_FILTER] 📝 Updated lastSeenMessageId after marking as read: 4307 → 4308
[21:57:05] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:57:05] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:57:05] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:57:05] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:57:05] [ANIMATION] 🎬 Animating 1 new bubbles - scrolling to top to show them
[21:57:05] [AUTO_PLAY] 🎬 autoPlayMessageEvolution called for message 4308
[21:57:05] [AUTO_PLAY] 🚫 Evolution disabled - calling revertEvolutionState for 4308
[21:57:05] [REVERT] 🔄 revertEvolutionState called for message 4308
[21:57:05] [REVERT] 🔍 Looking in chatMessages (count=51)
[21:57:05] [REVERT] ✅ Found at index 0, BEFORE: isPlayingEvolution=false, text='😢'
[21:57:05] [REVERT] ✅ Also updated allMessagesWithReadBy at index 0
[21:57:05] [REVERT] 🔍 AFTER: isPlayingEvolution=false, text='😢'
[21:57:05] [UPDATE_CELL] 🔍 updateMessageCell called for message 4308
[21:57:05] [UPDATE_CELL] Initial targetRowIndex=1
[21:57:05] [UPDATE_CELL] Rebuilt chatRows, count=52
[21:57:05] [UPDATE_CELL] After rebuild targetRowIndex=1
[21:57:05] [UPDATE_CELL] 📝 Message state: isPlayingEvolution=false, evolutionText='', text='😢'
[21:57:05] [UPDATE_CELL] ✅ Updating ChatCell label to: '😢'
[21:57:05] [REVERT] ✅ updateMessageCell completed
[21:57:06] [CLIENT_SIG] WebSocket opened
[21:57:06] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:57:06] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:57:06] HELLO → sent (cached token, role=query)
[21:57:06] [PUSH_EMBED] Got evolution data for message 4308, saving to local DB
[21:57:06] [PUSH_EMBED] Saved evolution data for message 4308
[21:57:06] [CLIENT_SIG] Connected! clientId=3FHezt9SXJ3FQguT
[21:57:06] [SIG] hello_ok received for query connection - ready to query agents
[21:57:06] [SIG] get_agents request sent for sessionId=ILUIWU
[21:57:06] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:57:06] [SERVER] Stopped reconnect polling
[21:57:06] [CLIENT_SIG] Received 2 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:57:06] [CLIENT_SIG] - Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:57:06] [CLIENT_SIG] - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:57:06] [SIG] agents_list received: []
[21:57:06] [SIG] agents_list received: []
[21:57:06] [CLIENT_SIG] Client disconnected: Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF) on session 'ILUIWU' (my session: 'ILUIWU')
[21:57:06] [CLIENT_SIG] Client disconnected: Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF) on session 'ILUIWU' (my session: 'ILUIWU')
[21:57:07] [PUSH] Silent push received
[21:57:07] [PUSH_EMBED] No embedded message_data in notification
[21:57:07] [PUSH] No embedded data, pre-loading messages from server
[21:57:07] [PUSH_PRELOAD] Fetching messages for instant display cache
[21:57:07] [CLIENT_SIG] Event received: type=3 messageId=4308
[21:57:07] [WS_EVENT] Received event: type=3, messageId=4308
[21:57:07] [WS_EVENT] Read receipt for message 4308 by Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:57:11] [CLIENT_SIG] Client connected: Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF) on session 'ILUIWU' (my session: 'ILUIWU')
[21:57:14] [CLIENT_SIG] Client disconnected: Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF) on session 'ILUIWU' (my session: 'ILUIWU')
[21:57:14] [CLIENT_SIG] Client disconnected: Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF) on session 'ILUIWU' (my session: 'ILUIWU')
[21:57:15] [PUSH_PRELOAD] Fetched 3206 messages - caching for instant display
[21:57:16] [WS] WebSocket task completed with error - isQueryOnly=true: The request timed out.
[21:57:16] [WS] Query connection error - cleaning up all agent connections and views
[21:57:16] [CLEANUP] ========================================
[21:57:16] [CLEANUP] Cleaning up all agent connections and views
[21:57:16] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:57:16] [CLEANUP] Stopped and removed 0 video connections
[21:57:16] [CLEANUP] Removed 0 video views
[21:57:16] [CLEANUP] Removed 0 feed scroll views
[21:57:16] [CLEANUP] Removed 0 status labels
[21:57:16] [CLEANUP] Reset agent query state
[21:57:16] [CLEANUP] Updated page indicator
[21:57:16] [CLEANUP] Rebuilt video layout
[21:57:16] [CLEANUP] ✅ All agent connections and views cleaned up
[21:57:16] [CLEANUP] ========================================
[21:57:16] [SERVER] Skipping reconnect polling - app is in background
[21:57:19] [PUSH_PRELOAD] ⚡ Pre-cached 3206 messages for instant display
[21:57:19] [PUSH_PRELOAD] ✅ Pre-load complete with thumbnails
[21:57:19] [PUSH] handlePollEventsNotification userInfo: [AnyHashable("message_id"): 4308, AnyHashable("aps"): {
"content-available" = 1;
}, AnyHashable("session_id"): ILUIWU, AnyHashable("operation_type"): 3]
[21:57:19] [PUSH] Parsed message_id: 4308
[21:57:19] [PUSH] Parsed operation_type: 3
[21:57:19] [PUSH] Taking direct action: opType=3, messageId=4308
[21:57:19] [PUSH] TakeActionFromPush called: OperationType=3, MessageIds=4308
[21:57:30] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[21:57:30] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[21:57:30] [LIFECYCLE] App entering foreground - restoring connections
[21:57:30] [UPLOAD_RETRY] No pending uploads to retry
[21:57:30] [LIFECYCLE] Merged 382 reactions from local DB
[21:57:30] [LIFECYCLE] Near top with 51 messages - trimming to 50
[21:57:30] [UPLOAD_DEBUG] ========== START UPLOAD ==========
[21:57:30] [UPLOAD_DEBUG] Item ID: 543
[21:57:30] [UPLOAD_DEBUG] Local URL: /var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/Documents/MediaCache/1ad0647655c35d25.mov
[21:57:30] [UPLOAD_DEBUG] Random filename: 1ad0647655c35d25.mov
[21:57:30] [UPLOAD_DEBUG] Session ID: ILUIWU
[21:57:30] [UPLOAD_DEBUG] API Base: https://crivello.dyndns.org:443/WebRTC/chat/
[21:57:30] [UPLOAD_DEBUG] Retry count: 3
[21:57:30] [UPLOAD_DEBUG] File exists: true
[21:57:30] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:57:30] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:57:30] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:57:30] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:57:30] [LIFECYCLE] WebRTC audio re-enabled
[21:57:30] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[21:57:30] [VIEWER] Reconnecting after background - querying agents
[21:57:30] [CLIENT_SIG] Receive error: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSDescription=Software caused connection abort}
[21:57:30] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:57:30] [CLIENT_SIG] Task completed with error: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSDescription=Software caused connection abort, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalWebSocketTask <19260F2F-3D86-4197-B64E-7D13F897AF0D>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <19260F2F-3D86-4197-B64E-7D13F897AF0D>.<1>}
[21:57:30] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:57:30] [WS] Connection failed: The operation couldn’t be completed. Software caused connection abort
[21:57:30] [WS] Query connection failed - cleaning up all agent connections and views
[21:57:30] [UPLOAD_STATUS] Updated in-memory status=2 for file: 1ad0647655c35d25.mov
[21:57:30] [UPLOAD_STATUS] Updated status=2 for file: 1ad0647655c35d25.mov
[21:57:30] [CLEANUP] ========================================
[21:57:30] [CLEANUP] Cleaning up all agent connections and views
[21:57:30] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:57:30] [CLEANUP] Stopped and removed 0 video connections
[21:57:30] [CLEANUP] Removed 0 video views
[21:57:30] [CLEANUP] Removed 0 feed scroll views
[21:57:30] [CLEANUP] Removed 0 status labels
[21:57:30] [CLEANUP] Reset agent query state
[21:57:30] [CLEANUP] Updated page indicator
[21:57:30] [CLEANUP] Rebuilt video layout
[21:57:30] [CLEANUP] ✅ All agent connections and views cleaned up
[21:57:30] [CLEANUP] ========================================
[21:57:30] [SERVER] Starting reconnect polling (5s interval)
[21:57:30] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:57:30] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[21:57:30] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:57:30] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[21:57:30] [UPLOAD_DEBUG] File size: 1267972117 bytes (1209.2 MB)
[21:57:30] [UPLOAD_DEBUG] Chunked threshold: 104857600 bytes (100 MB)
[21:57:30] [UPLOAD_DEBUG] → Using CHUNKED upload (file > threshold)
[21:57:30] [UPLOAD_DEBUG] --- startChunkedUpload ---
[21:57:30] [UPLOAD_DEBUG] Chunked upload URL: https://crivello.dyndns.org:443/WebRTC/chat/upload_chunked.php
[21:57:30] [UPLOAD_DEBUG] File size: 1267972117 bytes (1209.2 MB)
[21:57:30] [UPLOAD_DEBUG] Chunk size: 104857600 bytes (100 MB)
[21:57:30] [UPLOAD_DEBUG] Total chunks: 13
[21:57:30] [UPLOAD_DEBUG] Updated DB status to 'uploading_chunked'
[21:57:30] [CHUNKED_RESUME] Checking resume: item.currentChunk=1, item.totalChunks=13, calculated totalChunks=13
[21:57:30] [CHUNKED_RESUME] ✅ Resuming from chunk 1/13, verifying with server...
[21:57:30] [CHUNKED_RESUME] Checking server for existing chunks: https://crivello.dyndns.org:443/WebRTC/chat/check_chunks.php?randomname=1ad0647655c35d25.mov&sessionid=ILUIWU&file_size=1267972117&total_chunks=13
[21:57:30] [CHUNKED_RESUME] Saved chunk info: totalChunks=13, fileSize=1267972117
[21:57:31] [CHUNKED_RESUME] ❌ Invalid response:
[21:57:31] [CHUNKED_RESUME] Server verified: resuming from chunk 1
[21:57:31] [SECURITY] sceneDidBecomeActive - isAuthenticated=true, didEnterBackground=true
[21:57:31] [SECURITY] Timeout exceeded - requiring re-authentication
[21:57:31] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[21:57:31] [PUSH] handlePollEventsNotification userInfo: [:]
[21:57:31] [PUSH] No message_id in userInfo
[21:57:31] [PUSH] No operation_type in userInfo
[21:57:31] [FAST_REFRESH] Evolution disabled - performing incremental sync
[21:57:31] [FAST_REFRESH] Already have 50 messages - skipping local DB load
[21:57:31] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[21:57:31] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:57:31] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=2
[21:57:31] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=2 → uploading
[21:57:31] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:57:31] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[21:57:31] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[21:57:31] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 4308
[21:57:31] [INCREMENTAL_SYNC] ✅ No new messages
[21:57:31] [FAST_REFRESH] Incremental sync complete - 50 messages
[21:57:32] [WS] Creating new WebSocket - isQueryOnly=true, connectionStr=iosILUIWU
[21:57:32] [WS] Opening session at ws://crivello.dyndns.org:8081/
[21:57:32] [WS] WebSocket ACTUALLY OPENED - isQueryOnly=true, connectionStr=iosILUIWU
[21:57:32] HELLO → sent (cached token, role=query)
[21:57:32] [SIG] hello_ok received for query connection - ready to query agents
[21:57:32] [SIG] get_agents request sent for sessionId=ILUIWU
[21:57:32] [SIG] get_agents request sent for sessionId=iosILUIWU
[21:57:32] [SERVER] Stopped reconnect polling
[21:57:33] [PIN_AUTH] Correct PIN
[21:57:33] [SECURITY] Restored real session: ILUIWU
[21:57:33] [SECURITY] Restored real session: ILUIWU
[21:57:33] [LOCK] ✅ PIN auth callback - setting isAuthenticated = true
[21:57:33] [FAKE MODE] Exiting fake mode, restoring real session
[21:57:33] [SECURITY] Restored real session: ILUIWU
[21:57:33] [SECURITY] Saved real session: ILUIWU
[21:57:33] [FAKE MODE] ✅ Restored real session: ILUIWU
[21:57:33] [UPLOAD_DEBUG] ========== START UPLOAD ==========
[21:57:33] [UPLOAD_DEBUG] ========== START UPLOAD ==========
[21:57:33] [UPLOAD_DEBUG] Item ID: 539
[21:57:33] [UPLOAD_DEBUG] Item ID: 538
[21:57:33] [UPLOAD_DEBUG] Local URL: /var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/Documents/MediaCache/65b3c13d384997a5.mov
[21:57:33] [UPLOAD_DEBUG] Local URL: /var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/Documents/MediaCache/fb94b5fb89c4a48d.mov
[21:57:33] [UPLOAD_DEBUG] Random filename: 65b3c13d384997a5.mov
[21:57:33] [UPLOAD_DEBUG] Random filename: fb94b5fb89c4a48d.mov
[21:57:33] [UPLOAD_DEBUG] Session ID: ILUIWU
[21:57:33] [UPLOAD_DEBUG] Session ID: ILUIWU
[21:57:33] [UPLOAD_DEBUG] API Base: https://crivello.dyndns.org:443/WebRTC/chat/
[21:57:33] [UPLOAD_DEBUG] API Base: https://crivello.dyndns.org:443/WebRTC/chat/
[21:57:33] [UPLOAD_DEBUG] Retry count: 5
[21:57:33] [UPLOAD_DEBUG] Retry count: 5
[21:57:33] [UPLOAD_DEBUG] File exists: true
[21:57:33] [UPLOAD_DEBUG] File exists: true
[21:57:33] [UPLOAD_DEBUG] File size: 959895378 bytes (915.4 MB)
[21:57:33] [UPLOAD_DEBUG] File size: 1267972117 bytes (1209.2 MB)
[21:57:33] [UPLOAD_DEBUG] Chunked threshold: 104857600 bytes (100 MB)
[21:57:33] [UPLOAD_DEBUG] Chunked threshold: 104857600 bytes (100 MB)
[21:57:33] [UPLOAD_DEBUG] → Using CHUNKED upload (file > threshold)
[21:57:33] [UPLOAD_DEBUG] → Using CHUNKED upload (file > threshold)
[21:57:33] [UPLOAD_DEBUG] --- startChunkedUpload ---
[21:57:33] [UPLOAD_DEBUG] --- startChunkedUpload ---
[21:57:33] [UPLOAD_DEBUG] Chunked upload URL: https://crivello.dyndns.org:443/WebRTC/chat/upload_chunked.php
[21:57:33] [UPLOAD_DEBUG] Chunked upload URL: https://crivello.dyndns.org:443/WebRTC/chat/upload_chunked.php
[21:57:33] [UPLOAD_DEBUG] File size: 959895378 bytes (915.4 MB)
[21:57:33] [UPLOAD_DEBUG] File size: 1267972117 bytes (1209.2 MB)
[21:57:33] [UPLOAD_DEBUG] Chunk size: 104857600 bytes (100 MB)
[21:57:33] [UPLOAD_DEBUG] Chunk size: 104857600 bytes (100 MB)
[21:57:33] [UPLOAD_DEBUG] Total chunks: 10
[21:57:33] [UPLOAD_DEBUG] Total chunks: 13
[21:57:33] [UPLOAD_DEBUG] Updated DB status to 'uploading_chunked'
[21:57:33] [UPLOAD_DEBUG] Updated DB status to 'uploading_chunked'
[21:57:33] [CHUNKED_RESUME] Checking resume: item.currentChunk=4, item.totalChunks=10, calculated totalChunks=10
[21:57:33] [CHUNKED_RESUME] Checking resume: item.currentChunk=3, item.totalChunks=13, calculated totalChunks=13
[21:57:33] [CHUNKED_RESUME] ✅ Resuming from chunk 4/10, verifying with server...
[21:57:33] [CHUNKED_RESUME] ✅ Resuming from chunk 3/13, verifying with server...
[21:57:33] [CHUNKED_RESUME] Saved chunk info: totalChunks=10, fileSize=959895378
[21:57:33] [CHUNKED_RESUME] Checking server for existing chunks: https://crivello.dyndns.org:443/WebRTC/chat/check_chunks.php?randomname=fb94b5fb89c4a48d.mov&sessionid=ILUIWU&file_size=1267972117&total_chunks=13
[21:57:33] [CHUNKED_RESUME] Checking server for existing chunks: https://crivello.dyndns.org:443/WebRTC/chat/check_chunks.php?randomname=65b3c13d384997a5.mov&sessionid=ILUIWU&file_size=959895378&total_chunks=10
[21:57:33] [CHUNKED_RESUME] Saved chunk info: totalChunks=13, fileSize=1267972117
[21:57:34] DOWNLOADIIING 1b1a78050ebe099b.jpg
[21:57:34] DOWNLOADIIING bae538c2a3076c11.heic
[21:57:34] DOWNLOADIIING ee42d57ffd8ab767.jpg
[21:57:34] DOWNLOADIIING 5cfd84d52271d308.heic
[21:57:34] DOWNLOADIIING 0f2dda66cccdeadf.heic
[21:57:34] DOWNLOADIIING 2a4c7380908d6595.jpg
[21:57:34] [CHUNKED_RESUME] ❌ Invalid response:
[21:57:34] [CHUNKED_RESUME] Server verified: resuming from chunk 3
[21:57:34] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:57:34] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[21:57:34] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[21:57:34] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:57:34] [UPLOAD_STATUS] Updated status=2 for file: 65b3c13d384997a5.mov
[21:57:34] [UPLOAD_STATUS] Updated status=2 for file: fb94b5fb89c4a48d.mov
[21:57:34] [SIG] agents_list received: []
[21:57:34] [SIG] agents_list received: []
[21:57:34] [CHUNKED_RESUME] ❌ Invalid response:
[21:57:34] [CHUNKED_RESUME] Server verified: resuming from chunk 4
[21:57:34] [CLIENT_SIG] Connecting to session ILUIWU as Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:57:35] [CLIENT_SIG] WebSocket opened
[21:57:35] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[21:57:35] [CLIENT_SIG] Connected! clientId=wfswq2OOgxYak0rg
[21:57:36] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[21:57:36] [CLIENT_SIG] - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[21:57:38] [COMBINED_FETCH] Loaded 3206 read receipts, 381 messages with reactions
[21:57:38] [FAST_REFRESH] Enriched 49 messages with readBy data
[21:57:38] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:57:38] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=2
[21:57:38] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=2 → uploading
[21:57:38] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[21:57:38] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[21:57:42] [WS] WebSocket task completed with error - isQueryOnly=true: The request timed out.
[21:57:42] [WS] Query connection error - cleaning up all agent connections and views
[21:57:42] [CLEANUP] ========================================
[21:57:42] [CLEANUP] Cleaning up all agent connections and views
[21:57:42] [CLEANUP] Current state: vccs=0, videoViews=0, feedScrollViews=0
[21:57:42] [CLEANUP] Stopped and removed 0 video connections
[21:57:42] [CLEANUP] Removed 0 video views
[21:57:42] [CLEANUP] Removed 0 feed scroll views
[21:57:42] [CLEANUP] Removed 0 status labels
[21:57:42] [CLEANUP] Reset agent query state
[21:57:42] [CLEANUP] Updated page indicator
[21:57:42] [CLEANUP] Rebuilt video layout
[21:57:42] [CLEANUP] ✅ All agent connections and views cleaned up
[21:57:42] [CLEANUP] ========================================
[21:57:42] [SERVER] Starting reconnect polling (5s interval)
[21:57:43] [CLIENT_SIG] Client connected: Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF) on session 'ILUIWU' (my session: 'ILUIWU')
[21:57:46] [CLIENT_SIG] Typing start from: Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF)
[21:57:47] [SERVER] Polling - attempting to reconnect...
[21:57:52] [SERVER] Polling - attempting to reconnect...
[21:57:52] [CLIENT_SIG] Client disconnected: Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF) on session 'ILUIWU' (my session: 'ILUIWU')
[21:57:52] [CLIENT_SIG] Client disconnected: Laurent (3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF) on session 'ILUIWU' (my session: 'ILUIWU')
[21:57:57] [SERVER] Polling - attempting to reconnect...
[21:58:02] [SERVER] Polling - attempting to reconnect...
[21:58:07] [SERVER] Polling - attempting to reconnect...
[21:58:08] [LIFECYCLE] App resigning active - cleared crash flag
[21:58:09] [SECURITY] sceneDidEnterBackground - isAuthenticated=true
[21:58:09] [SECURITY] Saved background timestamp
[21:58:09] [LIFECYCLE] App entering background - cleared crash flag
[21:58:09] [CLIENT_SIG] Disconnecting
[21:58:09] [LIFECYCLE] App entering background - disconnecting connections and stopping audio
[21:58:09] [WS] stopSignalingAndPeer called - isQueryOnly=true, connectionStr=iosILUIWU, wsState=3
[21:58:09] [WS] Canceling WebSocket for query connection to iosILUIWU
[21:58:09] In cleanupPeer
[21:58:09] In cleanupPeer
[21:58:09] [LIFECYCLE] WebRTC audio disabled
[21:58:09] [LIFECYCLE] AVAudioSession deactivated
[21:58:09] [LIFECYCLE] All connections stopped
[21:58:09] [CLIENT_SIG] WebSocket closed with code 1001
[21:58:09] [CLIENT_SIG] Reconnecting in 2.0s (attempt 1)
[21:58:09] [SERVER] Stopped reconnect polling
[21:58:09] [WS] URLSession invalidated successfully
[21:58:09] Will request stop of video 0
[21:58:09] Will request stop of video 0
[21:58:09] [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:58:09] [CLIENT_SIG] Reconnecting in 4.0s (attempt 2)
[21:58:09] [PIP] Removing 0 tracks from PiP for connection 0
[21:58:09] [PIP] ✅ All tracks removed for connection 0
[21:58:09] [PIP] Removing 0 tracks from PiP for connection 0
[21:58:09] [PIP] ✅ All tracks removed for connection 0
[22:01:50] [CLIENT_SIG] Connecting to session ILUIWU as Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[22:01:50] [CLIENT_SIG] Reconnecting on foreground for session: ILUIWU
[22:01:50] [CLIENT_SIG] Already connected/connecting to session ILUIWU
[22:01:50] [LIFECYCLE] App entering foreground - restoring connections
[22:01:50] [UPLOAD_RETRY] No pending uploads to retry
[22:01:50] [LIFECYCLE] Merged 382 reactions from local DB
[22:01:50] [UPLOAD_QUEUE] Scheduling retry #4 for id=543 in 32.0s
[22:01:50] [UPLOAD_QUEUE] Scheduling retry #6 for id=539 in 128.0s
[22:01:50] [UPLOAD_QUEUE] Scheduling retry #6 for id=538 in 128.0s
[22:01:50] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[22:01:50] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=2
[22:01:50] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=2 → uploading
[22:01:50] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[22:01:50] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[22:01:50] [LIFECYCLE] WebRTC audio re-enabled
[22:01:50] [AUDIO] ✅ Chat mode - audio will be managed by WebRTCViewer (no microphone)
[22:01:50] [VIEWER] Reconnecting after background - querying agents
[22:01:50] [CLIENT_SIG] WebSocket opened
[22:01:50] [CLIENT_SIG] HELLO sent as client for session ILUIWU
[22:01:50] [CLIENT_SIG] Connected! clientId=0-YXLdmNti9O7DXa
[22:01:50] [SECURITY] sceneDidBecomeActive - isAuthenticated=true, didEnterBackground=true
[22:01:50] [SECURITY] Timeout exceeded - requiring re-authentication
[22:01:50] [PUSH_DEBUG] 🟢 App became ACTIVE - resetting badges and triggering pollEventsNow
[22:01:50] [PUSH] handlePollEventsNotification userInfo: [:]
[22:01:50] [PUSH] No message_id in userInfo
[22:01:50] [PUSH] No operation_type in userInfo
[22:01:50] [FAST_REFRESH] Evolution disabled - performing incremental sync
[22:01:50] [FAST_REFRESH] Already have 50 messages - skipping local DB load
[22:01:50] [FAST_REFRESH] About to call reloadMessagesForCurrentTab(), isMainThread=true, viewLoaded=true
[22:01:50] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[22:01:50] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=2
[22:01:50] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=2 → uploading
[22:01:50] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[22:01:50] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[22:01:50] [FAST_REFRESH] reloadMessagesForCurrentTab() called successfully
[22:01:50] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 4308
[22:01:50] [CLIENT_SIG] Received 1 clients for session 'ILUIWU' (my session: 'ILUIWU')
[22:01:50] [CLIENT_SIG] - Esra (EDAD55A1-003F-415D-AA60-672B34B504FE)
[22:01:51] [INCREMENTAL_SYNC] ✅ No new messages
[22:01:51] [FAST_REFRESH] Incremental sync complete - 50 messages
[22:01:52] [COMBINED_FETCH] Loaded 3206 read receipts, 381 messages with reactions
[22:01:52] [FAST_REFRESH] Enriched 49 messages with readBy data
[22:01:52] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[22:01:52] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=2
[22:01:52] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=2 → uploading
[22:01:52] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[22:01:52] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[22:01:52] [PIN_AUTH] Correct PIN
[22:01:52] [SECURITY] Restored real session: ILUIWU
[22:01:52] [SECURITY] Restored real session: ILUIWU
[22:01:52] [LOCK] ✅ PIN auth callback - setting isAuthenticated = true
[22:01:52] [FAKE MODE] Exiting fake mode, restoring real session
[22:01:52] [SECURITY] Restored real session: ILUIWU
[22:01:52] [SECURITY] Saved real session: ILUIWU
[22:01:52] [FAKE MODE] ✅ Restored real session: ILUIWU
[22:01:53] DOWNLOADIIING 1b1a78050ebe099b.jpg
[22:01:53] DOWNLOADIIING bae538c2a3076c11.heic
[22:01:53] DOWNLOADIIING ee42d57ffd8ab767.jpg
[22:01:53] DOWNLOADIIING 5cfd84d52271d308.heic
[22:01:53] DOWNLOADIIING 0f2dda66cccdeadf.heic
[22:01:53] DOWNLOADIIING 2a4c7380908d6595.jpg
[22:01:53] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[22:01:53] [CELL_UPLOAD] configure: msgId=4302, file=1ad0647655c35d25.mov, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[22:01:53] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[22:01:53] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[22:01:53] [MENU] 🔍 dismissAnyExistingMenu called
[22:01:53] [MENU] ℹ️ No menu with tag 9999 found
[22:01:53] [MENU] ✅ dismissAnyExistingMenu completed
[22:01:53] [SEARCH] scrollViewWillBeginDragging - isSearchBarVisible=false, tab=0
[22:01:53] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[22:01:53] [CELL_UPLOAD] configure: msgId=4301, file=71742c3d78ed2063.jpg, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=0
[22:01:53] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=0 → complete
[22:01:53] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[22:01:53] [SEARCH] handleTopRefresh called - tab=0, isSearchBarVisible=false
[22:01:53] [SEARCH] 🔍 First pull on Tab 0 - showing search bar instead of refresh
[22:01:53] [SEARCH] showSearchBar() called - animated=true, isSearchBarVisible=false
[22:01:53] [SEARCH] ✅ Setting isSearchBarVisible = true
[22:01:53] [SEARCH] chatSearchBar is nil? false
[22:01:53] [SEARCH] Applied theme: day
[22:01:53] [SEARCH] Adjusting table contentInset.top by +56.0
[22:01:53] [SEARCH] Table contentInset.top: 0.0 -> 56.0
[22:01:53] [SEARCH] handleTopRefresh called - tab=0, isSearchBarVisible=true
[22:01:53] [CHAT] top pull-to-refresh triggered on tab 0
[22:01:53] [CHANNEL_SWITCH] 📡 Fetching URL: https://crivello.dyndns.org:443/WebRTC/chat/chat_get_messages.php?viewer=1&session_id=ILUIWU&mark_read=0&viewer_id=EDAD55A1-003F-415D-AA60-672B34B504FE
[22:01:53] [SEARCH] scrollViewDidEndDragging - scrollView=messagesTable, tab=0
[22:01:53] [SEARCH] contentOffset.y=-91.0, topInset=116.0, pullDistance=-25.0
[22:01:53] [SEARCH] threshold=80.0, isSearchBarVisible=true
[22:01:53] [SEARCH] topRefresh.isRefreshing=true
[22:01:53] [SEARCH] ❌ Pull distance -25.0 < threshold 80.0
[22:01:53] [SEARCH] Focusing search field
[22:01:55] [PENDING_UPLOAD] Found pending message: id=-4, file=, uploadStatus=0
[22:01:55] [PENDING_UPLOAD] Found pending message: id=4302, file=1ad0647655c35d25.mov, uploadStatus=2
[22:01:55] [PENDING_UPLOAD] Found pending message: id=-9, file=c8f0aac386a60643.jpg, uploadStatus=2
[22:01:55] [PENDING_UPLOAD] Found pending message: id=4104, file=65b3c13d384997a5.mov, uploadStatus=2
[22:01:55] [PENDING_UPLOAD] Found pending message: id=4103, file=fb94b5fb89c4a48d.mov, uploadStatus=2
[22:01:55] [PENDING_UPLOAD] Total pending upload messages: 5
[22:01:55] [PENDING_UPLOAD] Preserved 5 pending messages before server refresh
[22:01:55] [PENDING_UPLOAD] Reinserting 5 pending messages
[22:01:55] [PENDING_UPLOAD] ✅ Reinserted message -4
[22:01:55] [PENDING_UPLOAD] ✅ Reinserted message 4302
[22:01:55] [PENDING_UPLOAD] ✅ Reinserted message -9
[22:01:55] [PENDING_UPLOAD] ✅ Reinserted message 4104
[22:01:55] [PENDING_UPLOAD] ✅ Reinserted message 4103
[22:01:55] [SEARCH] hideSearchBar() called - animated=false, isSearchBarVisible=true
[22:01:55] [SEARCH] ✅ Setting isSearchBarVisible = false
[22:01:55] [SEARCH] Adjusting table contentInset.top by -56.0
[22:01:56] DOWNLOADIIING t_66e5f4c7c82fef18.jpg
[22:01:56] DOWNLOADIIING t_97828ef5de49a612.jpg
[22:01:56] [CHANNEL_SWITCH] 📊 About to set loaded messages. Count=3206
[22:01:56] [CHANNEL_SWITCH] 📊 Setting allMessagesWithReadBy = 3206 msgs
[22:01:56] [READBY_LOADED] msg 4308: readBy.count=1, readBy=["EDAD55A1-003F-415D-AA60-672B34B504FE"], isMyMsg=false
[22:01:56] [READBY_LOADED] msg 4307: readBy.count=1, readBy=["3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF"], isMyMsg=true
[22:01:56] [READBY_LOADED] msg 4306: readBy.count=1, readBy=["EDAD55A1-003F-415D-AA60-672B34B504FE"], isMyMsg=false
[22:01:56] [READBY_LOADED] msg 4305: readBy.count=1, readBy=["EDAD55A1-003F-415D-AA60-672B34B504FE"], isMyMsg=false
[22:01:56] [READBY_LOADED] msg 4304: readBy.count=1, readBy=["3B8A4F00-5ABD-47E5-8C88-F15DA9EF83AF"], isMyMsg=true
[22:01:56] [PENDING_UPLOAD] ✅ Merged pending message id=-4, file=
[22:01:56] [PENDING_UPLOAD] ⏭️ Skipped pending message id=4302 - already exists in server data
[22:01:56] [PENDING_UPLOAD] ⏭️ Skipped pending message id=-9 - already exists in server data
[22:01:56] [PENDING_UPLOAD] ⏭️ Skipped pending message id=4104 - already exists in server data
[22:01:56] [PENDING_UPLOAD] ⏭️ Skipped pending message id=4103 - already exists in server data
[22:01:56] [PENDING_UPLOAD] Final merged count: 3207 (server: 3206, kept pending: 1)
[22:01:56] [CHANNEL_SWITCH] 📊 chatRows.count = 3255
[22:01:56] ReloadData 15 (3207 messages loaded, 17 pending media)
[22:01:56] DOWNLOADIIING 1b1a78050ebe099b.jpg
[22:01:56] DOWNLOADIIING bae538c2a3076c11.heic
[22:01:56] DOWNLOADIIING ee42d57ffd8ab767.jpg
[22:01:56] DOWNLOADIIING 5cfd84d52271d308.heic
[22:01:56] DOWNLOADIIING 0f2dda66cccdeadf.heic
[22:01:56] DOWNLOADIIING 2a4c7380908d6595.jpg
[22:01:56] [PULL_REFRESH] Loaded 3207 messages (first page), displaying 3207 for tab 3, hasMore: true
[22:01:56] ReloadData 15 (pull-to-refresh completed)
[22:01:56] ReloadData 14 (all 17 media thumbnails loaded) - applying tab 3 filtering
[22:01:57] [TROUBLESHOOT] Troubleshoot button tapped!
[22:02:02] [UPLOAD_QUEUE] 🔄 Restarted 3 stuck uploads
[22:02:03] [UPLOAD_QUEUE] Found 3 pending uploads to resume
[22:02:05] [UPLOAD_DEBUG] ========== START UPLOAD ==========
[22:02:05] [UPLOAD_DEBUG] ========== START UPLOAD ==========
[22:02:05] [UPLOAD_DEBUG] Item ID: 538
[22:02:05] [UPLOAD_DEBUG] Local URL: /var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/Documents/MediaCache/65b3c13d384997a5.mov
[22:02:05] [UPLOAD_DEBUG] Random filename: 65b3c13d384997a5.mov
[22:02:05] [UPLOAD_DEBUG] Session ID: ILUIWU
[22:02:05] [UPLOAD_DEBUG] Item ID: 539
[22:02:05] [UPLOAD_DEBUG] API Base: https://crivello.dyndns.org:443/WebRTC/chat/
[22:02:05] [UPLOAD_DEBUG] Local URL: /var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/Documents/MediaCache/fb94b5fb89c4a48d.mov
[22:02:05] [UPLOAD_DEBUG] Retry count: 0
[22:02:05] [UPLOAD_DEBUG] Random filename: fb94b5fb89c4a48d.mov
[22:02:05] [UPLOAD_DEBUG] Session ID: ILUIWU
[22:02:05] [UPLOAD_DEBUG] API Base: https://crivello.dyndns.org:443/WebRTC/chat/
[22:02:05] [UPLOAD_DEBUG] Retry count: 0
[22:02:05] [UPLOAD_DEBUG] ========== START UPLOAD ==========
[22:02:05] [UPLOAD_DEBUG] Item ID: 543
[22:02:05] [UPLOAD_DEBUG] Local URL: /var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/Documents/MediaCache/1ad0647655c35d25.mov
[22:02:05] [UPLOAD_DEBUG] File exists: true
[22:02:05] [UPLOAD_DEBUG] Random filename: 1ad0647655c35d25.mov
[22:02:05] [UPLOAD_DEBUG] Session ID: ILUIWU
[22:02:05] [UPLOAD_DEBUG] API Base: https://crivello.dyndns.org:443/WebRTC/chat/
[22:02:05] [UPLOAD_DEBUG] Retry count: 0
[22:02:05] [UPLOAD_DEBUG] File exists: true
[22:02:05] [UPLOAD_DEBUG] File exists: true
[22:02:05] [UPLOAD_STATUS] Updated status=2 for file: 65b3c13d384997a5.mov
[22:02:05] [UPLOAD_STATUS] Updated status=2 for file: fb94b5fb89c4a48d.mov
[22:02:05] [UPLOAD_STATUS] Updated in-memory status=2 for file: 1ad0647655c35d25.mov
[22:02:05] [UPLOAD_STATUS] Updated status=2 for file: 1ad0647655c35d25.mov
[22:02:05] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[22:02:05] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[22:02:05] [UPLOAD_DEBUG] File size: 1267972117 bytes (1209.2 MB)
[22:02:05] [UPLOAD_DEBUG] Chunked threshold: 104857600 bytes (100 MB)
[22:02:05] [UPLOAD_DEBUG] → Using CHUNKED upload (file > threshold)
[22:02:05] [UPLOAD_DEBUG] --- startChunkedUpload ---
[22:02:05] [UPLOAD_DEBUG] Chunked upload URL: https://crivello.dyndns.org:443/WebRTC/chat/upload_chunked.php
[22:02:05] [UPLOAD_DEBUG] File size: 1267972117 bytes (1209.2 MB)
[22:02:05] [UPLOAD_DEBUG] Chunk size: 104857600 bytes (100 MB)
[22:02:05] [UPLOAD_DEBUG] Total chunks: 13
[22:02:05] [UPLOAD_DEBUG] Updated DB status to 'uploading_chunked'
[22:02:05] [CHUNKED_RESUME] Checking resume: item.currentChunk=0, item.totalChunks=13, calculated totalChunks=13
[22:02:05] [UPLOAD_DEBUG] Starting chunk upload sequence from chunk 0...
[22:02:05] [UPLOAD_DEBUG] File size: 1267972117 bytes (1209.2 MB)
[22:02:05] [UPLOAD_DEBUG] Chunked threshold: 104857600 bytes (100 MB)
[22:02:05] [UPLOAD_DEBUG] → Using CHUNKED upload (file > threshold)
[22:02:05] [UPLOAD_DEBUG] --- startChunkedUpload ---
[22:02:05] [UPLOAD_DEBUG] Chunked upload URL: https://crivello.dyndns.org:443/WebRTC/chat/upload_chunked.php
[22:02:05] [UPLOAD_DEBUG] File size: 1267972117 bytes (1209.2 MB)
[22:02:05] [UPLOAD_DEBUG] Chunk size: 104857600 bytes (100 MB)
[22:02:05] [UPLOAD_DEBUG] Total chunks: 13
[22:02:05] [UPLOAD_DEBUG] Updated DB status to 'uploading_chunked'
[22:02:05] [CHUNKED_RESUME] Checking resume: item.currentChunk=0, item.totalChunks=13, calculated totalChunks=13
[22:02:05] [UPLOAD_DEBUG] Starting chunk upload sequence from chunk 0...
[22:02:05] [CHUNKED_RESUME] Saved chunk info: totalChunks=13, fileSize=1267972117
[22:02:05] [UPLOAD_DEBUG] File size: 959895378 bytes (915.4 MB)
[22:02:05] [UPLOAD_DEBUG] Chunked threshold: 104857600 bytes (100 MB)
[22:02:05] [UPLOAD_DEBUG] → Using CHUNKED upload (file > threshold)
[22:02:05] [UPLOAD_DEBUG] --- startChunkedUpload ---
[22:02:05] [UPLOAD_DEBUG] Chunked upload URL: https://crivello.dyndns.org:443/WebRTC/chat/upload_chunked.php
[22:02:05] [UPLOAD_DEBUG] File size: 959895378 bytes (915.4 MB)
[22:02:05] [UPLOAD_DEBUG] Chunk size: 104857600 bytes (100 MB)
[22:02:05] [UPLOAD_DEBUG] Total chunks: 10
[22:02:05] [UPLOAD_DEBUG] Updated DB status to 'uploading_chunked'
[22:02:05] [CHUNKED_RESUME] Checking resume: item.currentChunk=0, item.totalChunks=10, calculated totalChunks=10
[22:02:05] [UPLOAD_DEBUG] Starting chunk upload sequence from chunk 0...
[22:02:05] [CHUNKED_RESUME] Saved chunk info: totalChunks=13, fileSize=1267972117
[22:02:05] [CHUNKED_RESUME] Saved chunk info: totalChunks=10, fileSize=959895378
[22:02:09] Chosen timer = 0
[22:02:09] [MEDIA_SEND] ========== NEW UPLOAD ==========
[22:02:09] [MEDIA_SEND] 📥 onSend called
[22:02:09] [MEDIA_SEND] Source URL: /private/var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/tmp/FF91E051-AD2D-4876-8E11-21BF9427D893.png
[22:02:09] [MEDIA_SEND] Source file exists: true
[22:02:09] [MEDIA_SEND] Original filename: FF91E051-AD2D-4876-8E11-21BF9427D893.png
[22:02:09] [MEDIA_SEND] Random filename: 7f5c64456effb085.png
[22:02:09] [MEDIA_SEND] File extension: png
[22:02:09] [MEDIA_SEND] Local media path: /var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/Documents/MediaCache/7f5c64456effb085.png
[22:02:09] [MEDIA_SEND] Local thumbnail path: /var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/Documents/MediaCache/t_7f5c64456effb085.jpg
[22:02:09] [MEDIA_SEND] Source file size: 549896 bytes (0.52 MB)
[22:02:09] [MEDIA_SEND] 📦 Copying file (<100MB)
[22:02:09] [MEDIA_SEND] ✅ File copied successfully
[22:02:09] [MEDIA_SEND] Destination file exists: true
[22:02:09] [MEDIA_SEND] Destination file size: 549896 bytes
[22:02:09] [MEDIA_SEND] 🖼️ Creating thumbnail...
[22:02:09] [MEDIA_SEND] ✅ Thumbnail created in 0.07s
[22:02:09] [MEDIA_SEND] Thumbnail dimensions: (118.0, 256.0)
[22:02:09] [MEDIA_SEND] Thumbnail exists: true
[22:02:09] [MEDIA_SEND] Thumbnail file size: 7007 bytes
[22:02:09] [MEDIA_SEND] 📤 Sending message to server...
[22:02:09] [MEDIA_SEND] Caption: ''
[22:02:09] [MEDIA_SEND] Timer: 0
[22:02:09] [MEDIA_SEND] Filename: 7f5c64456effb085.png
[22:02:09] [ANIMATION] 🎬 Animating 1 new bubbles - scrolling to top to show them
[22:02:09] [SCROLL_BTN] Showing button - scrolled 40pt > half 22pt
[22:02:09] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=1ad0647655c35d25.mov, overlayExists=true
[22:02:09] [CELL_UPLOAD] configure: msgId=-2, file=7f5c64456effb085.png, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=1
[22:02:09] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=1 → pending
[22:02:09] [CELL_UPLOAD] setUploadStatus(pending, progress=0.0) for file=7f5c64456effb085.png, overlayExists=true
[22:02:09] [CELL_UPLOAD] → pending: overlay.isHidden=false, alpha=0.699999988079071
[22:02:09] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=71742c3d78ed2063.jpg, overlayExists=true
[22:02:09] [CELL_UPLOAD] configure: msgId=-2, file=7f5c64456effb085.png, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=1
[22:02:09] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=1 → pending
[22:02:09] [CELL_UPLOAD] setUploadStatus(pending, progress=0.0) for file=7f5c64456effb085.png, overlayExists=true
[22:02:09] [CELL_UPLOAD] → pending: overlay.isHidden=false, alpha=0.699999988079071
[22:02:09] [REPLY_DEBUG] ❌ cancelReply called - clearing messageToReplyTo
[22:02:09] [REPLY_DEBUG] ⚠️ sendMessage HTTP BODY - No reply message captured
[22:02:09] [MEDIA_SEND] ✅ sendMessage API call completed
[22:02:09] [MEDIA_SEND] 🖼️ Starting THUMBNAIL upload: t_7f5c64456effb085.jpg
[22:02:09] [UPLOAD_QUEUE] Enqueued upload id=544 for t_7f5c64456effb085.jpg
[22:02:09] [UPLOAD_DEBUG] ========== START UPLOAD ==========
[22:02:09] [UPLOAD_DEBUG] Item ID: 544
[22:02:09] [UPLOAD_DEBUG] Local URL: /var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/Documents/MediaCache/t_7f5c64456effb085.jpg
[22:02:09] [UPLOAD_DEBUG] Random filename: t_7f5c64456effb085.jpg
[22:02:09] [UPLOAD_DEBUG] Session ID: ILUIWU
[22:02:09] [UPLOAD_DEBUG] API Base: https://crivello.dyndns.org:443/WebRTC/chat/
[22:02:09] [UPLOAD_DEBUG] Retry count: 0
[22:02:09] [UPLOAD_DEBUG] File exists: true
[22:02:09] [UPLOAD_DEBUG] File size: 7007 bytes (0.0 MB)
[22:02:09] [UPLOAD_DEBUG] Chunked threshold: 104857600 bytes (100 MB)
[22:02:09] [UPLOAD_DEBUG] → Using STANDARD upload (file <= threshold)
[22:02:09] [UPLOAD_DEBUG] --- startStandardUpload ---
[22:02:09] [UPLOAD_DEBUG] Upload URL: https://crivello.dyndns.org:443/WebRTC/chat/upload_media.php
[22:02:09] [UPLOAD_DEBUG] File extension: jpg, MIME type: image/jpeg
[22:02:09] [UPLOAD_DEBUG] Temp file URL: /private/var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/tmp/0E971415-925B-48A4-982F-D0DA1609860A.upload
[22:02:09] [GALLERY_DB] Loading ALL media messages for session: ILUIWU
[22:02:09] [UPLOAD_DEBUG] File size: 7007 bytes, in-memory threshold: 10485760 bytes
[22:02:09] [UPLOAD_DEBUG] Creating multipart body (in-memory mode)...
[22:02:09] [GALLERY_DB] Raw datesent for msg -2: '2025-12-08 19:02:09'
[22:02:09] [GALLERY_DB] Raw datesent for msg 4301: '2025-12-08 18:53:38'
[22:02:09] [GALLERY_DB] Raw datesent for msg 4253: '2025-12-08 11:59:28'
[22:02:09] [UPLOAD_DEBUG] ✓ In-memory body written to temp file (7489 bytes)
[22:02:09] [UPLOAD_DEBUG] Creating background upload task...
[22:02:09] [UPLOAD_DEBUG] Task created with identifier: 1
[22:02:09] [UPLOAD_DEBUG] Added to activeUploads dictionary
[22:02:09] [UPLOAD_DEBUG] Updated DB status to 'uploading'
[22:02:09] [UPLOAD_DEBUG] ✓ Task resumed - upload should be in progress now
[22:02:09] [UPLOAD_DEBUG] ========== UPLOAD STARTED ==========
[22:02:09] [GALLERY_DB] ✅ Loaded 207 media messages
[22:02:09] [GALLERY] Filtered 207 -> 190 (only with local thumbnails)
[22:02:09] [GALLERY] First 5 after sort (newest first):
[22:02:09] [GALLERY] 0: id=-2, date=2025-12-08 19:02:09, file=7f5c64456effb085.png
[22:02:09] [GALLERY] 1: id=4301, date=2025-12-08 18:53:38, file=71742c3d78ed2063.jpg
[22:02:09] [GALLERY] 2: id=4253, date=2025-12-08 11:59:28, file=10dabda8d04dc725.jpg
[22:02:09] [GALLERY] 3: id=4227, date=2025-12-08 08:35:52, file=5abfa51ac84672ca.jpg
[22:02:09] [GALLERY] 4: id=4225, date=2025-12-08 06:51:17, file=a59f6ea5b913297d.jpg
[22:02:09] [UPLOAD_STATUS] Updated status=2 for file: t_7f5c64456effb085.jpg
[22:02:10] [UPLOAD_PROGRESS] t_7f5c64456effb085.jpg: 100% (0.0/0.0 MB) task=1
[22:02:10] [UPLOAD_STATUS] Updated status=2 for file: t_7f5c64456effb085.jpg
[22:02:11] [UPLOAD_RESPONSE] Started receiving response for task 1
[22:02:11] [UPLOAD_METRICS] Task 1 metrics:
[22:02:11] [UPLOAD_METRICS] Total time: 1.46s
[22:02:11] [UPLOAD_METRICS] Upload time: 0.00s
[22:02:11] [UPLOAD_METRICS] Response time: 0.00s
[22:02:11] [UPLOAD_METRICS] Network protocol: http/1.1
[22:02:11] [UPLOAD_METRICS] Proxy: no
[22:02:11] [UPLOAD_METRICS] Reused connection: no
[22:02:11] [UPLOAD_COMPLETE] ========== Task Completed ==========
[22:02:11] [UPLOAD_COMPLETE] Task ID: 1
[22:02:11] [UPLOAD_COMPLETE] Task state: 3 (0=running, 1=suspended, 2=canceling, 3=completed)
[22:02:11] [UPLOAD_COMPLETE] Filename: t_7f5c64456effb085.jpg
[22:02:11] [UPLOAD_COMPLETE] Local path: /var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/Documents/MediaCache/t_7f5c64456effb085.jpg
[22:02:11] [UPLOAD_COMPLETE] Retry count: 0
[22:02:11] [UPLOAD_COMPLETE] HTTP Status: 200
[22:02:11] [UPLOAD_COMPLETE] Response headers: [AnyHashable("Server"): Apache/2.4.65 (Debian), AnyHashable("Content-Length"): 215, AnyHashable("Content-Type"): application/json, AnyHashable("Date"): Mon, 08 Dec 2025 19:02:10 GMT, AnyHashable("Connection"): Keep-Alive, AnyHashable("Keep-Alive"): timeout=5, max=100]
[22:02:11] [UPLOAD_COMPLETE] Response body (215 bytes): {"ok":true,"file_name":"t_7f5c64456effb085.jpg","orig_name":"t_7f5c64456effb085.jpg","size":7007,"env":{"file_uploads":"1","upload_max_filesize":"5G","post_max_size":"10G","upload_tmp_dir":"","content_length":7489}}
[22:02:11] [UPLOAD_COMPLETE] ✅ Server confirmed upload OK
[22:02:11] [UPLOAD_COMPLETE] Server filename: t_7f5c64456effb085.jpg
[22:02:11] [UPLOAD_VERIFY] Verifying file exists: t_7f5c64456effb085.jpg
[22:02:11] [CLIENT_SIG] Event received: type=0 messageId=4309
[22:02:11] [WS_EVENT] Received event: type=0, messageId=4309
[22:02:11] [CHAT] receive_message.php HTTP 200: {"ok":true,"message_id":4309,"session_id":"ILUIWU","message_type":1,"file_name":"7f5c64456effb085.png","datesent_utc":"2025-12-08 19:02:10"}
[22:02:11] [WS_EVENT] New message notification - refreshing
[22:02:11] [CHAT] receive_message.php JSON: ["ok": 1, "session_id": ILUIWU, "file_name": 7f5c64456effb085.png, "datesent_utc": 2025-12-08 19:02:10, "message_id": 4309, "message_type": 1]
[22:02:11] [INCREMENTAL_SYNC] 📡 Fetching messages since ID 4308
[22:02:11] ReloadData 9
[22:02:11] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7f5c64456effb085.png, overlayExists=true
[22:02:11] [CELL_UPLOAD] configure: msgId=-2, file=7f5c64456effb085.png, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=1
[22:02:11] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=1 → pending
[22:02:11] [CELL_UPLOAD] setUploadStatus(pending, progress=0.0) for file=7f5c64456effb085.png, overlayExists=true
[22:02:11] [CELL_UPLOAD] → pending: overlay.isHidden=false, alpha=0.699999988079071
[22:02:12] [INCREMENTAL_SYNC] ✅ Found 1 new messages
[22:02:12] [UPLOAD_VERIFY] ✅ File verified: t_7f5c64456effb085.jpg (size: 7007)
[22:02:12] [UPLOAD_QUEUE] Upload completed for id=544
[22:02:12] [CELL_UPLOAD] setUploadStatus(complete, progress=0.0) for file=7f5c64456effb085.png, overlayExists=true
[22:02:12] [CELL_UPLOAD] configure: msgId=4309, file=7f5c64456effb085.png, senderId=EDAD55A1-003F-415D-AA60-672B34B504FE, myUserId=EDAD55A1-003F-415D-AA60-672B34B504FE, isMyMessage=true, hasFilename=true, uploadStatus=1
[22:02:12] [CELL_UPLOAD] → no active progress, using msg.uploadStatus=1 → pending
[22:02:12] [CELL_UPLOAD] setUploadStatus(pending, progress=0.0) for file=7f5c64456effb085.png, overlayExists=true
[22:02:12] [CELL_UPLOAD] → pending: overlay.isHidden=false, alpha=0.699999988079071
[22:02:12] [UPLOAD_STATUS] Updated status=0 for file: t_7f5c64456effb085.jpg
[22:02:12] [MEDIA_SEND] ✅ Thumbnail uploaded successfully in 2.57s
[22:02:12] [MEDIA_SEND] Thumbnail server filename: t_7f5c64456effb085.jpg
[22:02:12] [MEDIA_SEND] 📤 Starting MAIN FILE upload: 7f5c64456effb085.png
[22:02:12] [UPLOAD_QUEUE] Enqueued upload id=545 for 7f5c64456effb085.png
[22:02:12] [UPLOAD_DEBUG] ========== START UPLOAD ==========
[22:02:12] [UPLOAD_DEBUG] Item ID: 545
[22:02:12] [UPLOAD_DEBUG] Local URL: /var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/Documents/MediaCache/7f5c64456effb085.png
[22:02:12] [UPLOAD_DEBUG] Random filename: 7f5c64456effb085.png
[22:02:12] [UPLOAD_DEBUG] Session ID: ILUIWU
[22:02:12] [UPLOAD_DEBUG] API Base: https://crivello.dyndns.org:443/WebRTC/chat/
[22:02:12] [UPLOAD_DEBUG] Retry count: 0
[22:02:12] [UPLOAD_STATUS] Updated in-memory status=2 for file: 7f5c64456effb085.png
[22:02:12] [UPLOAD_DEBUG] File exists: true
[22:02:12] [UPLOAD_STATUS] Updated status=2 for file: 7f5c64456effb085.png
[22:02:12] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=7f5c64456effb085.png, overlayExists=true
[22:02:12] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[22:02:12] [CELL_UPLOAD] setUploadStatus(uploading, progress=0.0) for file=7f5c64456effb085.png, overlayExists=true
[22:02:12] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[22:02:12] [UPLOAD_DEBUG] File size: 549896 bytes (0.5 MB)
[22:02:12] [UPLOAD_DEBUG] Chunked threshold: 104857600 bytes (100 MB)
[22:02:12] [UPLOAD_DEBUG] → Using STANDARD upload (file <= threshold)
[22:02:12] [UPLOAD_DEBUG] --- startStandardUpload ---
[22:02:12] [UPLOAD_DEBUG] Upload URL: https://crivello.dyndns.org:443/WebRTC/chat/upload_media.php
[22:02:12] [UPLOAD_DEBUG] File extension: png, MIME type: image/png
[22:02:12] [UPLOAD_DEBUG] Temp file URL: /private/var/mobile/Containers/Data/Application/9556D5A4-2E36-41AC-9D7C-8DDEBE138717/tmp/F1DE2EFF-204C-4D89-8EA8-6C6FB3CB9D6F.upload
[22:02:12] [UPLOAD_DEBUG] File size: 549896 bytes, in-memory threshold: 10485760 bytes
[22:02:12] [UPLOAD_DEBUG] Creating multipart body (in-memory mode)...
[22:02:12] [UPLOAD_DEBUG] ✓ In-memory body written to temp file (550371 bytes)
[22:02:12] [UPLOAD_DEBUG] Creating background upload task...
[22:02:12] [UPLOAD_DEBUG] Task created with identifier: 2
[22:02:12] [UPLOAD_DEBUG] Added to activeUploads dictionary
[22:02:12] [UPLOAD_DEBUG] Updated DB status to 'uploading'
[22:02:12] [UPLOAD_DEBUG] ✓ Task resumed - upload should be in progress now
[22:02:12] [UPLOAD_DEBUG] ========== UPLOAD STARTED ==========
[22:02:12] [UPLOAD_PROGRESS] 7f5c64456effb085.png: 100% (0.5/0.5 MB) task=2
[22:02:12] [UPLOAD_STATUS] Updated in-memory status=2 for file: 7f5c64456effb085.png
[22:02:12] [UPLOAD_STATUS] Updated status=2 for file: 7f5c64456effb085.png
[22:02:12] [MEDIA_SEND] 📊 Main upload progress: 100%
[22:02:12] [CELL_UPLOAD] setUploadStatus(uploading, progress=1.0) for file=7f5c64456effb085.png, overlayExists=true
[22:02:12] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[22:02:12] [CELL_UPLOAD] setUploadStatus(uploading, progress=1.0) for file=7f5c64456effb085.png, overlayExists=true
[22:02:12] [CELL_UPLOAD] → uploading: progressBar.isHidden=false, overlay.isHidden=false, alpha=0.699999988079071
[22:02:12] [PROGRESS] Updated cell for 7f5c64456effb085.png: 100%