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

Unexpected platform view context. When constructing a platform view in the factory, use the context from PlatformViewFactory#create, #53

Open
Reagon opened this issue Jul 23, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@Reagon
Copy link

Reagon commented Jul 23, 2022

E/flutter: [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Unexpected platform view context. When constructing a platform view in the factory, use the context from PlatformViewFactory#create, view id: 1
at io.flutter.plugin.platform.SingleViewPresentation.onCreate(SingleViewPresentation.java:187)
at android.app.Dialog.dispatchOnCreate(Dialog.java:433)
at android.app.Dialog.show(Dialog.java:327)
at android.app.Presentation.show(Presentation.java:279)
at io.flutter.plugin.platform.VirtualDisplayController.(VirtualDisplayController.java:119)
at io.flutter.plugin.platform.VirtualDisplayController.create(VirtualDisplayController.java:64)
at io.flutter.plugin.platform.PlatformViewsController$1.createForTextureLayer(PlatformViewsController.java:267)
at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:122)
at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:321)
at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$2j2MERcK825A5j1fv5sZ7xB2Iuo.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8105)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)
, null, null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:296:18)

#2 TextureAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1125:18)

#3 AndroidViewController.create (package:flutter/src/services/platform_views.dart:773:5)

#4 RenderAndroidView._sizePlatformView (package:flutter/src/rendering/platform_view.dart:183:9)

@Reagon Reagon added the bug Something isn't working label Jul 23, 2022
@Terterola
Copy link

Hi, having the same problem here. Any solution?

@WenjieZhengJerry
Copy link

Hi, have you solved this problem?

@massimilianochiodi
Copy link

Hi, having the same problem here. Any solution?

@JP3871
Copy link

JP3871 commented Sep 3, 2022

Hi, downgrade Flutter to 3.0.5: works fine

@massimilianochiodi
Copy link

massimilianochiodi commented Sep 3, 2022 via email

@stepanzalis
Copy link

I have the same issue with version 3.3.0, downgrading to 3.0.5 works just fine.

@teewhydope
Copy link

teewhydope commented Sep 13, 2022

this fork looks promising https://github.com/xiaoxie/flutter_scan. works for me on the latest version of flutter

@stepanzalis @Terterola @Reagon @WenjieZhengJerry @

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants