4commerce-technologies-AG / meteor

This is a fork of Meteor.js to support not yet official enabled architectures with an universal bundler. Meteor is an ultra-simple, database-everywhere, data-on-the-wire, pure-Javascript web framework. Read additional information about this fork at:
http://meteor-universal.tumblr.com/
Other
195 stars 16 forks source link

Failed to record package usage #46

Closed hellzakk closed 8 years ago

hellzakk commented 8 years ago

@TomFreudenberg

Hi, when i run my project offline i got this error:

=> App running at: http://localhost:3000/
Failed to record package usage.
(This error is hidden when you are not running Meteor from a checkout.)
Error: Network error: wss://activity.meteor.com/websocket: getaddrinfo ENOTFOUND
    at Object.Future.wait (/home/pi/meteor/dev_bundle/lib/node_modules/fibers/future.js:398:15)
    at new ServiceConnection (/tools/meteor-services/service-connection.js:85:17)
    at connectToPackagesStatsServer (/tools/meteor-services/stats.js:150:10)
    at /tools/meteor-services/stats.js:69:18
    - - - - -
    at packages/ddp-client/stream_client_nodejs.js:182:1
    at packages/ddp-client/stream_client_nodejs.js:172:1
    at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)

=> Meteor server restartedFailed to record package usage.

If i connect the rasp to internet and restart the project, it run without any error.

TomFreudenberg commented 8 years ago

The things are located at

https://github.com/meteor/meteor/search?utf8=%E2%9C%93&q=optionsForAppRunner

so it would be interesting to know, where best to set

optionsForAppRunner.recordPackageUsage = false;

@glasser @benjamn @martijnwalraven ::

Do you have any suggestion how best to proceed to prevent running recordPackageUsage even when using checkout but offline?

I was thinking about a PR and allow some additional env var like

export RECORD_PACKAGE_USAGE=0

Thanks for some short feedback Tom

hellzakk commented 8 years ago

@TomFreudenberg

in ../meteor/tools/runners/run-app.js

self.recordPckageUsage = options.recordPackageUsage === undefined ? true : options.recordPackageUsage;

to

self.recordPckageUsage = options.recordPackageUsage === undefined ? false : options.recordPackageUsage;

error disappeared, but recordPackageUsage is disabled for all the project so if needed must be set to true.

TomFreudenberg commented 8 years ago

Hi @hellzakk

I am not sure yet when (and from which code line) the setting is FALSE when using the official installer. Maybe it is the same issue?

@benjamn could you assist please?

glasser commented 8 years ago

If you add the package-stats-opt-out package to your app, then meteor will not attempt to contact the activity server.

TomFreudenberg commented 8 years ago

Hi David ( @glasser )

thanks for that hint, better than any hack :-)

Cheers Tom

TomFreudenberg commented 8 years ago

As guided by David,

you have to add

meteor add package-stats-opt-out

to stop collecting stats for packages.

When looking at the stats.js file you see the declaration for the check at

https://github.com/meteor/meteor/blob/abd574f38008b45f5e2a6bc322b10bcdde44763a/tools/meteor-services/stats.js#L11-L13

and finally this is used and checked at

https://github.com/meteor/meteor/blob/abd574f38008b45f5e2a6bc322b10bcdde44763a/tools/meteor-services/stats.js#L40-L49

to prevent the stats to collect