feat(captcha): add MANUAL_CAPTCHA mode for new Suno UI (v5.5+)#277
Open
courcirc8 wants to merge 2 commits into
Open
feat(captcha): add MANUAL_CAPTCHA mode for new Suno UI (v5.5+)#277courcirc8 wants to merge 2 commits into
courcirc8 wants to merge 2 commits into
Conversation
Suno's v5.5 web UI dropped the .custom-textarea selector that the existing
automated CAPTCHA flow relies on, causing /api/custom_generate to time out
on `waiting for locator('.custom-textarea')`. This is tracked as issue gcui-art#263
and has been unresolved for ~5 months.
Add a parallel `getCaptchaManual()` flow gated by env var MANUAL_CAPTCHA=true:
- Opens a VISIBLE browser (overrides BROWSER_HEADLESS for the lifetime of
the request) on https://suno.com/create
- Performs NO DOM automation — the user fills the UI and clicks Create
themselves in whatever UI version is live
- Hijacks /api/generate/v2 the same way the existing flow does, extracting
the hCaptcha token from the request body
- No timeout — accommodates however long the human needs
Pros:
- Survives any future UI redesign (no selectors)
- No 2Captcha dependency required
- Works with the user's own Pro/Premier account
Cons:
- Requires human-in-the-loop (only triggers if Suno demands a captcha;
warm sessions skip the captcha and never invoke this path)
- Not suitable for headless server deployments
Trigger via .env:
MANUAL_CAPTCHA=true
|
Someone is attempting to deploy a commit to the Linkly AI LLC's projects Team on Vercel. A member of the Team first needs to authorize it. |
courcirc8
commented
May 17, 2026
courcirc8
left a comment
Author
There was a problem hiding this comment.
Manual option could be useful
Build on the previous commit with two additions: 1. Tri-state semantics for MANUAL_CAPTCHA: unset/false=auto, true=manual, fallback=try-auto-then-manual. The fallback mode is the smart path for local users — automation when it works, escape hatch when the UI drifts. 2. Polish: split auto flow into private getCaptchaAuto(); log active mode in init(); document in README and .env.example. Default behavior (unset) is byte-equivalent to upstream. Tested routing on all values. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Suno's v5.5 web UI dropped the .custom-textarea selector that the existing automated CAPTCHA flow relies on, causing /api/custom_generate to time out on
waiting for locator('.custom-textarea'). This is tracked as issue #263 and has been unresolved for ~5 months.Add a parallel
getCaptchaManual()flow gated by env var MANUAL_CAPTCHA=true:Pros:
Cons:
Trigger via .env:
MANUAL_CAPTCHA=true