LoopKit / Loop

An automated insulin delivery app for iOS, built on LoopKit
https://loopdocs.org
Other
1.48k stars 1.29k forks source link

Can't connect to Nightscout if Nightscout URL has trailing slash #977

Closed seanknox closed 9 months ago

seanknox commented 5 years ago

Describe the bug User gets Nighscoutuploadkit.Uploaderror error 0 when setting up Nightscout if the Nightscout URL has a trailing slash (e.g. https://myappname.herokuapp.com/ vs https://myappname.herokuapp.com)

Attach an Issue Report Tap the Loop settings icon on the bottom of the screen, then tap Issue Report and attach it to this ticket.

To Reproduce Steps to reproduce the behavior:

  1. Go to settings
  2. Tap to set Nightscout
  3. Enter NS URL with a trailing slash

Expected behavior Loop accepts Nightscout URL or sanitizes it (removes the trailing slash).

Actual behavior Loop returns Nighscoutuploadkit.Uploaderror error 0. I've tried multiple different (new) Nightscout sites and confirmed the API Key is correct.

Screenshots

image

Phone

Loop Version

CGM

Pump

Additional context Add any other context about the problem here.

seanknox commented 5 years ago

Loop issue: https://gist.github.com/seanknox/336ef9538934a60ab0c11ff950d181a2

seanknox commented 5 years ago

This seems like Loop can't authenticate to Nightscout. I've confirmed the API is correct by logging into the Nightscout web UI.

loudestnoise commented 5 years ago

I had this issue and I had recently changed my API key. I found that I had to restart my NS instance for the new API key to take. I see though you’re using Heroku, whereas I am running NS on my own Linux VPS.

Kdisimone commented 5 years ago

Make sure your URL doesn’t have a trailing slash in Loop settings too

seanknox commented 5 years ago

It was the trailing slash in the URL! Great find.

Kdisimone commented 5 years ago

Well, to be fair to the docs...it is in there. ;) https://loopkit.github.io/loopdocs/operation/loop-settings/services/#nightscout

seanknox commented 5 years ago

True, though a user really shouldn't have to ensure that text input like this is sanitized; the app should do that. I'm going to see if I can make that happen.

ArkonPhoenix commented 5 years ago

I wish you could edit what you have entered. It took me three tries of typing the URL in several variations and the lengthy API Secret. As you have to Delete and start over.

github-actions[bot] commented 10 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 9 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.