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

Unable to start Analytics Broker process. (NativeScript CLI) #3182

Closed
MarkTechson opened this issue Oct 26, 2017 · 5 comments
Closed

Unable to start Analytics Broker process. (NativeScript CLI) #3182

MarkTechson opened this issue Oct 26, 2017 · 5 comments
Assignees
Milestone

Comments

@MarkTechson
Copy link

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

  • Yes

Tell us about the problem

Please, ensure your title is less than 63 characters long and starts with a capital
letter.
When running tns create or tns doctor I get the error: Unable to start Analytics Broker process. (NativeScript CLI)

Which platform(s) does your issue occur on?

iOS/Android/Both

  • WINDOWS

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

  • CLI: 3.3.0

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

When running commands for the NativeScript-cli, the following error shows up:

$ tns create testAppNS
Unable to start Analytics Broker process.
Failed to display command help Error: Unable to start Analytics Broker process.
    at Timeout.setTimeout (C:\Program Files (x86)\Nodist\bin\node_modules\nativescript\lib\services\analytics\analytics-service.js:124:28)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5)
Error while reporting exception: Error: Unable to start Analytics Broker process.

When running the analytics directly (which is what the code is trying to do) the following issue appears:

$ node "C:\Program Files (x86)\Nodist\bin\node_modules\nativescript\lib\services\analytics\analytics-service.js"
C:\Program Files (x86)\Nodist\bin\node_modules\nativescript\lib\services\analytics\analytics-service.js:185
$injector.register("analyticsService", AnalyticsService);
^

ReferenceError: $injector is not defined
    at Object.<anonymous> (C:\Program Files (x86)\Nodist\bin\node_modules\nativescript\lib\services\analytics\analytics-service.js:185:1)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3
@MarkTechson
Copy link
Author

MarkTechson commented Oct 27, 2017

Just to be sure this is an issue, I uninstalled node and did a fresh install of Node / NPM.

node: v7.2.1
npm: 4.0.5
Windows v10
tns 3.3.0

and the issue still persists.

@rosen-vladimirov rosen-vladimirov self-assigned this Oct 31, 2017
@MarkTechson
Copy link
Author

Update - since I didn't see this happening with anyone else, I figured it must be some local configuration. I was using nodist (installed by choco on Windows). I've now switched to a pure node install from the website and things seem to be working.

Thanks for looking into this and perhaps someone else may run into it and see how I was able to work around it.

@rosen-vladimirov
Copy link
Contributor

Hey @MarkTechson ,
Thanks for sharing the information - I'm sure it will be helpful in the future.

@rosen-vladimirov
Copy link
Contributor

rosen-vladimirov commented Nov 8, 2017

Btw we've introduced a fix in latest master - when analytics operations fail, CLI will no longer fail and it will continue working. It is introduced in this PR: #3197

@MarkTechson
Copy link
Author

@rosen-vladimirov thanks for taking this issue seriously! I appreciate that. This team is phenomenal!

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

No branches or pull requests

3 participants