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

oref0-upload-profile fails to upload to Nightscout >> NS crashes with TypeError #1283

Open
hartlijn opened this issue Aug 3, 2019 · 1 comment

Comments

@hartlijn
Copy link

hartlijn commented Aug 3, 2019

Expected behavior
An upload of the profile named 'OpenAPS Autosync'

Setup Information (please complete the following information):

  • Pump type Combo
  • CGM type DexcomG5
  • AndroidAPS with local linux VM
  • oref0 version 0.7.0-dev
  • nightscout version 0.12.2

oref0-upload-profile fails with an error and resulting in crash of Nightscout

preview mode works ok --> oref0-upload-profile --p works good with a result of the downloaded NS profile and the to be uploaded profile.
restart of NS does not solve
all authorizations are granted.
tried both with my own Autotuned profile (via this method of but as well with a profile of someone else that prooved to be able to upload (to exclude that it's a wrong json I am trying to upload).

whats next to test in order to be able to upload my profile?

joost@joost-PC:~$ oref0-upload-profile testprofile.json $NS_SITE $API_SECRET
Profile changed, uploading to Nightscout
null
<!DOCTYPE html>
        <html>
          <head>
                <meta name="viewport" content="width=device-width, initial-scale=1">
                <meta charset="utf-8">
                <title>Application Error</title>
                <style media="screen">
                  html,body,iframe {
                        margin: 0;
                        padding: 0;
                  }
                  html,body {
                        height: 100%;
                        overflow: hidden;
                  }
                  iframe {
                        width: 100%;
                        height: 100%;
                        border: 0;
                  }
                </style>
          </head>
          <body>
                <iframe src="//www.herokucdn.com/error-pages/application-error.html"></iframe>
          </body>
        </html>

Error in Nightscout is TypeError: Cannot read property 'ops' of null

2019-08-03T17:41:45.272172+00:00 heroku[router]: at=info method=GET path="/api/v1/profile/current" host=xxx.herokuapp.com request_id=55a0a896-8ec2-4b6b-b454-09df0d4b7625 fwd="77.161.245.19" dyno=web.1 connect=0ms service=7ms status=200 bytes=1861 protocol=https
2019-08-03T17:41:54.383620+00:00 app[web.1]: �[32mGRANTED: �[0m 77.161.245.19 api-secret api:profile:read
2019-08-03T17:41:54.569739+00:00 app[web.1]: �[32mGRANTED: �[0m 77.161.245.19 api-secret api:profile:read
2019-08-03T17:41:54.569843+00:00 app[web.1]: �[32mGRANTED: �[0m 77.161.245.19 api-secret api:profile:create
2019-08-03T17:41:54.575635+00:00 app[web.1]: got data-received event, requesting reload
2019-08-03T17:41:54.575767+00:00 app[web.1]: (node:4) DeprecationWarning: collection.insert is deprecated. Use insertOne, insertMany or bulkWrite instead.
2019-08-03T17:41:54.577478+00:00 app[web.1]: /app/node_modules/mongodb/lib/utils.js:132
2019-08-03T17:41:54.577480+00:00 app[web.1]:       throw err;
2019-08-03T17:41:54.577482+00:00 app[web.1]:       ^
2019-08-03T17:41:54.577483+00:00 app[web.1]: 
2019-08-03T17:41:54.577484+00:00 app[web.1]: TypeError: Cannot read property 'ops' of null
2019-08-03T17:41:54.577486+00:00 app[web.1]:     at /app/lib/api/profile/index.js:44:38
2019-08-03T17:41:54.577487+00:00 app[web.1]:     at /app/lib/server/profile.js:9:7
2019-08-03T17:41:54.577488+00:00 app[web.1]:     at err (/app/node_modules/mongodb/lib/utils.js:411:14)
2019-08-03T17:41:54.577490+00:00 app[web.1]:     at session.endSession (/app/node_modules/mongodb/lib/utils.js:397:27)
2019-08-03T17:41:54.577492+00:00 app[web.1]:     at ClientSession.endSession (/app/node_modules/mongodb-core/lib/sessions.js:134:41)
2019-08-03T17:41:54.577493+00:00 app[web.1]:     at executeCallback (/app/node_modules/mongodb/lib/utils.js:395:17)
2019-08-03T17:41:54.577494+00:00 app[web.1]:     at bulkWrite (/app/node_modules/mongodb/lib/operations/collection_ops.js:926:21)
2019-08-03T17:41:54.577496+00:00 app[web.1]:     at bulk.execute (/app/node_modules/mongodb/lib/operations/collection_ops.js:133:14)
2019-08-03T17:41:54.577497+00:00 app[web.1]:     at err (/app/node_modules/mongodb/lib/utils.js:411:14)
2019-08-03T17:41:54.577498+00:00 app[web.1]:     at executeCallback (/app/node_modules/mongodb/lib/utils.js:401:25)
2019-08-03T17:41:54.640606+00:00 heroku[web.1]: State changed from up to crashed
@danamlewis
Copy link
Contributor

@hartlijn can you re-test with latest dev? Also, if it still bonks, can you paste a copy of your profile?

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

2 participants