Skip to content

[Android] App sometimes crashes after resuming activity. #10631

@PixsaOJ

Description

@PixsaOJ

Issue Description

When i lock my phone and activity pauses
It sometimes crashes after unlocking and resuming activity

Reproduction

No response

Relevant log output (if applicable)

[nativescript-platform-css] Injected classes: android,android400,screen400,xiaomim2007j20cg into Page
  RESUME
  System.err: An uncaught Exception occurred on "main" thread.
  System.err: Calling js method run failed
  System.err: TypeError: Cannot read properties of null (reading 'frame')
  System.err:
  System.err: StackTrace:
  System.err: setCurrent(file: app/webpack:/cnick/node_modules/.pnpm/@nativescript+core@8.8.2/node_modules/@nativescript/core/ui/frame/frame-common.js:209:0)
  System.err: 	at setCurrent(file: app/webpack:/cnick/node_modules/.pnpm/@nativescript+core@8.8.2/node_modules/@nativescript/core/ui/frame/index.android.js:283:0)
  System.err: 	at (file: app/webpack:/cnick/node_modules/.pnpm/@nativescript+core@8.8.2/node_modules/@nativescript/core/ui/frame/fragment.transitions.android.js:592:0)
  System.err: 	at invoke(file: app/webpack:/cnick/node_modules/.pnpm/@nativescript+core@8.8.2/node_modules/@nativescript/core/timer/index.android.js:22:0)
  System.err: 	at run(file: app/webpack:/cnick/node_modules/.pnpm/@nativescript+core@8.8.2/node_modules/@nativescript/core/timer/index.android.js:26:0)
  System.err: 	at com.tns.Runtime.callJSMethodNative(Native Method)
  System.err: 	at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1302)
  System.err: 	at com.tns.Runtime.callJSMethodImpl(Runtime.java:1188)
  System.err: 	at com.tns.Runtime.callJSMethod(Runtime.java:1175)
  System.err: 	at com.tns.Runtime.callJSMethod(Runtime.java:1153)
  System.err: 	at com.tns.Runtime.callJSMethod(Runtime.java:1149)
  System.err: 	at com.tns.gen.java.lang.Runnable.run(Runnable.java:17)
  System.err: 	at android.os.Handler.handleCallback(Handler.java:959)
  System.err: 	at android.os.Handler.dispatchMessage(Handler.java:100)
  System.err: 	at android.os.Looper.loopOnce(Looper.java:232)
  System.err: 	at android.os.Looper.loop(Looper.java:317)
  System.err: 	at android.app.ActivityThread.main(ActivityThread.java:8592)
  System.err: 	at java.lang.reflect.Method.invoke(Native Method)
  System.err: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
  System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)

Environment

OS: Linux Manjaro
CPU: REDACTED
node: 22.8.0
npm: 10.8.2
nativescript: Not Found ( it is in pnpm )

# android
java: javac 23
ndk: Not Found
apis: 26, 33, 33, 34
build_tools: 26.0.0, 30.0.3, 33.0.0, 33.0.2, 34.0.0, 35.0.0
system_images:
  - android-32 | Google APIs Intel x86_64 Atom
  - android-33 | Google Play Intel x86_64 Atom

# ios
xcode: Not Found
cocoapods: Not Found
python: 3.12.5
python3: 3.12.5
ruby: 3.2.5
platforms: Not Found

Dependencies

"dependencies": {
  "@dev4ndy/markdown": "^1.0.0",
  "@master.technology/permissions": "^2.0.1",
  "@nativescript-community/ui-drawer": "^0.1.28",
  "@nativescript-community/ui-image": "^4.5.3",
  "@nativescript-community/ui-material-bottomsheet": "^7.2.65",
  "@nativescript-community/ui-svg": "^0.2.6",
  "@nativescript-use/nativescript-orientation": "^0.0.3",
  "@nativescript-use/vue": "^0.0.44",
  "@nativescript/core": "~8.8.2",
  "@nativescript/firebase-core": "^3.3.2",
  "@nativescript/firebase-crashlytics": "^3.3.2",
  "@nativescript/imagepicker": "^4.1.0",
  "@nativescript/secure-storage": "^3.0.3",
  "@nativescript/theme": "~3.1.0",
  "@testjg/nativescript-nfc": "^1.1.3",
  "@triniwiz/nativescript-supabase": "2.0.0-rc.7",
  "@triniwiz/nativescript-toasty": "^4.1.3",
  "@vulksoft/nativescript-platform-css": "^1.6.16",
  "country-list": "^2.3.0",
  "ios-sdk-plugin": "file:ios-sdk-plugin",
  "lodash": "^4.17.21",
  "markdown-to-txt": "^2.0.1",
  "mitt": "^3.0.1",
  "nativescript-dark-mode": "^1.0.0",
  "nativescript-gif": "^5.0.0",
  "nativescript-intl": "^4.0.2",
  "nativescript-nfc-fix": "^5.1.0",
  "nativescript-vibrate": "^4.0.1",
  "nativescript-vue": "3.0.0-rc.2",
  "nativescript-windowed-modal": "^7.0.0",
  "pinia": "2.2.2",
  "postcss-loader": "^8.1.1",
  "router-vue-native": "^2.1.0",
  "sass-loader": "^16.0.2",
  "ts-loader": "^9.5.1",
  "tslib": "^2.7.0"
},
"devDependencies": {
  "@csstools/postcss-is-pseudo-class": "^5.0.0",
  "@nativescript-community/set-version": "^1.0.4",
  "@nativescript-dom/core-types": "^1.0.31",
  "@nativescript-dom/vue-types": "^1.0.16",
  "@nativescript/android": "~8.8.4",
  "@nativescript/eslint-plugin": "^0.0.4",
  "@nativescript/ios": "~8.8.2",
  "@nativescript/tailwind": "^2.1.0",
  "@nativescript/types": "^8.8.0",
  "@nativescript/webpack": "~5.0.22",
  "@types/lodash": "^4.17.9",
  "@types/node": "22.7.4",
  "@typescript-eslint/eslint-plugin": "^8.7.0",
  "@typescript-eslint/parser": "^8.7.0",
  "@vue/typescript-plugin": "^2.1.6",
  "eslint": "^9.11.1",
  "eslint-config-prettier": "^9.1.0",
  "eslint-plugin-prettier": "^5.2.1",
  "eslint-plugin-vue": "^9.28.0",
  "nativescript-custom-entitlements": "^0.2.0",
  "prettier": "^3.3.3",
  "tailwindcss": "^3.4.13",
  "typescript": "^5.6.2"
}

Please accept these terms

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-pending-triageReported bug, pending triage to confirm.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions