NativeScript / NativeScript/plugins

[@nativescript/localize] Exception thrown when changing translations

Ouverte
#33 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
TypeScript
Étoiles
206
Forks
123
Merge moyen
2 j 1 h
PR mergées (30 j)
1

Description

Environment

  • CLI: 7.0.10
  • Cross-platform modules: 7.0.12
  • Android Runtime: 7.0.1
  • iOS Runtime:
  • Plugin(s):

Describe the bug
Sometimes, when I add a new translation to localize plugin's language file (en.default.json), this error shows up:

System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.\nIf using typescript make sure your entry point file is transpiled to javascript.
System.err:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4567)
System.err:     at android.app.ActivityThread.access$1500(ActivityThread.java:151)
System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)
System.err:     at android.os.Handler.dispatchMessage(Handler.java:110)
System.err:     at android.os.Looper.loop(Looper.java:193)
System.err:     at android.app.ActivityThread.main(ActivityThread.java:5322)
System.err:     at java.lang.reflect.Method.invokeNative(Native Method)
System.err:     at java.lang.reflect.Method.invoke(Method.java:515)
System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)
System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)
System.err:     at dalvik.system.NativeStart.main(Native Method)
System.err: Caused by: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.\nIf using typescript make sure your entry point file is transpiled to javascript.
System.err:     at com.tns.Module.bootstrapApp(Module.java:316)
System.err:     at com.tns.Runtime.run(Runtime.java:680)
System.err:     at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err:     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
System.err:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4564)
System.err:     ... 10 more
System.err: Caused by: com.tns.NativeScriptException: Failed to find module: "./", relative to: app//
System.err:     at com.tns.Module.resolvePathHelper(Module.java:151)
System.err:     at com.tns.Module.bootstrapApp(Module.java:314)
System.err:     ... 14 more
System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.\nIf using typescript make sure your entry point file is transpiled to javascript.
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.\nIf using typescript make sure your entry point file is transpiled to javascript.
System.err:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4567)
System.err:     at android.app.ActivityThread.access$1500(ActivityThread.java:151)
System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)
System.err:     at android.os.Handler.dispatchMessage(Handler.java:110)
System.err:     at android.os.Looper.loop(Looper.java:193)
System.err:     at android.app.ActivityThread.main(ActivityThread.java:5322)
System.err:     at java.lang.reflect.Method.invokeNative(Native Method)
System.err:     at java.lang.reflect.Method.invoke(Method.java:515)
System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)
System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)
System.err:     at dalvik.system.NativeStart.main(Native Method)
System.err: Caused by: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.\nIf using typescript make sure your entry point file is transpiled to javascript.
System.err:     at com.tns.Module.bootstrapApp(Module.java:316)
System.err:     at com.tns.Runtime.run(Runtime.java:680)
System.err:     at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err:     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
System.err:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4564)
System.err:     ... 10 more
System.err: Caused by: com.tns.NativeScriptException: Failed to find module: "./", relative to: app//
System.err:     at com.tns.Module.resolvePathHelper(Module.java:151)
System.err:     at com.tns.Module.bootstrapApp(Module.java:314)
System.err:     ... 14 more

In order to get rid of it, I usually have to build my app once more.

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 reproduire l’échec après avoir ajouté une traduction au fichier en.default.json du plugin localize, puis inspectez le chemin de démarrage Android du plugin autour des erreurs d’entry-point et de module-resolution signalées. Comparez une exécution qui échoue avec une exécution qui réussit après une nouvelle compilation. Le travail est terminé lorsque la modification des traductions ne provoque plus l’exception d’application entry-point et ne nécessite plus de compilation supplémentaire.

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

Évaluation

Stack technique
javascript, typescript
Domaine
internationalization, mobile-dev
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

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