maui: [Android] Pushing TabbedPage from Shell-based ContentPage causes NRE.

Description

https://github.com/dotnet/maui/pull/6390 added a user-friendly exception messages when using TabbedPags, however, I’m getting

Microsoft.Maui.Platform.ToPlatformException: 'Microsoft.Maui.Handlers.TabbedViewHandler found for AddTimetablePage is incompatible'

image

Steps to Reproduce

Open a TabbedPage from a ContentPage on Android

Version with bug

6.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 12

Did you find any workaround?

No response

Relevant log output

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 2
  • Comments: 21 (13 by maintainers)

Most upvoted comments

@PureWeen I just ran into this issue. It is very easy to reproduce and I would love to get this looked at even with a workaround.

I have an app with A shell with 2 flyout items.

I want to navigate from one flyout item to another page that just so happens to be a TabbedPage. It throws an exception.

Here is a repo sample. Go to page 2 in the flyout and navigate and boom.

https://github.com/jamesmontemagno/MauiApp8

Java.Lang.IllegalArgumentException: 'No view found for id 0x7f080144 (com.companyname.mauiapp8:id/navigationlayout_toptabs) for fragment ViewFragment{585154} (37fae646-12d5-430e-bdd6-1d2694fdeac2 id=0x7f080144)'

If I do platform specifics and put bottom tabs i also get an exception:

Java.Lang.IllegalArgumentException: 'No view found for id 0x7f080142 (com.companyname.mauiapp8:id/navigationlayout_bottomtabs) for fragment ViewFragment{9f2c840} (29c3819a-2bed-48c8-86de-42ef3f890ffd id=0x7f080142)'

We’ve added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.