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 while retrieving cache data #48

Closed And96 closed 1 year ago

And96 commented 1 year ago

I/flutter ( 3666): Error while retrieving cache data => type 'Null' is not a subtype of type 'String'

Often appears this message in debug console

 any_link_preview.Metadata? metadata1 =
              await any_link_preview.AnyLinkPreview.getMetadata(
            link: link,
            cache: const Duration(days: 1),
          );
AndreVicenteW commented 1 year ago

Change to cache: const Duration(days: 0)

And96 commented 1 year ago

cache dont work if i set Duration = 0

MalayAgrawal commented 1 year ago

Error while retrieving cache data => type 'Null' is not a subtype of type 'String'

Did you find any fix to it?

And96 commented 1 year ago

Error while retrieving cache data => type 'Null' is not a subtype of type 'String'

Did you find any fix to it?

No. There is no fix for this log message.

We must wait a fix from the plugin or create a fork.

sur950 commented 1 year ago

Hi,

This is a long-standing issue and after a long debug, I found out that this is not happening on all devices and is happening only in a few devices. I am yet to get the pattern on what sort of device this is failing. Once I get that, I will find the issue going deeper into that OS/device and will fix this permanently.

However, a quick fix is applied for this and will be out in 3.0.1.