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

Error in emulator when opening the second display #23

Open
joranmulderij opened this issue Mar 16, 2022 · 3 comments
Open

Error in emulator when opening the second display #23

joranmulderij opened this issue Mar 16, 2022 · 3 comments

Comments

@joranmulderij
Copy link

joranmulderij commented Mar 16, 2022

I got this error:

E/flutter ( 4259): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
E/flutter ( 4259): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177:18)
E/flutter ( 4259): <asynchronous suspension> 

when running on an android emulator. I tested multiple emulator devices, but they all gave the same error.

To Reproduce
Steps to reproduce the behavior:

  1. Run Pixel C api 30 android emulator
  2. Add a second display.
  3. Launch the example app
  4. Click "Get Displays"
  5. Put the ID for the second display into the textbox
  6. Click show presentation
  7. Look at the console

Expected behavior
The second display should show something.

Smartphone:

  • Device: Pixel C
  • OS: Android api 30
@fbernaly
Copy link
Contributor

fbernaly commented Mar 28, 2022

I am getting the exact same Exception:

I/ContentValues( 2962): Channel: method: showPresentation | arguments: {"displayId": 2,"routerName": "presentation"}
I/ContentValues( 2962): Channel: method: showPresentation | displayId: 2 | routerName: presentation
E/flutter ( 2962): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(showPresentation, Unable to add window android.view.ViewRootImpl$W@379a897 -- the specified display can not be found, null, null)
E/flutter ( 2962): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
E/flutter ( 2962): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177:18)
E/flutter ( 2962): <asynchronous suspension>

Emulator
Pixel 3
API 31

@fbernaly
Copy link
Contributor

So far, when I use the emulator is not working, but when I use an actual Android device and Chromecast as my secondary display it works. Same for iOS, in case of iPad I can use an HDMI cable or AppleTV. On iPhone I tested AppleTV and it works, I was not able to test cable, because I do not have a lighting to HDMI adapter.
So far that is what I am trying to do, and this does not represent an issue for me anymore.

@joranmulderij
Copy link
Author

Oh that is good to know. I do think it also needs to work on an emulator, and the issue does also seem to be android specific. Thanks for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants