NativeScript / NativeScript/nativescript-cli
Intermittent build issues: "ld: can't open file, errno=13 file TNSWidgets" for architecture
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 1.1k
- フォーク
- 204
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 8
説明
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-entitlementsand a custom internal one that doesn't add anynpmdependencies 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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
添付の build_log.txt から始め、ns build ios または ns run ios --device <DEVICE_ID> を使って再現します。TNSWidgets.framework のパス周辺について、失敗した場合と成功した場合のリンカー出力を比較し、build.xcconfig に追加された設定 VALIDATE_WORKSPACE = YES; を確認します。報告されたすべてのアーキテクチャで断続的に発生するリンカー障害を特定して防止できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- ios, javascript
- 領域
- build-system, cli, mobile-dev
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100