Page MenuHomePhabricator

HTTP 403 Error when using google-api-proxy on VPS
Closed, ResolvedPublic

Description

Sign in to English Wikisource.
Activate the Google OCR in \Preferences\Gadgets.
Open a random page in edit mode.
https://en.wikisource.org/w/index.php?title=Page:Vol_6_History_of_Mexico_by_H_H_Bancroft.djvu/531&action=edit
Click on the Google OCR in the toolbar
The message appears each time.

image.png (219×395 px, 95 KB)

⧼error⧽ undefined Client error: `POST https://googlevision-api-proxy.wmflabs.org/v1/images:annotate?key=[KEY REDACTED]` resulted in a `403 Forbidden` response:
<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr> (truncated...)

Event Timeline

Aklapper renamed this task from Google OCR in en.Wikisource is broken and displays an error message (image included) to Google OCR in en.Wikisource is broken and displays an error message.Apr 15 2020, 7:24 PM
Aklapper renamed this task from Google OCR in en.Wikisource is broken and displays an error message to HTTP 403 Error when trying to use Google OCR in en.Wikisource.

No idea where to put this; no project tag in Phabricator (which is unhelpful for everybody). Looking at history, this might be Community-Tech?

Aklapper renamed this task from HTTP 403 Error when trying to use Google OCR in en.Wikisource to HTTP 403 Error for https://googlevision-api-proxy.wmflabs.org/ when trying to use Google OCR in en.Wikisource.Apr 15 2020, 7:33 PM
Aklapper updated the task description. (Show Details)
MusikAnimal subscribed.

Yep, Community-Tech is the correct tag.

I can confirm it's not an issue with Google, they stopped receiving requests from us earlier today:

Screenshot from 2020-04-15 14-18-09.png (233×740 px, 15 KB)

I checked the security groups for the API proxy on Horizon, and ingress is set to allow Toolforge, so that part should be okay.

I'll continue to debug.

MusikAnimal renamed this task from HTTP 403 Error for https://googlevision-api-proxy.wmflabs.org/ when trying to use Google OCR in en.Wikisource to HTTP 403 Error when using google-api-proxy on VPS.Apr 15 2020, 7:55 PM

I'm pretty sure this happened because of T135046#6060220, going by the puppet role.

Mentioned in SAL (#wikimedia-cloud) [2020-04-15T20:22:54Z] <bd808> Added google-api-proxy.wmflabs.org & googlevision-api-proxy.wmflabs.org to profile::wmcs::novaproxy::xff_fqdns (T135046, T250312)

Should be working now! Sorry we didn't notice this ahead of time.

Any idea why this changed? I think I saw an email about some network changes in Toolforge. Is that what happened?

Any idea why this changed? I think I saw an email about some network changes in Toolforge. Is that what happened?

Yep. XFF headers were intentionally removed for VPS traffic earlier today, after a two week window to request to be whitelisted. We just didn't realize google-api-proxy relied on them. All good now.

Yep, Community-Tech is the correct tag.

@MusikAnimal, @ifried et al: Thanks. Could that be fixed (request dedicated code project tag, potential Herald rule to also add the Community-Tech tag), so people could put a task into the right basket (=project tag) without having to know about existence and names of WMF teams and what these teams work(ed) on? :)

Could that be fixed (request dedicated code project tag, potential Herald rule to also add the Community-Tech tag), so people could put a task into the right basket (=project tag) without having to know about existence and names of WMF teams and what these teams work(ed) on? :)

I created T250319 for the proxy. We should create one for the Google OCR tool too (which uses the proxy), but from T247284 it seems we're not sure about naming yet. I'll start a discussion there.

Just started using it in English Wikisource and its working.