google-translate-api icon indicating copy to clipboard operation
google-translate-api copied to clipboard

TypeError: Cannot read properties of null (reading '1')

Open delusion8399 opened this issue 2 years ago • 7 comments

` if (json[1][0][0][5] === undefined || json[1][0][0][5] === null) { ^

TypeError: Cannot read properties of null (reading '1') Url: https://translate.google.com/_/TranslateWebserverUi/data/batchexecute?rpcids=MkEWBc&source-path=%2F&f.sid=812076496398908190&bl=boq_translate-webserver_20230530.06_p0&hl=en-US&soc-app=1&soc-platform=1&soc-device=1&_reqid=3014&rt=c `

getting this error I am using "@vitalets/google-translate-api": "^8.0.0",

delusion8399 avatar Jun 01 '23 09:06 delusion8399

Could you check with v9+?

vitalets avatar Jun 04 '23 12:06 vitalets

same here, using ^8.0.0 and can't migrate to ^9.0.0 because it's missing result.from.text.autoCorrected, result.from.language.didYouMean, result.from.text.didYouMean features.

limonte avatar Jun 04 '23 14:06 limonte

Looks like something changed in response json structure. Could you post response json here, and we will try to find hotfix.

vitalets avatar Jun 05 '23 15:06 vitalets

Any progress on this Issue ?

Love2Explore avatar Jun 14 '23 08:06 Love2Explore

Can this endpoint be used with this package at all?

Asmedian avatar Aug 11 '23 17:08 Asmedian

any progress on this Issue?

anderpru avatar Oct 04 '23 16:10 anderpru

@AnderRedna could you provide a code sample that reproduces the bug? I've checked on v8 branch, all tests are passing.

vitalets avatar Oct 08 '23 08:10 vitalets