Skip to content

iOS Simulator Crash on HMR updates #10361

Closed
@orbiteleven

Description

@orbiteleven

Issue Description

I have a fresh install of Nativescript+Svelte, per https://svelte-native.technology/docs#quick-start. I have built and started the app. This successfully opens on my iOS Simulator. However, on the first and ever other code update, the app on the simulator crashes

Reproduction

ns create myapp --svelte
cd myapp
ns build ios
ns run ios

Make an update to app/components/Home.svelte.

Relevant log output (if applicable)

Refreshing application on device <device>...
  [HMR:Svelte] Up to date
  [HMR][93bc504aef60789ba4ce] success | Successfully applied update.
  ***** Fatal JavaScript exception - application has been terminated. *****
  NativeScript encountered a fatal error: Uncaught Error: View not added to this instance. View: Page(2) CurrentParent: undefined ExpectedParent: Frame(1)
  at
  _removeView(file: app/webpack:/myapp/node_modules/@nativescript/core/ui/core/view-base/index.js:583:0)
  at _removeEntry(file: app/webpack:/myapp/node_modules/@nativescript/core/ui/frame/frame-common.js:168:0)
  at _updateBackstack(file: app/webpack:/myapp/node_modules/@nativescript/core/ui/frame/frame-common.js:246:0)
  at setCurrent(file: app/webpack:/myapp/node_modules/@nativescript/core/ui/frame/index.ios.js:46:0)
  at UIViewControllerImpl.viewDidAppear(file: app/webpack:/myapp/node_modules/@nativescript/core/ui/page/index.ios.js:156:0)
Successfully synced application org.nativescript.myapp on device <device>

Environment

OS: macOS 13.4.1
CPU: (8) arm64 Apple M1
Shell: /opt/homebrew/bin/fish
node: 16.16.0
npm: 8.11.0
nativescript: 8.5.3

# android
java: javac 18
ndk: Not Found
apis: Not Found
build_tools: Not Found
system_images: Not Found

# ios
xcode: 14.3.1/14E300c
cocoapods: 1.11.3
python: 3.11.2
python3: 3.11.2
ruby: 3.1.2
platforms: 
  - DriverKit 22.4
  - iOS 16.4
  - macOS 13.3
  - tvOS 16.4
  - watchOS 9.4

Dependencies

"dependencies": {
  "@nativescript/core": "~8.5.0",
  "@nativescript/theme": "~3.0.2",
  "svelte-native": "~1.0.0"
},
"devDependencies": {
  "@nativescript/ios": "8.5.2",
  "@nativescript/preview-cli": "1.0.5",
  "@nativescript/types": "~8.5.0",
  "@nativescript/webpack": "~5.0.14",
  "svelte": "~3.44.0",
  "svelte-loader": "^3.1.2",
  "svelte-native-preprocessor": "^1.0.0",
  "svelte-preprocess": "^4.7.0",
  "typescript": "~4.8.4"
}

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy