RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.02k stars 10.32k forks source link

test and update sandstorm app store to latest spk #2182

Closed stratospark closed 8 years ago

stratospark commented 8 years ago

Current app store version is 0.14.0. The latest listed on https://rocket.chat/releases is 0.17.0

I tried testing the the downloaded sdk by uploading it to my local Sandstorm server.

I got this error:

"Upload failed: 500 Internal Server Error 

Unpacking SPK failed; is it valid? 

After click around to other grains, the install screen suddenly showed up. I clicked install then started a new grain. It seems to be stuck here:

screen shot 2016-02-09 at 11 14 39 pm

If I click debug log, I see:

Exception in queued task: Error: [CustomOAuth: Options.serverURL is required and must be String]
    at CustomOAuth.configure (packages/rocketchat_custom-oauth/custom_oauth_server.coffee:28:21)
    at Object.RocketChat.models.Settings.find.observe.added (packages/rocketchat_github-enterprise/common.coffee:19:22)
    at [object Object].observeChangesCallbacks.added (packages/minimongo/observe.js:153:1)
    at self.applyChange.added (packages/minimongo/observe.js:53:1)
    at packages/mongo/observe_multiplex.js:183:1
    at Array.forEach (native)
    at Function._.each._.forEach (packages/underscore/underscore.js:105:1)
    at Object.task (packages/mongo/observe_multiplex.js:177:1)
    at [object Object]._.extend._run (packages/meteor/fiber_helpers.js:147:1)
    at packages/meteor/fiber_helpers.js:125:1
ufs: temp directory created at /tmp/ufs
configuring push
Using GridFS for Avatar storage
stream error Network error: wss://rocket.chat/websocket: getaddrinfo ENOTFOUND
stream error Network error: wss://rocket.chat/websocket: getaddrinfo ENOTFOUND
stream error Network error: wss://rocket.chat/websocket: getaddrinfo ENOTFOUND
➔ System ➔ startup
➔ +---------------------------------------+
➔ |             SERVER RUNNING            |
➔ +---------------------------------------+
➔ |                                       |
➔ |       Version: 0.17.0                 |
➔ |  Process Port: 8000                   |
➔ |      Site URL: http://127.0.0.1:8000  |
➔ |                                       |
➔ +---------------------------------------+
startStreamBroadcast
Exception in defer callback: Error: getaddrinfo ENOTFOUND
    at Object.Future.wait (/programs/server/node_modules/fibers/future.js:398:15)
    at Object.call (packages/meteor/helpers.js:119:1)
    at Object.HTTP.post (packages/http/httpcall_common.js:61:1)
    at generateStatistics (server/startup/cron.coffee:9:8)
    at server/startup/cron.coffee:15:3
    at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
    at packages/meteor/timers.js:6:1
    at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)
    - - - - -
    at errnoException (dns.js:37:11)
    at Object.onanswer [as oncomplete] (dns.js:124:16)
stream error Network error: wss://rocket.chat/websocket: getaddrinfo ENOTFOUND
paulproteus commented 8 years ago

As a random note:

It seems that this app is trying to make a websocket connection to the host at rocket.chat, but that will not work within the Sandstorm sandbox.

engelgabriel commented 8 years ago

It send an initial anonymous ping for our stats... but that should not brake in cae is fail, let's fix that. Also, you can turn this off via environment variable.

paulproteus commented 8 years ago

If you can turn it off via env variable, then perhaps the best thing is to set that env variable in .sandstorm/sandstorm-pkgdef.capnp so that the Sandstorm build uses the same code to disable it as everyone else!

stratospark commented 8 years ago

I tried "vagrant-spk dev" on my local machine with git checkout 0.16.0 and 0.17.0.

0.16.0 is working fine. 0.17.0 exhibits the same behavior as the downloaded release spk, stuck at "You must login" error.

engelgabriel commented 8 years ago

Can you guys try this one? https://rocket.chat/releases/develop/spk

stratospark commented 8 years ago

@engelgabriel This spk can be uploaded without the "Upload Failed" error. However, when starting a new grain, it still gets stuck at the "You must login screen"

engelgabriel commented 8 years ago

@stratospark anything on the logs? @rodrigok any ideas what may have changed last week to cause that?

stratospark commented 8 years ago

@engelgabriel

...** SANDSTORM SUPERVISOR: Starting up grain.
sandstorm/supervisor.c++:1156: warning: ip_tables kernel module not loaded; cannot set up transparent network forwarding.
** Starting Mongo...
2016-02-11T21:01:04.393+0000 I STORAGE  Engine custom option: log=(prealloc=false,file_max=200KB)
about to fork child process, waiting until server is ready for connections.
forked process: 6
child process started successfully, parent exiting
** Starting Meteor...
Updating process.env.MAIL_URL
Updating process.env.MAIL_URL
Exception in queued task: Error: [CustomOAuth: Options.serverURL is required and must be String]
    at CustomOAuth.configure (packages/rocketchat_custom-oauth/custom_oauth_server.coffee:28:21)
    at Object.RocketChat.models.Settings.find.observe.added (packages/rocketchat_github-enterprise/common.coffee:19:22)
    at [object Object].observeChangesCallbacks.added (packages/minimongo/observe.js:153:1)
    at self.applyChange.added (packages/minimongo/observe.js:53:1)
    at packages/mongo/observe_multiplex.js:183:1
    at Array.forEach (native)
    at Function._.each._.forEach (packages/underscore/underscore.js:105:1)
    at Object.task (packages/mongo/observe_multiplex.js:177:1)
    at [object Object]._.extend._run (packages/meteor/fiber_helpers.js:147:1)
    at packages/meteor/fiber_helpers.js:125:1
ufs: temp directory created at /tmp/ufs
configuring push
Using GridFS for Avatar storage
Updating login service CAS
➔ System ➔ startup
➔ +---------------------------------------+
➔ |             SERVER RUNNING            |
➔ +---------------------------------------+
➔ |                                       |
➔ |       Version: 0.17.0                 |
➔ |  Process Port: 8000                   |
➔ |      Site URL: http://127.0.0.1:8000  |
➔ |                                       |
➔ +---------------------------------------+
startStreamBroadcast
{"line":"71","file":"percolate_synced-cron.js","message":"SyncedCron: Scheduled \"Generate and save statistics\" next run @Thu Feb 11 2016 21:01:25 GMT+0000 (UTC)","time":{"$date":1455224485670},"level":"info"}
stratospark commented 8 years ago

I did git bisect between 0.16.0 and 0.17.0, then ran vagrant-spk dev on each commit. Here are the results:

git bisect start
# bad: [b2199a4df042b2503a2b38e34f1a05c1c36b8c42] version bump to 0.17.0
git bisect bad b2199a4df042b2503a2b38e34f1a05c1c36b8c42
# good: [546ad88ca071ac71f8d9d5508ab1954ff72cc54a] Fix auth shutdown to correct idle time (30 days)
git bisect good 546ad88ca071ac71f8d9d5508ab1954ff72cc54a
# bad: [486b1f66d2d3360e57517ee1cf25ec305419b603] Merge remote-tracking branch 'origin/develop' into improvements/logger
git bisect bad 486b1f66d2d3360e57517ee1cf25ec305419b603
# good: [e399653e6bd0d7fa053c82a8b8a3a2b52c7fae6e] Allow send hooks from a specific public channel
git bisect good e399653e6bd0d7fa053c82a8b8a3a2b52c7fae6e
# bad: [5a0af98e12970729b58385ef60afb2500b30d0e9] Add new logger types; Implement LoggerManager as an EventEmmiter; Filter logs by level; Improve log layout
git bisect bad 5a0af98e12970729b58385ef60afb2500b30d0e9
# bad: [04f013034a2c6bbf24a112097b29b97f2177aaad] Add some options to logger and use it in some places
git bisect bad 04f013034a2c6bbf24a112097b29b97f2177aaad
# bad: [6b8aed672537a227ef2ca46ec568a91f990c1273] Merge remote-tracking branch 'origin/develop' into improvements/logger
git bisect bad 6b8aed672537a227ef2ca46ec568a91f990c1273
# good: [83dc0b828ad4fc9f983c2fd7f64b13490e969a4e] Init the class Logger for server logging
git bisect good 83dc0b828ad4fc9f983c2fd7f64b13490e969a4e
# first bad commit: [6b8aed672537a227ef2ca46ec568a91f990c1273] Merge remote-tracking branch 'origin/develop' into improvements/logger
engelgabriel commented 8 years ago

Do you see any error on the browser's console?

stratospark commented 8 years ago

@engelgabriel Yes, here is the error for 6b8ae while it is stuck at a blank blue screen:

...** SANDSTORM SUPERVISOR: Starting up grain.
sandstorm/supervisor.c++:1156: warning: ip_tables kernel module not loaded; cannot set up transparent network forwarding.
** Starting Mongo...
2016-02-12T02:43:02.337+0000 I STORAGE  Engine custom option: log=(prealloc=false,file_max=200KB)
about to fork child process, waiting until server is ready for connections.
forked process: 6
child process started successfully, parent exiting
** Starting Meteor...
Updating process.env.MAIL_URL
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
Updating login service Accounts_OAuth_Google
Updating login service Accounts_OAuth_Google_id
Updating login service Accounts_OAuth_Google_secret
stop rendering 794
Updating login service Accounts_OAuth_Linkedin
Updating login service Accounts_OAuth_Linkedin_id
Updating login service Accounts_OAuth_Linkedin_secret
Updating login service Accounts_OAuth_Meteor
Updating login service Accounts_OAuth_Meteor_id
Updating login service Accounts_OAuth_Meteor_secret
Updating login service Accounts_OAuth_Twitter
Updating login service Accounts_OAuth_Twitter_id
Updating login service Accounts_OAuth_Twitter_secret
Exception in queued task: Error: [CustomOAuth: Options.serverURL is required and must be String]
    at CustomOAuth.configure (packages/rocketchat_custom-oauth/custom_oauth_server.coffee:28:21)
    at Object.RocketChat.models.Settings.find.observe.added (packages/rocketchat_github-enterprise/common.coffee:19:22)
    at [object Object].observeChangesCallbacks.added (packages/minimongo/observe.js:153:1)
    at self.applyChange.added (packages/minimongo/observe.js:53:1)
    at packages/mongo/observe_multiplex.js:183:1
    at Array.forEach (native)
    at Function._.each._.forEach (packages/underscore/underscore.js:105:1)
    at Object.task (packages/mongo/observe_multiplex.js:177:1)
    at [object Object]._.extend._run (packages/meteor/fiber_helpers.js:147:1)
    at packages/meteor/fiber_helpers.js:125:1
ufs: created tmpDir /tmp/ufs
stop rendering 639
Updating process.env.MAIL_URL
configuring push
Using GridFS for Avatar storage
stream error Network error: wss://rocket.chat/websocket: getaddrinfo ENOTFOUND
stream error Network error: wss://rocket.chat/websocket: getaddrinfo ENOTFOUND
stream error Network error: wss://rocket.chat/websocket: getaddrinfo ENOTFOUND
startStreamBroadcast
{"line":"71","file":"percolate_synced-cron.js","message":"SyncedCron: Scheduled \"Generate and save statistics\" next run @Fri Feb 12 2016 02:43:09 GMT+0000 (UTC)","time":{"$date":1455244989747},"level":"info"}
Updating login service Accounts_OAuth_Facebook
Updating login service Accounts_OAuth_Facebook_id
Updating login service Accounts_OAuth_Facebook_secret
Updating login service Accounts_OAuth_GitHub_Enterprise
Updating login service Accounts_OAuth_GitHub_Enterprise_id
Updating login service Accounts_OAuth_GitHub_Enterprise_secret
Updating login service Accounts_OAuth_Github
Updating login service Accounts_OAuth_Github_id
Updating login service Accounts_OAuth_Github_secret
Updating login service Accounts_OAuth_Gitlab
Updating login service Accounts_OAuth_Gitlab_id
Updating login service Accounts_OAuth_Gitlab_secret
Updating login service Accounts_OAuth_Google
Updating login service Accounts_OAuth_Google_id
Updating login service Accounts_OAuth_Google_secret
Updating login service Accounts_OAuth_Linkedin
Updating login service Accounts_OAuth_Linkedin_id
Updating login service Accounts_OAuth_Linkedin_secret
Updating login service Accounts_OAuth_Meteor
Updating login service Accounts_OAuth_Meteor_id
Updating login service Accounts_OAuth_Meteor_secret
Updating login service Accounts_OAuth_Twitter
Updating login service Accounts_OAuth_Twitter_id
Updating login service Accounts_OAuth_Twitter_secret
Updating login service Accounts_OAuth_Wordpress
Updating login service Accounts_OAuth_Wordpress_id
Updating login service Accounts_OAuth_Wordpress_secret
Updating login service SAML_Custom_default
stream error Network error: wss://rocket.chat/websocket: getaddrinfo ENOTFOUND
engelgabriel commented 8 years ago

I meant the BROWSER console.. please talk to me at https://demo.rocket.chat/direct/gabriel.engel

stratospark commented 8 years ago

Ok, here are the errors that I see in firefox:

screen shot 2016-02-11 at 7 10 26 pm

In chrome, that "unreachable code" error doesn't show up:

screen shot 2016-02-11 at 7 17 55 pm

engelgabriel commented 8 years ago

I've got this on my console:

Error: failed [500] Error: Email doesn't match the criteria. [403]
at AccountsServer.defaultValidateNewUserHook (accounts_server.js:1299:11)
at accounts_server.js:1242:11
at Array.forEach (native)
at Function._.each._.forEach (packages/underscore/underscore.js:105:1)
at AccountsServer.Ap.insertUserDoc (accounts_server.js:1241:5)
at AccountsServer.<anonymous> (server/lib/accounts.coffee:80:22)
at AccountsServer.insertUserDoc (packages/underscore/underscore.js:763:1)
at AccountsServer....
engelgabriel commented 8 years ago

fixed