Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service Unavailable #17

Closed
mayank134819 opened this issue Apr 9, 2017 · 6 comments
Closed

Service Unavailable #17

mayank134819 opened this issue Apr 9, 2017 · 6 comments

Comments

@mayank134819
Copy link

mayank134819 commented Apr 9, 2017

Error: Response code 503 (Service Unavailable)
at /home/mayank/Desktop/node_modules/google-translate-token/index.js:103:25
at process._tickCallback (internal/process/next_tick.js:109:7)
code: 'BAD_NETWORK',
message: 'Response code 503 (Service Unavailable)'

Error: getaddrinfo ENOTFOUND translate.google.com translate.google.com:443
at /home/mayank/Desktop/node_modules/google-translate-token/index.js:103:25
at process._tickCallback (internal/process/next_tick.js:109:7)
code: 'BAD_NETWORK',
message: 'getaddrinfo ENOTFOUND translate.google.com translate.google.com:443'

@JukeboxRhino
Copy link
Collaborator

JukeboxRhino commented Apr 14, 2017

I'm also getting this now. My previous fix had fixed the BAD_NETWORK error but now every request fails with this 503.

Edit: this stackoverflow question seems to have pointed out that it's probably being blocked for being a bot, and we can't exactly solve the captcha with a script.

@eliavmaman
Copy link

i'm getting that as well... any idea fellowes? :)

@jacksteamdev
Copy link
Contributor

jacksteamdev commented May 6, 2017

While we're waiting for PR #16 or #18 to be merged, try this repo: teamsteamdev/google-translate-api#2083. I just ran $ yarn test and it passes for me. This branch incorporates PR #13 which switches from GET to POST when submitting longer text strings, and it should solve Issues #11, #5, and #7.

I added it to package.json in one of my projects like below, and no problems so far...

"dependencies": {
   "google-translate-api": "teamsteamdev/google-translate-api#2083"
}

Good luck! @eliavmaman @JukeboxRhino @tgyou @matheuss

@jacksteamdev
Copy link
Contributor

I have noticed that Google rejects strings including \r. If you're having problems, try looking at the string you're passing for translation. I'm splitting my submissions into paragraphs and submitting them separately using Promise.all().

@AStoker
Copy link

AStoker commented Jun 2, 2017

This issue is a duplicate of #11

@JukeboxRhino
Copy link
Collaborator

Duplicate of #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants