Closed imajyo closed 1 year ago
It seems has someting todo with WkWebview. I tried to shared WKProcessPool to solve this problem and it works. I still hope the author fix this problem. Here is the code
(WKProcessPool *) sharedWebViewPool {
static WKProcessPool *pool = nil;
if( pool == nil){
pool = [[WKProcessPool alloc] init];
}
return pool;
}
configuration.processPool = [self sharedWebViewPool];
Add above code to FlutterWebView.m
Hi @imajyo Looks like some extra sample code is needed to be able to do step 5. So, please provide a completed and minimal reproducible code sample so that we may verify this.
Also, which webview_flutter_wkwebview
version are you using? I can't find FlutterWebView.m
in the latest version webview_flutter_wkwebview: ^2.9.5
. And the latest webview_flutter
version is 3.0.4
, please try upgrading it and check if the issue still reproduces.
Thank you!
This is a duplicate of https://github.com/flutter/flutter/issues/94591
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Steps to Reproduce
flutter run
on the code sampleExpected results: both page1 and page2 expected to has correct cookie value "testtokenvalue" which named token
Actual results: page1 has correct cookie value "testtokenvalue" but page2 does not. The value of cookie which named "token" of page2 is empty.
code sample
```dart import 'package:flutter/material.dart'; import 'package:webview_flutter/webview_flutter.dart'; class Browser extends StatelessWidget { const Browser({Key? key, required this.url, required this.title}) : super(key: key); final String url; final String title; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(title), ), body: WebView( javascriptMode: JavascriptMode.unrestricted, initialCookies: constLogs
``` info • Unused import: 'package:weimob_cps/models/product/product.dart' • lib/class/product_pagination.dart:2:8 • unused_import info • Unused import: 'package:weimob_cps/models/product/product.dart' • lib/class/product_pagination_manager.dart:2:8 • unused_import info • Duplicate import • lib/manager/ass/after_sale_manger.dart:9:8 • duplicate_import info • The import of 'package:weimob_cps/models/product/product.dart' is unnecessary because all of the used elements are also provided by the import of 'package:weimob_cps/services/product/product.dart' • lib/manager/home/home.dart:7:8 • unnecessary_import info • The import of 'package:weimob_cps/widgets/universal/biz/product_list/typedef.dart' is unnecessary because all of the used elements are also provided by the import of 'package:weimob_cps/class/product_pagination_with_sort.dart' • lib/manager/home/home.dart:10:8 • unnecessary_import info • This function has a nullable return type of 'List