flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
164.99k stars 27.19k forks source link

webview_flutter 3.0.0 plugin lost cookie in iOS when two webview instance take place #113683

Closed imajyo closed 1 year ago

imajyo commented 1 year ago

Steps to Reproduce

  1. Execute flutter run on the code sample
  2. I have a class named Browser which invoke webview_flutter 3.0.0 to provide a webview widget.
  3. Browser initial cookie. The target cookie name is "token", and the value is a test value "testtokenvalue".
  4. in flutter app push a h5 page stack via Browser(url: "https://a.b.com/xxxxx/page1.html", title: "page1")
  5. in h5 page1.html, push a h5 page stack via a jsbridge method which invoke Browser(url: 'https://a.b.com/xxxxx/page2.html', title: "page2")

Expected 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: const [ WebViewCookie( name: "token", value: "testtokenvalue", domain: 'a.b.com') ], onWebViewCreated: (controller) { controller.loadUrl(url); }, )); } } ```
Logs ``` 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?', but ends without returning a value • lib/manager/home/home.dart:176:17 • body_might_complete_normally_nullable info • Unused import: 'dart:convert' • lib/manager/product/sku.dart:1:8 • unused_import info • Unused import: 'package:weimob_cps/models/product/sku/spec.dart' • lib/manager/product/sku.dart:3:8 • unused_import info • Avoid empty statements • lib/manager/user/income.dart:127:10 • empty_statements info • Unused import: 'package:flutter/material.dart' • lib/manager/user/login.dart:9:8 • unused_import info • Unused import: 'package:weimob_cps/vendor/wxsdk.dart' • lib/manager/user/login.dart:13:8 • unused_import info • Unused import: 'package:weimob_cps/models/live/live_exclusive_list/live_exclusive_list_page_arguments.dart' • lib/manager/user/mine.dart:16:8 • unused_import info • Unused import: 'package:weimob_cps/models/product/sku/spec_value.dart' • lib/models/product/sku/sku.dart:3:8 • unused_import info • Unused import: 'package:weimob_cps/models/product/sku/spec_value.dart' • lib/models/product/sku/spec_selected.dart:2:8 • unused_import info • Unused import: 'package:weimob_cps/models/product/sku/spec_value.dart' • lib/models/product/sku/spu.dart:4:8 • unused_import info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/appstore.dart:6:34 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/banner.dart:7:35 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/channel/channel_service.dart:15:44 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/channel/channel_service.dart:30:38 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/channel/channel_service.dart:44:38 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/channel/channel_service.dart:58:32 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/channel/channel_service.dart:74:40 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/channel/channel_service.dart:87:32 • body_might_complete_normally_nullable info • Unused import: 'package:weimob_cps/models/product/sku/spu.dart' • lib/services/exclusive_product/exclusive_product.dart:1:8 • unused_import info • Unused import: 'package:weimob_cps/models/product/pid_bind.dart' • lib/services/exclusive_product/exclusive_product.dart:3:8 • unused_import info • Unused import: 'package:weimob_cps/models/product/category.dart' • lib/services/exclusive_product/exclusive_product.dart:4:8 • unused_import info • Unused import: 'package:weimob_cps/models/product/product.dart' • lib/services/exclusive_product/exclusive_product.dart:6:8 • unused_import info • Unused import: 'package:weimob_cps/models/pagination.dart' • lib/services/exclusive_product/exclusive_product.dart:7:8 • unused_import info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/exclusive_product/exclusive_product.dart:16:38 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr?>', but ends without returning a value • lib/services/live/live_exclusive_service.dart:19:63 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/live/live_exclusive_service.dart:39:46 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr?>', but ends without returning a value • lib/services/live/live_exclusive_service.dart:56:63 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/live/live_exclusive_service.dart:75:44 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/live/live_exclusive_service.dart:90:44 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/live/live_exclusive_service.dart:106:40 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/live/live_exclusive_service.dart:126:44 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/live/live_exclusive_service.dart:146:40 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr?>', but ends without returning a value • lib/services/live/live_service.dart:16:57 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/live/live_service.dart:39:32 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr?>', but ends without returning a value • lib/services/live/live_service.dart:58:51 • body_might_complete_normally_nullable info • Avoid using braces in interpolation when not needed • lib/services/live/live_service.dart:75:26 • unnecessary_brace_in_string_interps info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/live/live_service.dart:92:32 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/live/live_service.dart:111:32 • body_might_complete_normally_nullable info • Unused import: 'package:flutter/material.dart' • lib/services/media.dart:1:8 • unused_import info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/media.dart:9:36 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/myshop/my_shop_service.dart:16:38 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr?>', but ends without returning a value • lib/services/myshop/my_shop_service.dart:30:55 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/myshop/my_shop_service.dart:51:35 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/myshop/my_shop_service.dart:64:32 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/myshop/my_shop_service.dart:79:32 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/myshop/my_shop_service.dart:94:38 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/myshop/my_shop_service.dart:108:34 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/myshop/my_shop_service.dart:123:38 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/myshop/my_shop_service.dart:149:38 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/product/product.dart:15:38 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/product/product.dart:32:32 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/product/product.dart:48:32 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/product/product.dart:64:32 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr?>', but ends without returning a value • lib/services/product/product.dart:80:49 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/product/product.dart:109:44 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/product/product.dart:130:28 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr?>', but ends without returning a value • lib/services/product/product.dart:147:23 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/product/product.dart:159:26 • body_might_complete_normally_nullable info • Unused import: 'package:flutter/material.dart' • lib/services/settlement/settlement_service.dart:1:8 • unused_import info • Unused import: 'package:weimob_cps/manager/settlement/settlement.dart' • lib/services/settlement/settlement_service.dart:2:8 • unused_import info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/settlement/settlement_service.dart:15:33 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr?>', but ends without returning a value • lib/services/settlement/settlement_service.dart:29:7 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/settlement/settlement_service.dart:42:36 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/settlement/settlement_service.dart:55:35 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/settlement/settlement_service.dart:70:32 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr?>', but ends without returning a value • lib/services/store/supplier.dart:7:49 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/user/auth.dart:12:29 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/user/auth.dart:38:30 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/user/auth.dart:56:32 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/user/auth.dart:87:35 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/user/auth.dart:114:32 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/user/mine.dart:10:29 • body_might_complete_normally_nullable info • This function has a nullable return type of 'FutureOr', but ends without returning a value • lib/services/user/mine.dart:29:31 • body_might_complete_normally_nullable info • The import of 'package:flutter/widgets.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart' • lib/utils/hex_color.dart:2:8 • unnecessary_import info • Avoid using braces in interpolation when not needed • lib/utils/route.dart:16:22 • unnecessary_brace_in_string_interps info • Avoid using braces in interpolation when not needed • lib/utils/route.dart:16:36 • unnecessary_brace_in_string_interps info • This function has a nullable return type of 'HttpClient?', but ends without returning a value • lib/vendor/network/http.dart:201:18 • body_might_complete_normally_nullable info • This function has a nullable return type of 'T?', but ends without returning a value • lib/vendor/persistence.dart:57:6 • body_might_complete_normally_nullable info • Avoid using `forEach` with a function literal • lib/views/ass/after_sale_list_sec.dart:188:16 • avoid_function_literals_in_foreach_calls info • The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart' • lib/views/ass/after_sale_support_detail.dart:1:8 • unnecessary_import info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: OrderBodyWidget.assManager • lib/views/ass/after_sale_support_detail.dart:44:7 • must_be_immutable info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: OrderStateWidget.orderStateDesc, OrderStateWidget.orderState, OrderStateWidget.shouldRefundCommissionAmount, OrderStateWidget.timeDesc, OrderStateWidget.boxDecoration • lib/views/ass/after_sale_support_detail.dart:108:7 • must_be_immutable info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: GoodsInfoWidget.goodsImage, GoodsInfoWidget.goodsTitle, GoodsInfoWidget.skuInfo, GoodsInfoWidget.refundItemQuantity • lib/views/ass/after_sale_support_detail.dart:170:7 • must_be_immutable info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: PayMoneyWidget.goodsActualPayAmount, PayMoneyWidget.commissionAmount • lib/views/ass/after_sale_support_detail.dart:247:7 • must_be_immutable info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: ItemWithInfo.title, ItemWithInfo.amount • lib/views/ass/after_sale_support_detail.dart:272:7 • must_be_immutable info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: OrderSubInfoWidget.orderState, OrderSubInfoWidget.remark, OrderSubInfoWidget.orderNo, OrderSubInfoWidget.refundReason, OrderSubInfoWidget.refundTypeStr, OrderSubInfoWidget.goodsRefundAmount, OrderSubInfoWidget.freightRefundAmount, OrderSubInfoWidget.refundApplyTimeStr • lib/views/ass/after_sale_support_detail.dart:303:7 • must_be_immutable info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: NoteWidget.orderState, NoteWidget.remark • lib/views/ass/after_sale_support_detail.dart:406:7 • must_be_immutable info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: ItemWithDesc.title, ItemWithDesc.msg, ItemWithDesc.isMoney • lib/views/ass/after_sale_support_detail.dart:442:7 • must_be_immutable info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: AssScanPayWidget.timeDesc, AssScanPayWidget.refundAmountStr, AssScanPayWidget.imageurl • lib/views/ass/after_scan_pay.dart:49:7 • must_be_immutable info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: AssQRCodeWidget.imageurl • lib/views/ass/after_scan_pay.dart:156:7 • must_be_immutable info • Prefer declaring const constructors on `@immutable` classes • lib/views/channels/channel_auth.dart:9:3 • prefer_const_constructors_in_immutables info • This method overrides a method annotated as '@mustCallSuper' in 'State', but doesn't invoke the overridden method • lib/views/channels/channel_auth.dart:18:8 • must_call_super warning • The '!' will have no effect because the receiver can't be null • lib/views/channels/channel_auth.dart:19:28 • unnecessary_non_null_assertion warning • The '!' will have no effect because the receiver can't be null • lib/views/channels/channel_auth.dart:34:28 • unnecessary_non_null_assertion info • Unused import: 'dart:ffi' • lib/views/channels/window.dart:9:8 • unused_import info • The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart' • lib/views/channels/window.dart:11:8 • unnecessary_import info • Unused import: 'package:fluttertoast/fluttertoast.dart' • lib/views/channels/window.dart:13:8 • unused_import info • Unused import: 'package:weimob_cps/class/manager.dart' • lib/views/channels/window.dart:14:8 • unused_import info • Unused import: 'package:weimob_cps/models/channels/channel_goods.dart' • lib/views/channels/window.dart:20:8 • unused_import info • Unused import: 'package:weimob_cps/class/manager.dart' • lib/views/exclusive_product/editor.dart:2:8 • unused_import info • Prefer const with constant constructors • lib/views/exclusive_product/editor.dart:46:28 • prefer_const_constructors info • Prefer const literals as parameters of constructors on @immutable classes • lib/views/exclusive_product/editor.dart:48:33 • prefer_const_literals_to_create_immutables info • Prefer const with constant constructors • lib/views/exclusive_product/editor.dart:49:25 • prefer_const_constructors info • Prefer const with constant constructors • lib/views/exclusive_product/editor.dart:50:25 • prefer_const_constructors info • Unused import: 'package:weimob_cps/utils/utils.dart' • lib/views/exclusive_product/list.dart:12:8 • unused_import info • The import of 'package:weimob_cps/widgets/universal/biz/no_goods.dart' is unnecessary because all of the used elements are also provided by the import of 'package:weimob_cps/widgets/universal/universal.dart' • lib/views/live/live_helper.dart:13:8 • unnecessary_import info • Prefer declaring const constructors on `@immutable` classes • lib/views/live/live_helper.dart:22:3 • prefer_const_constructors_in_immutables info • The import of 'package:weimob_cps/widgets/universal/biz/no_goods.dart' is unnecessary because all of the used elements are also provided by the import of 'package:weimob_cps/widgets/universal/universal.dart' • lib/views/live/live_helper_search.dart:9:8 • unnecessary_import info • The value of the local variable 'value' isn't used • lib/views/settlement/register_step_one.dart:74:9 • unused_local_variable info • Unused import: '../../widgets/universal/theme/button.dart' • lib/views/user/income.dart:8:8 • unused_import info • The value of the local variable 'width' isn't used • lib/views/user/mine_account.dart:11:12 • unused_local_variable info • Unused import: 'package:roundcheckbox/roundcheckbox.dart' • lib/widgets/ass/after_sale_item.dart:2:8 • unused_import info • Prefer declaring const constructors on `@immutable` classes • lib/widgets/ass/custom_checkbox.dart:8:3 • prefer_const_constructors_in_immutables info • Unused import: 'dart:ffi' • lib/widgets/ass/money_widget.dart:1:8 • unused_import info • Unused import: 'package:flutter_swipe_action_cell/flutter_swipe_action_cell.dart' • lib/widgets/channels/window/product_item.dart:2:8 • unused_import info • The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart' • lib/widgets/channels/window/product_list.dart:1:8 • unnecessary_import info • Unused import: 'package:weimob_cps/utils/utils.dart' • lib/widgets/channels/window/product_list.dart:7:8 • unused_import info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: WindowProductList.goodsIds • lib/widgets/channels/window/product_list.dart:16:7 • must_be_immutable info • Unused import: 'package:weimob_cps/utils/utils.dart' • lib/widgets/exclusive_product/list/condition_bar1.dart:2:8 • unused_import info • A value for optional parameter 'aspectRatio' isn't ever given • lib/widgets/exclusive_product/list/list.dart:66:10 • unused_element info • The value of the local variable 'index' isn't used • lib/widgets/live/dissmissible_item.dart:31:15 • unused_local_variable info • Prefer declaring const constructors on `@immutable` classes • lib/widgets/live/live_exclusive_detail/panel_tab.dart:50:3 • prefer_const_constructors_in_immutables info • A value for optional parameter 'defaultValue' isn't ever given • lib/widgets/live/live_exclusive_setup/exclusive_sku_sec.dart:328:23 • unused_element info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: SalesSection.count • lib/widgets/live/live_item_main.dart:63:7 • must_be_immutable info • The value of the local variable '_refreshController' isn't used • lib/widgets/live/live_list_draggable.dart:33:29 • unused_local_variable info • Prefer declaring const constructors on `@immutable` classes • lib/widgets/live/search_box.dart:21:3 • prefer_const_constructors_in_immutables info • SizedBox for whitespace • lib/widgets/product/promote/product_selection_sec.dart:21:16 • sized_box_for_whitespace info • Unused import: 'package:weimob_cps/models/settlement/bank_list.dart' • lib/widgets/settlement/bank_picker.dart:10:8 • unused_import info • The value of the field '_imageFile' isn't used • lib/widgets/settlement/image_choose_picker.dart:32:10 • unused_field info • Unused import: 'package:weimob_cps/vendor/file.dart' • lib/widgets/settlement/image_compress.dart:2:8 • unused_import info • SizedBox for whitespace • lib/widgets/universal/biz/picture_picker_pannel.dart:32:16 • sized_box_for_whitespace info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: CustomToolTip.toolTipConfigs • lib/widgets/universal/biz/tool_tip.dart:15:7 • must_be_immutable info • Don't put any logic in createState • lib/widgets/universal/theme/app_bar/app_bar_search.dart:13:42 • no_logic_in_create_state info • The import of 'package:flutter/foundation.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/rendering.dart' • lib/widgets/universal/theme/collapse/animate_rotate.dart:1:8 • unnecessary_import info • A value for optional parameter 'outline' isn't ever given • lib/widgets/universal/theme/input_counter.dart:168:10 • unused_element info • Unused import: 'package:weimob_cps/vendor/wxsdk.dart' • lib/widgets/universal/theme/share_pane.dart:3:8 • unused_import info • Prefer declaring const constructors on `@immutable` classes • lib/widgets/universal/theme/share_pane.dart:7:3 • prefer_const_constructors_in_immutables info • SizedBox for whitespace • lib/widgets/universal/theme/share_pane.dart:17:13 • sized_box_for_whitespace info • The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart' • lib/widgets/user/income/balance_sec.dart:1:8 • unnecessary_import ``` ``` [✓] Flutter (Channel stable, 3.3.4, on macOS 12.2 21D49 darwin-arm (Rosetta), locale zh-Hans-CN) • Flutter version 3.3.4 on channel stable at /Users/majyo/documents/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision eb6d86ee27 (2 weeks ago), 2022-10-04 22:31:45 -0700 • Engine revision c08d7d5efc • Dart version 2.18.2 • DevTools version 2.15.0 • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn [!] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Users/majyo/Library/Android/sdk • Platform android-31, build-tools 30.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 13C100 • CocoaPods version 1.11.3 [✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 51.0.1 • Dart plugin version 193.7547 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [✓] VS Code (version 1.72.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.50.0 [✓] Connected device (2 available) • iPhone 12 (mobile) • 4EC01854-0334-44DE-8485-81F5F52E1DE1 • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 12.2 21D49 darwin-arm (Rosetta) [✓] HTTP Host Availability • All required HTTP hosts are available ```
imajyo commented 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 image

wecom-temp-46d7fbd31e63f02e8c99a6579879ec3a wecom-temp-7021105949f24e47823cf92d86ea51e6

huycozy commented 1 year ago

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!

stuartmorgan commented 1 year ago

This is a duplicate of https://github.com/flutter/flutter/issues/94591

github-actions[bot] commented 1 year ago

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.