GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Android] App with no main entry shows a blank screen when reopened right after Back · Issue #11631 · NativeScript/NativeScript

[Android] App with no main entry shows a blank screen when reopened right after Back #11631

New issue
Copy link
New issue
Copy link
Open
Open
[Android] App with no main entry shows a blank screen when reopened right after Back#11631
Copy link

Description

@herefishyfish
herefishyfish
opened on Nov 10, 2026
Issue body actions

Issue Description

Runtime bug on Android. An app that supplies its root view from the launch event, with no main entry, shows a blank screen when it is reopened right after the user leaves with Back.

Android starts the new activity before the old one is destroyed. exit has not fired yet, so launch does not fire for the new activity. With no main entry and no launch, nothing supplies a root view, and the new activity stays empty.

This is the shape Angular apps use by default, so it may explain blank screens I have seen in Angular apps. I have not confirmed that in a real Angular app.

Expected behavior: the reopened app shows its page.

Related:

  • [Android] Blank screen when a new activity adopts a shared root view before the old one stops #11615 and fix(android): keep the root view when an activity replaces another #11624 cover the same timing for apps that reuse one root view. fix(android): keep the root view when an activity replaces another #11624 does not fix this case.
  • [Android] After exiting with Back, reopening the app in the same process never fires launch again (9.1 regression, Angular apps stay dead and unstyled) #11572 and fix(core): fire launch again for the first window after exit #11573 cover a reopen after exit has fired. This case happens before exit.
  • Pressing Back on a window with no root view crashes with TypeError: Cannot read properties of undefined (reading 'notify') in onBackPressed. I reproduced that crash on a second activity started with -f 0x08000000.

Reproduction

Use apps/toolbox from this repository and replace src/main.ts:

import { Application, Frame } from '@nativescript/core';

Application.on(Application.launchEvent, (args: any) => {
  const root = new Frame();
  root.navigate({ moduleName: 'main-page' });
  args.root = root;
});

Application.run();
  1. Build the app with ns build android, install it, and wait for the main page.

  2. Press Back and reopen at once:

    adb shell "input keyevent KEYCODE_BACK; am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -n org.nativescript.ToolBox/com.tns.NativeScriptActivity"
  3. The screen stays blank.

This gave a blank screen in 5 of 5 trials. The app stayed in focus and did not crash.

Relevant log output (if applicable)

Android event log for one trial. The new activity is created and started before the old one stops:

wm_on_create_called:  [77903689, com.tns.NativeScriptActivity]
wm_on_start_called:   [77903689, com.tns.NativeScriptActivity]
wm_on_stop_called:    [253142999, com.tns.NativeScriptActivity]
wm_on_destroy_called: [253142999, com.tns.NativeScriptActivity]

Environment

  • @nativescript/core: built from main at 07e84ec58 (9.1.4-next.4)
  • @nativescript/android: 9.1.1
  • Device: Android emulator, API 36, x86_64
  • OS: Windows 11

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.