-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Labels
Description
Steps to reproduce
import fs from "fs/promises";
import google from "googlethis";
async function reverse(){
const imageBuffer = await fs.readFile("./sample.jpg");
const reverse = await google.search(imageBuffer, { ris: true });
console.log(reverse);
};
reverse()
Failure Logs
{
results: [],
videos: [],
knowledge_panel: KnowledgeGraph {
type: null,
title: null,
description: null,
url: null,
metadata: [],
books: [],
tv_shows_and_movies: [],
ratings: [],
available_on: [],
images: [],
songs: [],
socials: [],
demonstration: null,
lyrics: null
},
featured_snippet: FeaturedSnippet { title: null, description: null, url: null },
did_you_mean: null,
weather: Weather {
location: null,
forecast: null,
precipitation: null,
humidity: null,
temperature: null,
wind: null,
image: null
},
time: Time { hours: null, date: null },
location: Location { title: null, distance: null, map: null },
dictionary: Dictionary {
word: null,
phonetic: null,
audio: null,
definitions: [],
examples: []
},
translation: Translation {
source_language: null,
target_language: null,
source_text: null,
target_text: null
},
top_stories: [],
unit_converter: Converters {},
people_also_ask: [],
people_also_search: []
}
Error: TypeError: Cannot read properties of undefined (reading 'url')
at Object.reverse (file:///C:/Users/***/Documents/GitHub/telegram-js-bot/src/GReverse.js:29:50)
at async Object.callback (file:///C:/Users/***/Documents/GitHub/telegram-js-bot/index.js:57:20)Expected behavior
I was expecting the search() function to return a non-empty array with the search results, such as an array of image URLs or other relevant data. Specifically, I was not expecting the result to be an empty array like {results: []}.
Current behavior
The current behavior is that the search() function is consistently returning an empty results list, represented as an empty array like {results: []}, regardless of the image that is passed as an argument. I have tested the function with multiple images, including those that were previously working before April, but it is still returning an empty results array.
Version
Default
Anything else?
No response
Checklist
- I am running the latest version.
- I checked the documentation and found no answer.
- I have searched the existing issues and made sure this is not a duplicate.
- I have provided sufficient information.
Reactions are currently unavailable