Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Livesync won't work if appId doesn't match - no warning/error #2825

Closed
ryanlangton opened this issue May 19, 2017 · 5 comments
Closed

Livesync won't work if appId doesn't match - no warning/error #2825

ryanlangton opened this issue May 19, 2017 · 5 comments
Assignees

Comments

@ryanlangton
Copy link

Did you verify this is a real problem by searching [Stack Overflow]

Yes

Tell us about the problem

If the nativescript ID in package.json does not match the applicationId in app.gradle, the application will launch and run normally, but will only refresh code changes by deleting the /platforms folder. Please at a minimum provide a warning to the developer with steps to fix, or prevent the app from launching.

Which platform(s) does your issue occur on?

Android

Please provide the following version numbers that your issue occurs with:

  • CLI: 3.0.1
  • Cross-platform modules: (check the 'version' attribute in the
    node_modules/tns-core-modules/package.json file in your project)
  • Runtime(s): 3.0.0
  • Plugin(s): 3.0.0

Please tell us how to recreate the issue in as much detail as possible.

Change the application Id in /App_Resources/android/app.gradle

android {
defaultConfig {
generatedDensities = []
applicationId = "{{appID1}}"

Change the application Id in package.json to something different.

"nativescript": {
"id": "{{appID2}}",

Launch the app using tns run android.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

See above

@ryanlangton
Copy link
Author

@bradmartin

@bradmartin
Copy link

I've been bitten before by this. Some reminder or warning would definitely help. I lost many hours fighting why livesync wouldn't work. Been a long time but a very unpleasant dev experience nonetheless. Hopefully it's not too much work to add a check to the values and inform the user.

@dtopuzov
Copy link
Contributor

We should at least show user friendly error.

@pkoleva pkoleva added this to the 3.2.0 milestone Jul 13, 2017
@dtopuzov dtopuzov reopened this Aug 7, 2017
@dtopuzov dtopuzov closed this as completed Aug 8, 2017
dtopuzov added a commit to NativeScript/nativescript-cli-tests that referenced this issue Aug 8, 2017
@dtopuzov
Copy link
Contributor

dtopuzov commented Jan 9, 2018

This issue is valid in 3.4.0

@dtopuzov dtopuzov reopened this Jan 9, 2018
@dtopuzov dtopuzov removed this from the 3.2.0 milestone Jan 9, 2018
@miroslavaivanova
Copy link
Contributor

This issue is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants