firebase / firebase-tools

The Firebase Command Line Tools
MIT License
3.97k stars 917 forks source link

Firebase deploy hitting captcha in "functions:generateUploadUrl" #7226

Closed justinmann closed 1 month ago

justinmann commented 1 month ago

[REQUIRED] Environment info

13.10.1

firebase-tools:

macOs

Platform:

[REQUIRED] Test case

firebase deploy --only functions

[REQUIRED] Steps to reproduce

firebase deploy --only functions

[REQUIRED] Expected behavior

deploy to work

[REQUIRED] Actual behavior

deploy fails, and return this log: [2024-05-25T05:19:45.436Z] <<< [apiv2][body] POST https://cloudfunctions.googleapis.com/v2/projects/app-staging-44a1f/locations/us-central1/functions:generateUploadUrl "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n\n<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"><meta name=\"viewport\" content=\"initial-scale=1\"><a rel="noreferrer nofollow" target="_blank" href="https://cloudfunctions.googleapis.com/v2/projects/app-staging-44a1f/locations/us-central1/functions:generateUploadUrl">https://cloudfunctions.googleapis.com/v2/projects/app-staging-44a1f/locations/us-central1/functions:generateUploadUrl</a>\n<body style=\"font-family: arial, sans-serif; background-color: #fff; color: #000; padding:20px; font-size:18px; overscroll-behavior:contain;\" onload=\"e=document.getElementById('captcha');if(e){e.focus();} if(solveSimpleChallenge) {solveSimpleChallenge(,);}\">\n<div style=\"max-width:400px;\">\n<hr noshade size=\"1\" style=\"color:#ccc; background-color:#ccc;\">
\n<form id=\"captcha-form\" action=\"index\" method=\"post\">\nTo continue, please type the characters below:

\n<img src=\"/sorry/image?id=6006971357495622825&q=EgRH1IdVGPDpxbIGIjDgBOkT5h8ZhZ0nowp4R-OeW2HJBSNo7c4SSi-B7pFryVYoEEsBPwg_IG7SA3jl7KUyAmNyWgFD&hl=en&continue=https://cloudfunctions.googleapis.com/v2/projects/app-staging-44a1f/locations/us-central1/functions:generateUploadUrl\" border=\"1\" alt=\"Please enable images\">

\n<input type=\"text\" name=\"captcha\" value=\"\" id=\"captcha\" size=\"12\" style=\"font-size:16px; padding:3px 0 3px 5px; margin-left:0px;\">


\n<input type=\"submit\" name=\"btn-submit\" value=\"Submit\" style=\"font-size:18px; padding:4px 0;\">\n\n<input type=\"hidden\" name=\"continue\" value=\"https://cloudfunctions.googleapis.com/v2/projects/app-staging-44a1f/locations/us-central1/functions:generateUploadUrl\">\n\n<hr noshade size=\"1\" style=\"color:#ccc; background-color:#ccc;\">\n\n<div style=\"font-size:13px;\">\nAbout this page

\n\nOur systems have detected unusual traffic from your computer network. This page checks to see if it's really you sending the requests, and not a robot. <a href=\"#\" onclick=\"document.getElementById('infoDiv').style.display='block';\">Why did this happen?

\n\n<div id=\"infoDiv\" style=\"display:none; background-color:#eee; padding:10px; margin:0 0 15px 0; line-height:1.4em;\">\nThis page appears when Google automatically detects requests coming from your computer network which appear to be in violation of the <a href=\"//www.google.com/policies/terms/\">Terms of Service. The block will expire shortly after those requests stop. In the meantime, solving the above CAPTCHA will let you continue to use our services.

This traffic may have been sent by malicious software, a browser plug-in, or a script that sends automated requests. If you share your network connection, ask your administrator for help — a different computer using the same IP address may be responsible. <a href=\"//support.google.com/websearch/answer/86640\">Learn more

Sometimes you may be asked to solve the CAPTCHA if you are using advanced terms that robots are known to use, or sending requests very quickly.\n

\n\nIP address: 71.212.135.85
Time: 2024-05-25T05:19:45Z
URL: https://cloudfunctions.googleapis.com/v2/projects/app-staging-44a1f/locations/us-central1/functions:generateUploadUrl
\n
\n\n\n\n"

google-oss-bot commented 1 month ago

This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.

aalej commented 1 month ago

Hey @justinmann, thanks for reaching out and sharing your debug logs. I’m currently unable to reproduce this, no issues were encountered during functions deployment.

Looking through the logs, it seems possible that this might be a network issue. Could you try connecting to a different network or temporarily turning off any proxy or VPN that you may have, then run firebase deploy --only functions? Are there any changes in behavior during deployment?

I’m using the ff to replicate this:

joehan commented 1 month ago

Hi @justinmann - sorry to hear that you are running into this. However, this is outside of the scope of the code in this repo, and we won't be able to debug this beyond a surface level. If @aalej 's suggestions do not resolve this for you, please reach out to Cloud Functions Support: https://cloud.google.com/functions/docs/getting-support - they'll be better equipped to help debug this issue.