Skip to content

Hot reload on Android: TabBar tab visited for the first time after a C# edit never loads #3237

Open

Description

@kazo0

What

On Android (Mono, interpreter, Debug), a TabBar tab visited for the first time after a C# hot-reload edit never loads its page. Given_TabBar_HotReload is excluded from the mobile hot-reload lanes (#3238) until this is fixed.

The other findings below are tracked separately:

Measured locally on an API 36 emulator against a DevServer, with the #3235 fix applied.

Class All classes in one process Class alone, fresh process
Reactive.WinUI.Tests.Given_HotReload 14/14 14/14
Navigation.UI.Tests.Given_HotReload 7/7 7/7
Navigation.UI.Tests.Given_Navigation_HotReload 16/22 22/22
Navigation.UI.Tests.Given_TabBar_HotReload 2/23 13/23, then 7/23 on a rerun

Findings

1. Real Android bug: a tab visited for the first time after a C# hot reload never loads. In Given_TabBar_HotReload:

  • Passes: visit TabTwo, hot-reload, switch back.
  • Fails: hot-reload, then go to a tab not visited before. The tab's FrameView region exists but no page appears within 30s.

Tab 'TabTwo' did not populate a HotReloadTabContentPage within 30s. ContentGrid children: [FrameView[Region.Name='TabOne'], FrameView[Region.Name='TabTwo']]

These failed in both isolated runs:

  • When_SwitchTabAfterUpdate_Then_SelectedTabReflectsUpdate
  • When_UnvisitedTabVisitedAfterHR_Then_ShowsUpdatedContent
  • When_CycleThroughAllTabsAfterHR_Then_AllReflectUpdate
  • When_GatedTabUnlockedByHR_Then_TabContentLoads
  • When_XamlHRAddsTabThenCSharpHRAddsRoute_Then_NavigationWorks
  • When_TabBarAddedViaXamlHR_ThenCSharpHRInjectsRoute_Then_NewTabNavigable
  • When_RegionAttachedRemovedFromTabBarViaXamlHR_Then_ContentNotBlanked
  • When_TabBarItemRemovedViaXamlHR_Then_RemainingTabStillWorks
  • When_TabBarItemOrderSwappedViaXamlHR_Then_BothTabsNavigable
  • When_TabBarItemAddedRemovedReaddedViaXamlHR_Then_NavigationStillWorks

They all pass on Skia desktop (CoreCLR). Plain frame navigation to a new page after a hot reload works on Android (Navigation…Given_HotReload 7/7). So this looks specific to materializing a TabBar region for the first time after a delta.

2. (Handled elsewhere) Failures from edits piling up in one process. On desktop each class runs in its own secondary app. On mobile the lanes run every class in one process, so about 100 edits pile up. Running everything in one process is what produced:

  • the BadImageFormatException: type 0x00 not handled in do_mono_metadata_parse_type cascade (19 TabBar tests)
  • all 6 Given_Navigation_HotReload failures

Neither happens with the class run alone.

3. (Handled elsewhere, #3244) A failed revert leaves the source file edited. After the TabBar runs, Pages/HotReloadTabBarXamlPage.xaml still had a duplicated TabBarItem, so later XAML tests start from a modified file. That likely accounts for the rerun's extra XAML failures.

Work

  • Find why a never-visited tab region doesn't load after a C# delta on Android, and fix it in Navigation (or upstream).
  • Add Given_TabBar_HotReload to the mobile lanes' AndroidTestFilters / IosTestFilters. iOS hasn't been measured for this class yet.

Reproducing locally

See the "Mobile lanes" note in AGENTS.md. An Android app built on Windows needs the RuntimeTestsSourceProjectAttribute path rewritten with /, or every relative-path edit times out.

Activity

  1. added
    area/build
    kind/bug
    on Oct 14, 2026
  2. changed the title [-]Hot-reload runtime tests failing on Android (Mono): Given_TabBar_HotReload, Given_Navigation_HotReload[/-] [+]Hot reload on Android: unvisited TabBar tab doesn't load after a C# delta; mobile HR tests need per-class isolation[/+] on Oct 14, 2026
  3. changed the title [-]Hot reload on Android: unvisited TabBar tab doesn't load after a C# delta; mobile HR tests need per-class isolation[/-] [+]Hot reload on Android: TabBar tab visited for the first time after a C# edit never loads[/+] on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/buildarea/navigationkind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions