sur950 / any_link_preview

A flutter Plugin/Package to show the preview of any web link that starts with HTTP/HTTPS. Mostly useful for application that had chat.
MIT License
70 stars 70 forks source link

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: SocketException: Failed host lookup: 'youtue.com' (OS Error: No address associated with hostname, errno = 7) #26

Closed SatyamKr07 closed 2 years ago

SatyamKr07 commented 2 years ago

Getting this exception in debug console when using - In the ui it should show error widget but it is showing Fetching data...

url used: https://youtue.com (Note: this site doesn't exist, it is just misspelled youtube )

Full issue pic from debug console: image

Please handle this exception to show error widget. Thanks

sur950 commented 2 years ago

Hey @SatyamKr07

Thanks for reporting this. I have added this to my bucket & will be included in the next version of the package.

As a temporary fix, you can use try... catch with SocketException to notify error to the end user. I will try to release a new version over this weekend.

sur950 commented 2 years ago

Now this is fixed in new version of the package. You can find the commit here: e0985e53ee88c67825f3454f4ce076f13ab760f4