nightscout / cgm-remote-monitor

nightscout web monitor
GNU Affero General Public License v3.0
2.4k stars 71.67k forks source link

Loading the client.... #3560

Closed brutevinch closed 6 years ago

brutevinch commented 6 years ago

Trying to install and start last master build on debian. After starting i have logo on black screen "loading the client" Version 0.9 on the same system is working fine.


/opt/ns_1(master*) # npm start                                                                                                                         root@cgm

> Nightscout@0.10.2-release-20171201 start /opt/ns_1
> node server.js

disabling [ 'simplealarms' ]
Setting up new connection to MongoDB
the server/replset/mongos options are deprecated, all their options are supported at the top level of the options object [poolSize,ssl,sslValidate,sslCA,sslCert,sslKey,sslPass,sslCRL,autoReconnect,noDelay,keepAlive,connectTimeoutMS,family,socketTimeoutMS,reconnectTries,reconnectInterval,ha,haInterval,replicaSet,secondaryAcceptableLatencyMS,acceptableLatencyMS,connectWithNoPrimary,authSource,w,wtimeout,j,forceServerObjectId,serializeFunctions,ignoreUndefined,raw,bufferMaxEntries,readPreference,pkFactory,promiseLibrary,readConcern,maxStalenessSeconds,loggerLevel,logger,promoteValues,promoteBuffers,promoteLongs,domainsEnabled,keepAliveInitialDelay,checkServerIdentity,validateOptions,appname,auth]
GIT HEAD 52e1ff0
Successfully established a connected to MongoDB
Mongo Storage system ready
Pushover was NOT configured
Ensuring indexes
ensuring index for: date
ensuring index for: type
ensuring index for: sgv
ensuring index for: mbg
ensuring index for: sysTime
ensuring index for: dateString
ensuring index for: created_at
ensuring index for: eventType
ensuring index for: insulin
ensuring index for: carbs
ensuring index for: glucose
ensuring index for: enteredBy
ensuring index for: boluscalc.foods._id
ensuring index for: notes
ensuring index for: NSCLIENT_ID
ensuring index for: percent
ensuring index for: absolute
ensuring index for: duration
ensuring index for: created_at
ensuring index for: NSCLIENT_ID
ensuring index for: startDate
ensuring index for: type
ensuring index for: position
ensuring index for: hidden
Dexcom bridge not enabled
MiniMed Connect not enabled
tick 2018-05-08T12:52:48.641Z
enabling feature: rawbg
enabling feature: basal
enabling feature: bwp
enabling feature: careportal
enabling feature: cage
enabling feature: iob
enabling feature: cob
enabling feature: boluscalc
enabling feature: iage
enabling feature: treatmentnotify
enabling feature: bgnow
enabling feature: delta
enabling feature: direction
enabling feature: timeago
enabling feature: devicestatus
enabling feature: upbat
enabling feature: errorcodes
enabling feature: profile
enabling feature: ar2
body-parser deprecated bodyParser: use individual json/urlencoded middlewares lib/api/treatments/index.js:12:19
body-parser deprecated undefined extended: provide extended option node_modules/body-parser/index.js:105:29
body-parser deprecated bodyParser: use individual json/urlencoded middlewares app.js:93:24
Production environment detected, enabling Minify
Прослушивание порта 1337 null
searching treatments q { find: { created_at: { '$gte': '2018-04-30T12:52:49.643Z' } },
  sort: { created_at: 1 } }
Load Complete:
     sgvs:488, treatments:4, mbgs:4, cals:4, profiles:1, devicestatus:535, sensorTreatments:4
WS: running websocket.update
GRANTED:  ::ffff:195.208.179.23 no-token api:entries:read default
GRANTED:  ::ffff:195.208.179.23 no-token api:entries:read default
WS: Connection from client ID:  bJ8fNIwYB0W9qZ9LAAAA  IP:  ::ffff:145.255.3.93
results.first size 75300 bytes
results.rest size 1270 bytes
WS: Authetication ID:  bJ8fNIwYB0W9qZ9LAAAA  client:  web  history: 48
WS: emitted clear_alarm to all clients
GRANTED:  ::ffff:195.208.179.23 no-token api:entries:read default
GRANTED:  ::ffff:195.208.179.23 no-token api:treatments:read default
GRANTED:  ::ffff:145.255.3.93 no-token api:entries:read default
GRANTED:  ::ffff:145.255.3.93 no-token api:treatments:read default
GRANTED:  ::ffff:195.208.179.23 no-token api:entries:read default
tick 2018-05-08T12:53:48.463Z
searching treatments q { find: { created_at: { '$gte': '2018-04-30T12:53:49.465Z' } },
  sort: { created_at: 1 } }
Load Complete:
     sgvs:488, treatments:4, mbgs:4, cals:4, profiles:1, devicestatus:535, sensorTreatments:4
WS: running websocket.update
delta calculation indicates no new data is present
GRANTED:  ::ffff:195.208.179.23 no-token api:entries:read default
GRANTED:  ::ffff:195.208.179.23 no-token api:entries:read default

/opt/ns_1(master*) # nodejs --version root@cgm v8.11.1



/opt/ns_1(master*) # npm install                                                                                                                       root@cgm
npm WARN lifecycle Nightscout@0.10.2-release-20171201~postinstall: cannot run in wd Nightscout@0.10.2-release-20171201 webpack --config webpack.config.js && npm run-script update-buster (wd=/opt/ns_1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

up to date in 10.449s
------------------------------------------------------------
/opt/ns_1(master*) # npm install --allow-root install                                                                                                  root@cgm
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ install@0.11.0
updated 1 package in 11.18s
PieterGit commented 6 years ago

@brutevinch sorry for not responding earlier. Did you manage to get this issue resolved? We're about to release a 0.10.3 release. Can you try to see if this problem is reproducible with the dev branch? If you have questions, please respond or join https://gitter.im/nightscout/public

sulkaharo commented 6 years ago

Looks like this was resolved in Gitter, closing

pinmike commented 5 years ago

@brutevinch Did you get this resolved? I'm having the same issue trying to bring the site up on a raspberry pi.

Kitekater commented 4 years ago

Hi. Could someone tell me the way to fix it. I have the same problem on my ubuntu Pi with NS 13.0.1

sulkaharo commented 4 years ago

Double check you’re not running Node or NPM as root and that the web server process has access to the files

Kitekater commented 4 years ago

ok thanks, i hope i can get it, because i´m not the Linux specialist

angelalex197 commented 2 years ago

I installed linux ubuntu 20.04.2 and nightscout After starting i have logo on black screen "loading the client" .what am i doing wrong?

pinmike commented 2 years ago

I installed linux ubuntu 20.04.2 and nightscout After starting i have logo on black screen "loading the client" .what am i doing wrong?

I got that when trying to load the site on a browser on a raspberry pi, so I put it down to the browser being unable to load the graphics of the client. Otherwise you could try using browser inspector tools to see if the calls to the site are failing.

angelalex197 commented 2 years ago

Upon attempt go ​ at http://193.104.57.84:443/ I get Failed to load resource: the server responded with a status of 404 (Not Found)

maria02git commented 2 years ago

The script does not load and constantly hangs "Loading the client"

Support writes that you need to enable error output at the level of this program. How to do it? Help me find the reason please and run. Page - https://lera.mp3e.ru/ Debian 9

pavelsshtanko commented 2 months ago

I have some problem. image what should I do to fix this?

psonnera commented 2 months ago

@pavelsshtanko where is your Nightscout site hosted?

pavelsshtanko commented 2 months ago

VPS server https://vmi2059201.contaboserver.net/ I installed it myself, according to the manual

│ id │ name      │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
├────┼───────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0  │ server    │ default     │ 15.0.2  │ fork    │ 570      │ 12h    │ 0    │ online    │ 0%       │ 124.2mb  │ pshtanko │ disabled
PM2        | 2024-08-01T23:05:45: PM2 log: PM2 version          : 5.4.2
PM2        | 2024-08-01T23:05:45: PM2 log: Node.js version      : 16.20.1
psonnera commented 2 months ago

Any chance you can see logs of what's going on?

pavelsshtanko commented 2 months ago

My logs `pshtanko@vmi2059201:~$ pm2 logs [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option) /home/pshtanko/.pm2/pm2.log last 15 lines: PM2 | 2024-08-01T23:05:45: PM2 log: PM2 version : 5.4.2 PM2 | 2024-08-01T23:05:45: PM2 log: Node.js version : 16.20.1 PM2 | 2024-08-01T23:05:45: PM2 log: Current arch : x64 PM2 | 2024-08-01T23:05:45: PM2 log: PM2 home : /home/pshtanko/.pm2 PM2 | 2024-08-01T23:05:45: PM2 log: PM2 PID file : /home/pshtanko/.pm2/pm2.pid PM2 | 2024-08-01T23:05:45: PM2 log: RPC socket file : /home/pshtanko/.pm2/rpc.sock PM2 | 2024-08-01T23:05:45: PM2 log: BUS socket file : /home/pshtanko/.pm2/pub.sock PM2 | 2024-08-01T23:05:45: PM2 log: Application log path : /home/pshtanko/.pm2/logs PM2 | 2024-08-01T23:05:45: PM2 log: Worker Interval : 30000 PM2 | 2024-08-01T23:05:45: PM2 log: Process dump file : /home/pshtanko/.pm2/dump.pm2 PM2 | 2024-08-01T23:05:45: PM2 log: Concurrent actions : 2 PM2 | 2024-08-01T23:05:45: PM2 log: SIGTERM timeout : 1600 PM2 | 2024-08-01T23:05:45: PM2 log: =============================================================================== PM2 | 2024-08-01T23:05:46: PM2 log: App [server:0] starting in -fork mode- PM2 | 2024-08-01T23:05:46: PM2 log: App [server:0] online

/home/pshtanko/.pm2/logs/server-out.log last 15 lines: 0|server | Load Complete: 0|server | sgvs:471, treatments:1, devicestatus:31, sensorTreatments:1 0|server | data loaded: reloading sandbox data and updating plugins 0|server | 2024-08-02T10:04:21.962Z SNOOZING ALARM: 0|server | {"level":"Urgent","title":"Urgent HIGH","message":"BG Now: 17 +0 → mmol/L\nIOB: 0U","group":"default","plugin":"simplealarms","debug":{"lastSGV":17,"thresholds":{"bgHigh":260,"bgTargetTop":180,"bgTargetBottom":70,"bgLow":55}}} 0|server | BECAUSE: 0|server | {"level":"Urgent","title":"Snoozing high alarm since there is enough IOB","message":"\nIOB: 0U","group":"default"} 0|server | tick 2024-08-02T10:04:53.339Z 0|server | Load Complete: 0|server | sgvs:471, treatments:1, devicestatus:31, sensorTreatments:1 0|server | data loaded: reloading sandbox data and updating plugins 0|server | 2024-08-02T10:04:58.588Z SNOOZING ALARM: 0|server | {"level":"Urgent","title":"Urgent HIGH","message":"BG Now: 17 +0 → mmol/L\nIOB: 0U","group":"default","plugin":"simplealarms","debug":{"lastSGV":17,"thresholds":{"bgHigh":260,"bgTargetTop":180,"bgTargetBottom":70,"bgLow":55}}} 0|server | BECAUSE: 0|server | {"level":"Urgent","title":"Snoozing high alarm since there is enough IOB","message":"\nIOB: 0U","group":"default"}

/home/pshtanko/.pm2/logs/server-error.log last 15 lines: 0|server | Alarm has already been snoozed, don't snooze it again, level: 2 , group: default 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | Alarm has already been snoozed, don't snooze it again, level: 2 , group: default 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | Alarm has already been snoozed, don't snooze it again, level: 2 , group: default 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | Alarm has already been snoozed, don't snooze it again, level: 2 , group: default 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | Alarm has already been snoozed, don't snooze it again, level: 2 , group: default

0|server | tick 2024-08-02T10:05:53.340Z 0|server | Load Complete: 0|server | sgvs:471, treatments:1, devicestatus:31, sensorTreatments:1 0|server | data loaded: reloading sandbox data and updating plugins 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | Alarm has already been snoozed, don't snooze it again, level: 2 , group: default 0|server | 2024-08-02T10:05:58.412Z SNOOZING ALARM: 0|server | {"level":"Urgent","title":"Urgent HIGH","message":"BG Now: 17 +0 → mmol/L\nIOB: 0U","group":"default","plugin":"simplealarms","debug":{"lastSGV":17,"thresholds":{"bgHigh":260,"bgTargetTop":180,"bgTargetBottom":70,"bgLow":55}}} 0|server | BECAUSE: 0|server | {"level":"Urgent","title":"Snoozing high alarm since there is enough IOB","message":"\nIOB: 0U","group":"default"} 0|server | tick 2024-08-02T10:06:53.341Z 0|server | Load Complete: 0|server | sgvs:471, treatments:1, devicestatus:31, sensorTreatments:1 0|server | data loaded: reloading sandbox data and updating plugins 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | 2024-08-02T10:06:59.504Z SNOOZING ALARM: 0|server | {"level":"Urgent","title":"Urgent HIGH","message":"BG Now: 17 +0 → mmol/L\nIOB: 0U","group":"default","plugin":"simplealarms","debug":{"lastSGV":17,"thresholds":{"bgHigh":260,"bgTargetTop":180,"bgTargetBottom":70,"bgLow":55}}} 0|server | BECAUSE: 0|server | {"level":"Urgent","title":"Snoozing high alarm since there is enough IOB","message":"\nIOB: 0U","group":"default"} 0|server | Alarm has already been snoozed, don't snooze it again, level: 2 , group: default 0|server | tick 2024-08-02T10:07:53.342Z 0|server | Load Complete: 0|server | sgvs:471, treatments:1, devicestatus:31, sensorTreatments:1 0|server | data loaded: reloading sandbox data and updating plugins 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | 2024-08-02T10:07:58.483Z SNOOZING ALARM: 0|server | {"level":"Urgent","title":"Urgent HIGH","message":"BG Now: 17 +0 → mmol/L\nIOB: 0U","group":"default","plugin":"simplealarms","debug":{"lastSGV":17,"thresholds":{"bgHigh":260,"bgTargetTop":180,"bgTargetBottom":70,"bgLow":55}}} 0|server | BECAUSE: 0|server | {"level":"Urgent","title":"Snoozing high alarm since there is enough IOB","message":"\nIOB: 0U","group":"default"} 0|server | Alarm has already been snoozed, don't snooze it again, level: 2 , group: default 0|server | tick 2024-08-02T10:08:53.343Z 0|server | Load Complete: 0|server | sgvs:471, treatments:1, devicestatus:31, sensorTreatments:1 0|server | data loaded: reloading sandbox data and updating plugins 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | 2024-08-02T10:08:58.549Z SNOOZING ALARM: 0|server | {"level":"Urgent","title":"Urgent HIGH","message":"BG Now: 17 +0 → mmol/L\nIOB: 0U","group":"default","plugin":"simplealarms","debug":{"lastSGV":17,"thresholds":{"bgHigh":260,"bgTargetTop":180,"bgTargetBottom":70,"bgLow":55}}} 0|server | BECAUSE: 0|server | {"level":"Urgent","title":"Snoozing high alarm since there is enough IOB","message":"\nIOB: 0U","group":"default"} 0|server | Alarm has already been snoozed, don't snooze it again, level: 2 , group: default 0|server | got data-received event, requesting reload 0|server | got data-received event, requesting reload 0|server | Load Complete: 0|server | sgvs:472, treatments:1, devicestatus:32, sensorTreatments:1 0|server | data loaded: reloading sandbox data and updating plugins 0|server | 2024-08-02T10:09:22.261Z SNOOZING ALARM: 0|server | {"level":"Urgent","title":"Urgent HIGH","message":"BG Now: 16.8 -0.2 → mmol/L\nIOB: 0U","group":"default","plugin":"simplealarms","debug":{"lastSGV":16.8,"thresholds":{"bgHigh":260,"bgTargetTop":180,"bgTargetBottom":70,"bgLow":55}}} 0|server | BECAUSE: 0|server | {"level":"Urgent","title":"Snoozing high alarm since there is enough IOB","message":"\nIOB: 0U","group":"default"} 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | Alarm has already been snoozed, don't snooze it again, level: 2 , group: default 0|server | tick 2024-08-02T10:09:53.343Z 0|server | Load Complete: 0|server | sgvs:472, treatments:1, devicestatus:32, sensorTreatments:1 0|server | data loaded: reloading sandbox data and updating plugins 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | 2024-08-02T10:09:58.468Z SNOOZING ALARM: 0|server | {"level":"Urgent","title":"Urgent HIGH","message":"BG Now: 16.8 -0.2 → mmol/L\nIOB: 0U","group":"default","plugin":"simplealarms","debug":{"lastSGV":16.8,"thresholds":{"bgHigh":260,"bgTargetTop":180,"bgTargetBottom":70,"bgLow":55}}} 0|server | BECAUSE: 0|server | {"level":"Urgent","title":"Snoozing high alarm since there is enough IOB","message":"\nIOB: 0U","group":"default"} 0|server | Alarm has already been snoozed, don't snooze it again, level: 2 , group: default 0|server | tick 2024-08-02T10:10:53.343Z 0|server | Load Complete: 0|server | sgvs:472, treatments:1, devicestatus:32, sensorTreatments:1 0|server | data loaded: reloading sandbox data and updating plugins 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | Alarm has already been snoozed, don't snooze it again, level: 2 , group: default 0|server | 2024-08-02T10:10:58.746Z SNOOZING ALARM: 0|server | {"level":"Urgent","title":"Urgent HIGH","message":"BG Now: 16.8 -0.2 → mmol/L\nIOB: 0U","group":"default","plugin":"simplealarms","debug":{"lastSGV":16.8,"thresholds":{"bgHigh":260,"bgTargetTop":180,"bgTargetBottom":70,"bgLow":55}}} 0|server | BECAUSE: 0|server | {"level":"Urgent","title":"Snoozing high alarm since there is enough IOB","message":"\nIOB: 0U","group":"default"} 0|server | tick 2024-08-02T10:11:53.345Z 0|server | Load Complete: 0|server | sgvs:471, treatments:1, devicestatus:32, sensorTreatments:1 0|server | data loaded: reloading sandbox data and updating plugins 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | 2024-08-02T10:11:58.796Z SNOOZING ALARM: 0|server | {"level":"Urgent","title":"Urgent HIGH","message":"BG Now: 16.8 -0.2 → mmol/L\nIOB: 0U","group":"default","plugin":"simplealarms","debug":{"lastSGV":16.8,"thresholds":{"bgHigh":260,"bgTargetTop":180,"bgTargetBottom":70,"bgLow":55}}} 0|server | BECAUSE: 0|server | {"level":"Urgent","title":"Snoozing high alarm since there is enough IOB","message":"\nIOB: 0U","group":"default"} 0|server | ALARM SOCKET: emitted clear_alarm to all clients 0|server | 2024-08-02T10:11:58.828Z EMITTING ALL CLEAR: 0|server | {"level":"Unknown","title":"All Clear","message":"default - Urgent was ack'd","group":"default","plugin":""} 0|server | tick 2024-08-02T10:12:53.345Z 0|server | Load Complete: 0|server | sgvs:471, treatments:1, devicestatus:32, sensorTreatments:1 0|server | data loaded: reloading sandbox data and updating plugins 0|server | For the COB plugin to function you need a treatment profile 0|server | For the Basal plugin to function you need a treatment profile 0|server | 2024-08-02T10:12:58.484Z SNOOZING ALARM: 0|server | {"level":"Urgent","title":"Urgent HIGH","message":"BG Now: 16.8 -0.2 → mmol/L\nIOB: 0U","group":"default","plugin":"simplealarms","debug":{"lastSGV":16.8,"thresholds":{"bgHigh":260,"bgTargetTop":180,"bgTargetBottom":70,"bgLow":55}}} 0|server | BECAUSE: 0|server | {"level":"Urgent","title":"Snoozing high alarm since there is enough IOB","message":"\nIOB: 0U","group":"default"} 0|server | Alarm has already been snoozed, don't snooze it again, level: 2 , group: default `

old-square-eyes commented 1 month ago

Same issue. Fresh Debian install. Spent 4 days on this.

image

Console logs show two errors:

Uncaught ReferenceError: Buffer is not defined 65712 util.js:103 Webpack 17 util.js:103

And...

Uncaught TypeError: window.Nightscout.client is undefined

client.js:10 jQuery 13 Webpack 7 client.js:10:2
pavelsshtanko commented 1 month ago

As far as I understand, this is due to the fact that MongoDB must be hosted on an official resource (Heroku, etc.), and not on a vps (self-hosted) server.

old-square-eyes commented 1 month ago

I have had it running as recently as last week. I just decided to rebuild for another reason. Also the errors don't seem consistent with a mongo error. What makes you think it's mongo?

pavelsshtanko commented 1 month ago

In my case, moving mongo to heroku helped.