NativeScript / NativeScript/nativescript-cli

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

Aperta
#5,464 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
JavaScript
Stelle
1.1k
Fork
204
Merge medio
1g 9h
PR unite (30g)
8

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con il build_log.txt allegato e riproduci il problema usando ns build ios oppure ns run ios --device <DEVICE_ID>. Confronta l’output del linker nei casi con esito negativo e positivo intorno al percorso di TNSWidgets.framework e verifica l’impostazione aggiunta VALIDATE_WORKSPACE = YES; in build.xcconfig. Il lavoro è completato quando il fallimento intermittente del linker è stato identificato e impedito in tutte le architetture segnalate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
ios, javascript
Ambito
build-system, cli, mobile-dev
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.