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

Đang mở
#3,279 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

os: ios run to-be-checked
Ngôn ngữ chính
JavaScript
Star
1.1k
Fork
204
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
8

Mô tả

  1. Create project
  2. Change the xml to be invalid (e.g. "")
  3. 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện với một project có XML chứa một element không hợp lệ chẳng hạn như , sau đó chạy tns run iostns run android. Bắt đầu từ tns-core-modules/ui/builder/builder.js:196 và so sánh lỗi trong console với hành vi dự kiến của thiết bị; hoàn tất khi app không bị crash và thiết bị hiển thị nhãn lỗi màu đỏ phù hợp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android, ios, javascript
Lĩnh vực
cli, mobile-dev
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
32/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.