NativeScript / NativeScript/nativescript-cli

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

Ouverte
#5,464 0 commentaires 2 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
JavaScript
Étoiles
1.1k
Forks
204
Merge moyen
1 j 9 h
PR mergées (30 j)
8

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par le build_log.txt joint et reproduisez le problème avec ns build ios ou ns run ios --device <DEVICE_ID>. Comparez la sortie de l’éditeur de liens des cas en échec et réussis autour du chemin de TNSWidgets.framework et examinez le paramètre ajouté VALIDATE_WORKSPACE = YES; dans build.xcconfig. Le travail est terminé lorsque l’échec intermittent de l’éditeur de liens a été identifié et empêché pour toutes les architectures signalées.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
ios, javascript
Domaine
build-system, cli, mobile-dev
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.