Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS]UnimplementedError: createPlatformInAppWebViewWidget is not implemented on the current platform #2004

Closed
2 tasks done
wyqlxf opened this issue Jan 30, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@wyqlxf
Copy link

wyqlxf commented Jan 30, 2024

  • I have read the Getting Started section
  • I have already searched for the same problem

Environment

Technology Version
Flutter version 3.16.5
Plugin version ^6.0.0
Android version
iOS version
macOS version 10.14
Xcode version 15.0.1
Google Chrome version

Device information:

Description

When I run it on Android, I can open the web page normally, but I can't open the page on the macOS end.
When run on the macOS end, the following error log appears:

======== Exception caught by widgets library =======================================================
The following UnimplementedError was thrown building WebViewPage(dirty, state: _WebViewPageState#4d414):
createPlatformInAppWebViewWidget is not implemented on the current platform.

The relevant error-causing widget was: 
  WebViewPage WebViewPage:file:///Users/wyq/Desktop/FlutterProjects/flutter_demo/lib/route/route_handlers.dart:12:48
When the exception was thrown, this was the stack: 
#0      InAppWebViewPlatform.createPlatformInAppWebViewWidget (package:flutter_inappwebview_platform_interface/src/inappwebview_platform.dart:90:5)
#1      new PlatformInAppWebViewWidget (package:flutter_inappwebview_platform_interface/src/in_app_webview/platform_inappwebview_widget.dart:209:40)
#2      new InAppWebView.fromPlatformCreationParams (package:flutter_inappwebview/src/in_app_webview/in_app_webview.dart:28:33)
#3      new InAppWebView (package:flutter_inappwebview/src/in_app_webview/in_app_webview.dart:295:13)
#4      _WebViewPageState.build (package:flutter_demo/page/web/web_view_view.dart:55:11)
#5      StatefulElement.build (package:flutter/src/widgets/framework.dart:5583:27)
#6      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5471:15)
#7      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#8      Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#9      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5453:5)
#10     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5625:11)
#11     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5447:5)
...     Normal element mounting (220 frames)
#231    Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
#232    MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6871:36)
#233    Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
#234    Element.updateChildren (package:flutter/src/widgets/framework.dart:4024:32)
#235    MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6896:17)
#236    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#237    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#238    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#239    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#240    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#241    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#242    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#243    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#244    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#245    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#246    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#247    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#248    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#249    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:105:11)
#250    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#251    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#252    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#253    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#254    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#255    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#256    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#257    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#258    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#259    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:105:11)
#260    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#261    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#262    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#263    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#264    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#265    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#266    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#267    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#268    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#269    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#270    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#271    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6743:14)
#272    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#273    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6743:14)
#274    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#275    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#276    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#277    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#278    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#279    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#280    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#281    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#282    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#283    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#284    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#285    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#286    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2895:19)
#287    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:984:21)
#288    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:457:5)
#289    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1325:15)
#290    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1255:9)
#291    SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1113:5)
#292    _invoke (dart:ui/hooks.dart:312:13)
#293    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:383:5)
#294    _drawFrame (dart:ui/hooks.dart:283:31)
====================================================================================================

Expected behavior:
Web pages can be loaded on the macOS end.

Current behavior:
The web page cannot be loaded on the macOS end.

@wyqlxf wyqlxf added the bug Something isn't working label Jan 30, 2024
Copy link

👋 @wyqlxf

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!

@pichillilorenzo
Copy link
Owner

As the error says, InAppWebView it’s not currently implemented on macOS.
Follow #460 for info.

@Wonny-L
Copy link

Wonny-L commented Aug 9, 2024

@pichillilorenzo
In flutter 3.24, platformView on macOS is partially supported, including gesture support.
The pr for flutter macOS webview is waiting to be merged and will be supported in the next version.
i think, flutter_inappwebview is also available for macOS support now.

Copy link

github-actions bot commented Oct 3, 2024

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 and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants