vitalets / google-translate-api

A free and unlimited API for Google Translate :dollar: :no_entry_sign:
MIT License
936 stars 120 forks source link

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

Open delusion8399 opened 1 year ago

delusion8399 commented 1 year ago

` 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",

vitalets commented 1 year ago

Could you check with v9+?

limonte commented 1 year ago

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.

vitalets commented 1 year ago

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

Love2Explore commented 1 year ago

Any progress on this Issue ?

Asmedian commented 1 year ago

Can this endpoint be used with this package at all?

AnderRedna commented 1 year ago

any progress on this Issue?

vitalets commented 1 year ago

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