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

throw Error(failed to get last entry: ${resp.statusText}); #177

Closed
DasBlueFox opened this issue Dec 18, 2024 · 5 comments
Closed

throw Error(failed to get last entry: ${resp.statusText}); #177

DasBlueFox opened this issue Dec 18, 2024 · 5 comments

Comments

@DasBlueFox
Copy link

Hi! I've been using this for a while now and works amazingly for me with minimalistic errors, however a few days ago my LibreLinkUp updated and since then I've had conncectivity issues and now it's not working at al. I get this. I've tried to troubleshoot it by my self without any luck. I recently discovered that the api token to NightScout should be in SHA1 format witch I had not done. So i went in to Heroku to change my api token to SHA1, and got this result. So that did not help. Even made a new token from NS to make sure it was correct.

From Heroku console | With SHA1 API

2024-12-18T14:13:00.197039+00:00 app[worker.1]: [info]: renew token
2024-12-18T14:13:00.390337+00:00 app[worker.1]: [info]: Logged in to LibreLink Up
2024-12-18T14:13:00.444610+00:00 app[worker.1]: [info]: Found 1 LibreLink Up connection.
2024-12-18T14:13:00.444804+00:00 app[worker.1]: [info]: -> The following connection will be used: MyName (Patient-ID: MyPatientIdShowsUpHere)
2024-12-18T14:13:00.537116+00:00 app[worker.1]: [error]: getaddrinfo ENOTFOUND https
2024-12-18T14:13:00.537400+00:00 app[worker.1]: /app/dist/nightscout/apiv1.js:25
2024-12-18T14:13:00.537410+00:00 app[worker.1]:             throw Error(`failed to get last entry: ${resp.statusText}`);
2024-12-18T14:13:00.537411+00:00 app[worker.1]:                   ^
2024-12-18T14:13:00.537412+00:00 app[worker.1]: 
2024-12-18T14:13:00.537412+00:00 app[worker.1]: Error: failed to get last entry: undefined
2024-12-18T14:13:00.537414+00:00 app[worker.1]:     at Client.lastEntry (/app/dist/nightscout/apiv1.js:25:19)
2024-12-18T14:13:00.537418+00:00 app[worker.1]:     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2024-12-18T14:13:00.537418+00:00 app[worker.1]:     at async createFormattedMeasurements (/app/dist/index.js:238:47)
2024-12-18T14:13:00.537419+00:00 app[worker.1]:     at async uploadToNightScout (/app/dist/index.js:259:35)
2024-12-18T14:13:00.537419+00:00 app[worker.1]:     at async main (/app/dist/index.js:131:5)

From Heroku console | without SHA1 on API (direct from NS)

2024-12-18T14:21:54.493212+00:00 app[worker.1]: > nightscout-librelink-up@2.7.3 start-heroku
2024-12-18T14:21:54.493212+00:00 app[worker.1]: > node dist/index.js
2024-12-18T14:21:54.493213+00:00 app[worker.1]: 
2024-12-18T14:21:54.615705+00:00 app[worker.1]: [info]: Starting cron schedule: */1 * * * *
2024-12-18T14:21:54.564519+00:00 app[web.1]: 
2024-12-18T14:21:54.564538+00:00 app[web.1]: > nightscout-librelink-up@2.7.3 start
2024-12-18T14:21:54.564538+00:00 app[web.1]: > npx ts-node --transpile-only src/index.ts
2024-12-18T14:21:54.564538+00:00 app[web.1]: 
2024-12-18T14:21:55.125112+00:00 app[web.1]: npm warn exec The following package was not found and will be installed: ts-node@10.9.2
2024-12-18T14:21:57.032010+00:00 app[web.1]: /app/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:859
2024-12-18T14:21:57.032022+00:00 app[web.1]:     return new TSError(diagnosticText, diagnosticCodes, diagnostics);
2024-12-18T14:21:57.032023+00:00 app[web.1]:            ^
2024-12-18T14:21:57.032367+00:00 app[web.1]: TSError:  Unable to compile TypeScript:
2024-12-18T14:21:57.032368+00:00 app[web.1]: error TS6053: File '@tsconfig/node20/tsconfig.json' not found.
2024-12-18T14:21:57.032368+00:00 app[web.1]: 
2024-12-18T14:21:57.032369+00:00 app[web.1]:     at createTSError (/app/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:859:12)
2024-12-18T14:21:57.032369+00:00 app[web.1]:     at reportTSError (/app/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:863:19)
2024-12-18T14:21:57.032369+00:00 app[web.1]:     at createFromPreloadedConfig (/app/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:874:36)
2024-12-18T14:21:57.032370+00:00 app[web.1]:     at phase4 (/app/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/bin.ts:543:44)
2024-12-18T14:21:57.032370+00:00 app[web.1]:     at bootstrap (/app/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/bin.ts:95:10)
2024-12-18T14:21:57.032370+00:00 app[web.1]:     at main (/app/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/bin.ts:55:10)
2024-12-18T14:21:57.032370+00:00 app[web.1]:     at Object.<anonymous> (/app/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/bin.ts:800:3)
2024-12-18T14:21:57.032371+00:00 app[web.1]:     at Module._compile (node:internal/modules/cjs/loader:1565:14)
2024-12-18T14:21:57.032371+00:00 app[web.1]:     at Object..js (node:internal/modules/cjs/loader:1708:10)
2024-12-18T14:21:57.032371+00:00 app[web.1]:     at Module.load (node:internal/modules/cjs/loader:1318:32) {
2024-12-18T14:21:57.032372+00:00 app[web.1]:   diagnosticCodes: [ 6053 ]
2024-12-18T14:21:57.032372+00:00 app[web.1]: }
2024-12-18T14:21:57.069985+00:00 app[web.1]: npm notice
2024-12-18T14:21:57.069987+00:00 app[web.1]: npm notice New major version of npm available! 10.9.0 -> 11.0.0
2024-12-18T14:21:57.069991+00:00 app[web.1]: npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.0.0
2024-12-18T14:21:57.069992+00:00 app[web.1]: npm notice To update run: npm install -g npm@11.0.0
2024-12-18T14:21:57.069992+00:00 app[web.1]: npm notice
2024-12-18T14:21:57.131270+00:00 heroku[web.1]: Process exited with status 1
2024-12-18T14:21:57.153339+00:00 heroku[web.1]: State changed from starting to crashed
2024-12-18T14:22:00.626721+00:00 app[worker.1]: [info]: renew token
2024-12-18T14:22:00.845876+00:00 app[worker.1]: [info]: Logged in to LibreLink Up
2024-12-18T14:22:00.890600+00:00 app[worker.1]: [info]: Found 1 LibreLink Up connection.
2024-12-18T14:22:00.890759+00:00 app[worker.1]: [info]: -> The following connection will be used: MyName (Patient-ID: MyPatientIDShowsUpHere)
2024-12-18T14:22:00.999060+00:00 app[worker.1]: [error]: getaddrinfo ENOTFOUND https
2024-12-18T14:22:00.999453+00:00 app[worker.1]: /app/dist/nightscout/apiv1.js:25
2024-12-18T14:22:00.999466+00:00 app[worker.1]:             throw Error(`failed to get last entry: ${resp.statusText}`);
2024-12-18T14:22:00.999466+00:00 app[worker.1]:                   ^
2024-12-18T14:22:00.999467+00:00 app[worker.1]: 
2024-12-18T14:22:00.999467+00:00 app[worker.1]: Error: failed to get last entry: undefined
2024-12-18T14:22:00.999468+00:00 app[worker.1]:     at Client.lastEntry (/app/dist/nightscout/apiv1.js:25:19)
2024-12-18T14:22:00.999469+00:00 app[worker.1]:     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2024-12-18T14:22:00.999469+00:00 app[worker.1]:     at async createFormattedMeasurements (/app/dist/index.js:238:47)
2024-12-18T14:22:00.999470+00:00 app[worker.1]:     at async uploadToNightScout (/app/dist/index.js:259:35)
2024-12-18T14:22:00.999470+00:00 app[worker.1]:     at async main (/app/dist/index.js:131:5)
2024-12-18T14:22:00.999470+00:00 app[worker.1]: 
2024-12-18T14:22:00.999470+00:00 app[worker.1]: Node.js v22.12.0
2024-12-18T14:22:01.007023+00:00 app[worker.1]: npm notice
2024-12-18T14:22:01.007024+00:00 app[worker.1]: npm notice New major version of npm available! 10.9.0 -> 11.0.0
2024-12-18T14:22:01.007025+00:00 app[worker.1]: npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.0.0
2024-12-18T14:22:01.007025+00:00 app[worker.1]: npm notice To update run: npm install -g npm@11.0.0
2024-12-18T14:22:01.007025+00:00 app[worker.1]: npm notice
2024-12-18T14:22:01.061200+00:00 heroku[worker.1]: Process exited with status 1
2024-12-18T14:22:01.079572+00:00 heroku[worker.1]: State changed from up to crashed
@mstry9
Copy link

mstry9 commented Dec 18, 2024

Maybe try logging out/in to the LibreLinkUp app

@DasBlueFox
Copy link
Author

Maybe try logging out/in to the LibreLinkUp app

Done that too.. :/ no success.

@mstry9
Copy link

mstry9 commented Dec 19, 2024

I just set this up on Tuesday as a stand alone service in free Northflank. I was getting the ENOTFOUND https so I changed my Nightscout entry from https://mynightscout.com to just mynightscout.com and it started working. Uploading to my google Nightscout fine now.

@DasBlueFox
Copy link
Author

I just set this up on Tuesday as a stand alone service in free Northflank. I was getting the ENOTFOUND https so I changed my Nightscout entry from https://mynightscout.com to just mynightscout.com and it started working. Uploading to my google Nightscout fine now.

Okey so if I got this right you just removed the https tag from the url on the variables? I’ll give it a try.

@DasBlueFox
Copy link
Author

I just set this up on Tuesday as a stand alone service in free Northflank. I was getting the ENOTFOUND https so I changed my

That just made it work! Thanks alot for your input. Very appreciated!!

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