web_scraper icon indicating copy to clipboard operation
web_scraper copied to clipboard

SocketExeption: Connection Failed, on Flutter Desktop and Flutter Web

Open Hecsall opened this issue 2 years ago • 6 comments

Hi @tusharojha, I was trying to add desktop and web support to my existing flutter project when I noticed that the web_scraper package throws an error when calling the loadWebPage method.

The specific error is: SocketException: Connection failed (OS Error: Operation not permitted, errno = 1), address = m*******.com, port = 443 See screenshot: imgur

Same exception happens even with a basic web_scraper usage like:

final webScraper = WebScraper('https://www.google.com');

if (await webScraper.loadWebPage('/search/')) {
    print('test');
});

I'm pretty sure it's not related to the website I'm scraping since on Android and iOS the same code works fine, maybe it's not fully implemented for desktop and web usage? Or am I missing something?

Thanks!

Hecsall avatar Aug 18 '21 12:08 Hecsall