fix(push): trim de la VAPID public key (applicationServerKey inválido) - #103
Merged
Merged
Conversation
Un espacio o salto de línea al final del valor de NEXT_PUBLIC_VAPID_PUBLIC_KEY (artefacto de pegado común en Vercel) hacía que la clave decodificara a un largo incorrecto y el browser rechazara la suscripción con "applicationServerKey is not valid". Trim defensivo antes de decodificar. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXHQeq3LpQiRp2zmvXghf2
wikichaves
enabled auto-merge (squash)
July 23, 2026 02:31
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qué se hizo
El toggle de push tiraba
Failed to execute 'subscribe' on 'PushManager': The provided applicationServerKey is not validen Android, con las 3 env vars VAPID ya seteadas en Vercel.Causa probable: un espacio o salto de línea al final del valor de
NEXT_PUBLIC_VAPID_PUBLIC_KEY(artefacto de pegado común en Vercel) →urlBase64ToUint8Arraydecodifica un largo incorrecto → el browser rechaza la key.Fix:
.trim()defensivo sobre la key antes de decodificar.Validación
npm run lint✓ ·npx tsc --noEmit✓🤖 Generated with Claude Code
Generated by Claude Code