feat: enhance TradingView authentication debugging

- Add comprehensive debug logging to checkLoginStatus Strategy 1
- Enhanced authentication variable detection with detailed console output
- Added debug logging for window.is_authenticated and window.user checks
- Improved error visibility for authentication detection issues
- Added health API endpoint for debugging and monitoring
- Enhanced Dockerfile with better caching and debugging capabilities

Authentication detection now shows detailed logs when checking:
- window.is_authenticated variable presence and value
- window.user object detection and structure
- Helps identify why auth detection sees user data but doesn't return true
This commit is contained in:
mindesbunister
2025-07-18 08:51:50 +02:00
parent 38ebc4418b
commit e77e06a5fe
3 changed files with 442 additions and 50 deletions

View File

@@ -1,4 +1,4 @@
# Dockerfile for Next.js 15 + Playwright + Puppeteer/Chromium + Prisma + Tailwind + OpenAI
# Dockerfile for Next.js 15 + Puppeteer/Chromium + Prisma + Tailwind + OpenAI
FROM node:20-slim
# Use build arguments for CPU optimization
@@ -10,7 +10,7 @@ ENV JOBS=${JOBS}
ENV NODE_OPTIONS=${NODE_OPTIONS}
ENV npm_config_jobs=${JOBS}
# Install system dependencies for Chromium and Playwright
# Install system dependencies for Chromium
RUN apt-get update && apt-get install -y \
wget \
ca-certificates \
@@ -59,9 +59,6 @@ RUN npm config set maxsockets 8 && \
npm config set fetch-retries 3 && \
npm ci --no-audit --no-fund --prefer-offline
# Install Playwright browsers and dependencies with parallel downloads
RUN npx playwright install --with-deps chromium
# Copy the rest of the app
COPY . .