You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
....
final response =await_getDataWithCache(_url);
final results =<Host>[];
for (final e inLineSplitter.split(response)) {
if (!e.startsWith('#')) {
final host =Host(authority: e);
results.add(host);
}
}
return results;
The list loads, but when I try to use it to block ads, the app closes and I receive:
W/flutter.example( 6170): Throwing OutOfMemoryError "Failed to allocate a 16 byte allocation with 7704 free bytes and 7632B until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC." (VmSize 18446416 kB) E/AndroidRuntime( 6170): FATAL EXCEPTION: main E/AndroidRuntime( 6170): Process: com.islamdidarmd.example.adblockerwebview.flutter.example, PID: 6170 E/AndroidRuntime( 6170): java.lang .OutOfMemoryError: Failed to allocate a 16 byte allocation with 7704 free bytes and 7632B until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC.
E/AndroidRuntime( 6170): at io.flutter.plugin.common.StandardMessageCodec.readValueOfType(StandardMessageCodec.java:381) E/AndroidRuntime( 6170): at io.flutter.plugin.common.StandardMessageCodec.readValue(StandardMessageCodec.java: 340) E/AndroidRuntime( 6170): at io.flutter.plugin.common.StandardMessageCodec.readValueOfType(StandardMessageCodec.java:434) E/AndroidRuntime( 6170): at io.flutter.plugin.common.StandardMessageCodec.readValue(StandardMessageCodec.java:340) E/AndroidRuntime( 6170): at io.flutter.plugin.common.StandardMessageCodec.readValueOfType(StandardMessageCodec.java:434) E/AndroidRuntime( 6170) : at io.flutter.plugin.common.StandardMessageCodec.readValue(StandardMessageCodec.java:340) E/AndroidRuntime( 6170): at io.flutter.plugin.common.StandardMessageCodec.readValueOfType(StandardMessageCodec.java:424) E/AndroidRuntime( 6170): at io.flutter.plugin.common.StandardMessageCodec.readValue(StandardMessageCodec.java:340)
E/AndroidRuntime( 6170): at io.flutter.plugin.common.StandardMessageCodec.readValueOfType(StandardMessageCodec.java:434)
but I still get the same error, it seems flutter_inappwebview, _inAppWebViewOptions?.crossPlatform.contentBlockers, is not optimized to handle large lists.
The text was updated successfully, but these errors were encountered:
Hi thank you for trying this out raising this issue. I will investigate more about this.
If flutter_inappwebview is indeed the one what is causing the issue, I might have to use native webview for this. Implementing own webview will take time. Meanwhile, can you provide a minimum reproducible sample?
I'm trying to use this list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/domains/pro.txt Modify AdBlockerRepositoryImpl to avoid comments:
The list loads, but when I try to use it to block ads, the app closes and I receive:
I also tried adding AndroidManifest.xml :
but I still get the same error, it seems flutter_inappwebview, _inAppWebViewOptions?.crossPlatform.contentBlockers, is not optimized to handle large lists.
The text was updated successfully, but these errors were encountered: