Skip to content

fix(infra): Prisma engine crashes due to OpenSSL version mismatch#200

Open
eliteprox wants to merge 5 commits intomainfrom
fix/openssl
Open

fix(infra): Prisma engine crashes due to OpenSSL version mismatch#200
eliteprox wants to merge 5 commits intomainfrom
fix/openssl

Conversation

@eliteprox
Copy link
Copy Markdown
Contributor

@eliteprox eliteprox commented Mar 10, 2026

Summary

Removes the "native" binary target from the Prisma schema to prevent engine crashes caused by OpenSSL version mismatches on Node 22+ / OpenSSL 3.5+ environments. Pins the project to Node 20 LTS via .nvmrc to lock dev environments to a known-stable OpenSSL 3.0.x combination.

Changes

  • Removed "native" from binaryTargets in packages/database/prisma/schema.prisma — all required deployment targets are already explicitly listed (darwin-arm64, linux-arm64-openssl-3.0.x, debian-openssl-3.0.x, rhel-openssl-3.0.x, linux-musl-openssl-3.0.x), making "native" redundant and a source of mismatches
  • Added .nvmrc pinning Node 20 LTS to prevent accidental local regressions on Node 22+

Type

  • Feature
  • Bug fix
  • Refactor
  • Documentation
  • CI / Tooling
  • Plugin (new or update)
  • Dependencies

Plugin(s) Affected

Checklist

  • Tests pass locally
  • Lint passes (npm run lint)
  • Build succeeds (npm run build)
  • No new lint warnings introduced
  • Breaking changes documented below
  • Database migration included (if Prisma schema changed)

Breaking Changes

None — removing "native" does not affect any deployment target. All production platforms are covered by the explicit targets that remain.

Screenshots / Recordings

…event OpenSSL version mismatch on Node 22+/OpenSSL 3.5+
…agement

- Updated middleware to allow access to login pages when ?force=true is present, preventing redirect loops for authenticated users.
- Improved cookie clearing logic in auth context to ensure compatibility across browsers by setting both max-age and expires attributes.
- Refactored RequireAuth component to always clear auth storage before redirecting, addressing potential stale session issues.

These changes improve the robustness of the authentication flow and enhance user experience during login attempts.
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
naap-platform Ready Ready Preview, Comment Mar 10, 2026 4:54pm

Request Review

@github-actions github-actions bot added scope/shell Shell app changes scope/packages Shared package changes size/XS Extra small PR (0-10 lines) has-migration Includes database migration labels Mar 10, 2026
@github-actions
Copy link
Copy Markdown

🗃️ Database Migration Detected

This PR includes changes to Prisma schema files. Please ensure:

  • Migration is backward-compatible or a rollback plan exists
  • Data migration scripts are included if needed
  • Schema changes will be auto-applied to the preview database (Neon preview branch) during the Vercel preview deployment
  • Verify the preview deployment works correctly with the new schema
  • On merge to main, schema changes will auto-promote to production via prisma db push

Preview DB: This PR's Vercel preview deployment uses an isolated Neon database branch. Schema changes are applied automatically via prisma db push during the preview build. The preview branch is reset after each production deploy.

Requesting review from the core team: @livepeer/core

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 10, 2026

📝 Walkthrough

Walkthrough

Updates Node.js version requirement to 20, simplifies RequireAuth component by removing unused auth context values from dependency tracking, and adjusts Prisma generator configuration to prevent OpenSSL compatibility issues.

Changes

Cohort / File(s) Summary
Node.js Configuration
.nvmrc
Specifies Node.js version 20 as the project runtime requirement.
Auth Context Refactoring
apps/web-next/src/contexts/auth-context.tsx
Removes unused user and authErrorStatus values from RequireAuth component destructuring and dependency array, keeping only isAuthenticated, isLoading, and hasAnyRole.
Prisma Generator Configuration
packages/database/prisma/schema.prisma
Removes "native" from binaryTargets to prevent OpenSSL version mismatch issues on Node 22+/OpenSSL 3.5+; adds clarifying comment above the target list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • #194: Modifies the same RequireAuth logic in auth-context.tsx, adjusting which auth values are used and effect dependencies.

Suggested labels

scope/shell, size/S

Suggested reviewers

  • seanhanca
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main infrastructure fix addressing Prisma engine crashes from OpenSSL version mismatches, which is reflected in the Prisma schema changes and .nvmrc file addition.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/openssl

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

Review reminder — This PR has been waiting for review for over 24 hours.

@team — this PR needs a review.

@github-actions github-actions bot added the status/needs-attention Needs urgent attention label Mar 12, 2026
@github-actions
Copy link
Copy Markdown

🚨 Review SLA exceeded (72 h) — This PR has been waiting for review for over 72 hours. Please prioritize.

@team — urgent review needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-migration Includes database migration scope/packages Shared package changes size/XS Extra small PR (0-10 lines) status/needs-attention Needs urgent attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(infra): Prisma engine crashes due to OpenSSL version mismatch — no containerization for Node backends

1 participant