NativeScript / NativeScript/nativescript-cli

Intermittent build issues: "ld: can't open file, errno=13 file TNSWidgets" for architecture

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

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

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ả

Environment
Using VueJS

  • CLI: 7.0.12
  • Cross-platform modules:
  • Android Runtime: X - not installed we do not have to worry about this
  • iOS Runtime: 7.0.6
  • XCode Version: 12.2 (Was on 12.3 but downgraded and still saw issues)
  • Plugin(s): nativescript-custom-entitlements and a custom internal one that doesn't add any npm dependencies it's just a company managed CocoaPod.

Describe the bug
Build/Rebuild timeframe (Xcode experiences the same issue when executing a build). It happens when we are debugging it against the device and the app recompiles. I have seen this error for architecture arm64 or x86_64.

I keep getting variations of the following (with different architecture)

ld: can't open file, errno=13 file '<path_to_project>/node_modules/@nativescript/core/platforms/ios/TNSWidgets.framework/TNSWidgets' for architecture <architecture>
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I see this when it's working (if that helps):

ld: warning: dylib (<path_to_project>/node_modules/@nativescript/core/platforms/ios/TNSWidgets.framework/TNSWidgets) was built for newer iOS version (9.2) than being linked (9.0)

Here is the verbose output when running build.
build_log.txt

Sometimes cleaning and rebuilding causes it to go away but it will then randomly show up again when the app re-builds during an ns run ios --device <DEVICE_ID>.

To Reproduce

  • ns build ios

It also appears intermittently when running:

  • ns run ios --device <DEVICE_ID>

Expected behavior

Shouldn't crash/fail intermittently. This seemed to have randomly started up mid last week.

Sample project
Just a base VueJS project that is taking advantage of the WebView. The only downside is I'm using an internal CocoaPod that is managed by another team at my company. Though this shouldn't be the primary issue.

Additional context
I've followed some of the bug tickets and most conclude to use Xcode 12.2 (I was on 12.3 and downgraded but still experienced the issue).

I also added VALIDATE_WORKSPACE = YES; to my build.xcconfig

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

Bắt đầu với build_log.txt đính kèm và tái hiện bằng ns build ios hoặc ns run ios --device <DEVICE_ID>. So sánh đầu ra của linker giữa trường hợp thất bại và thành công xung quanh đường dẫn TNSWidgets.framework, đồng thời xem xét thiết lập VALIDATE_WORKSPACE = YES; đã được thêm vào build.xcconfig. Hoàn thành khi đã xác định và ngăn chặn lỗi linker không liên tục trên tất cả các kiến trúc được báo cáo.

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

Đánh giá

Công nghệ
ios, javascript
Lĩnh vực
build-system, cli, mobile-dev
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/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.