Skip to content

[web] unregistered_view_type PlatformException after removing/adding view with platform views #142094

@ditman

Description

@ditman

Steps to reproduce

  1. Write a multi-view app that contains platform views
  2. Add a view
  3. Remove a view
  4. Add a view

Expected results

Everything works swimmingly

Actual results

The following uncaught exception bubbles up:

Uncaught (in promise) Error: PlatformException(unregistered_view_type, A HtmlElementView widget is trying to create a platform view with an unregistered type: <_default_document_create_element_invisible>., If you are the author of the PlatformView, make sure `registerViewFactory` is invoked., null)
    at Object.throw_ [as throw] (errors.dart:297:3)
    at StandardMethodCodec.decodeEnvelope (message_codecs.dart:651:7)
    at MethodChannel._invokeMethod (platform_channel.dart:334:18)
    at _invokeMethod.next (<anonymous>)
    at async_patch.dart:45:50
    at _RootZone.runUnary (zone.dart:1661:54)
    at _FutureListener.thenAwait.handleValue (future_impl.dart:162:18)
    at handleValueCallback (future_impl.dart:838:44)
    at _Future._propagateToListeners (future_impl.dart:867:13)
    at [_completeWithValue] (future_impl.dart:643:5)
    at async._AsyncCallbackEntry.new.callback (future_impl.dart:713:7)
    at Object._microtaskLoop (schedule_microtask.dart:40:11)
    at _startMicrotaskLoop (schedule_microtask.dart:49:5)
    at async_patch.dart:181:7

Code sample

n/a

Screenshots or Video

n/a

Logs

n/a

Flutter Doctor output

n/a

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsengineflutter/engine related. See also e: labels.platform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions