NativeScript / NativeScript/nativescript-cli
If you have invalid xml and run tns run ios or android the app will crash and an error will be shown
Open
Nobody has claimed this yet.
os: ios
run
to-be-checked
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 204
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 8
Description
- Create project
- Change the xml to be invalid (e.g. "")
- Run "tns run ios" or "tns run android"
Actual: The app will crash and an error will be shown in console
1 0x109ad6d4b NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
2 0x10a17a28e ffi_closure_unix64_inner
3 0x10a17abd2 ffi_closure_unix64
4 0x10aea03c3 -[UIViewController __viewWillAppear😏
5 0x10aea1b12 -[UIViewController viewWillMoveToWindow😏
6 0x10ada56d2 -[UIView(Hierarchy) _willMoveToWindow:withAncestorView😏
7 0x10adb6442 -[UIView(Internal) _addSubview:positioned:relativeTo😏
8 0x10ada4cf8 -[UIView(Hierarchy) addSubview😏
9 0x10ad62c6f -[UIWindow addRootViewControllerViewIfPossible]
10 0x10ad63070 -[UIWindow _setHidden:forced😏
11 0x10ad75ebe -[UIWindow makeKeyAndVisible]
12 0x10a17aa2d ffi_call_unix64
13 0x12799e490
file:///app/tns_modules/tns-core-modules/ui/builder/builder.js:196:56: JS ERROR Error: Building UI from XML. @file:///app/home/home-page.xml:13:5"
Expected: App not to crash and the red label on the device to be shown with the proper text
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce with a project whose XML contains an invalid element such as , then run tns run ios and tns run android. Start at tns-core-modules/ui/builder/builder.js:196 and compare the console error with the expected device behavior; done means the app does not crash and the device shows the proper red error label.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, ios, javascript
- Domain
- cli, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100