Delubear / GlucoseTray

Tray Icon for displaying current BG information in taskbar.
MIT License
35 stars 21 forks source link

App not getting any data #50

Closed jk1993 closed 3 years ago

jk1993 commented 3 years ago

The last few versions seem to be broken for me. Can't remember which version specifically broke it but have been upgrading each time a new version is released and it hasn't been working for a few releases now. When I start the app I get the following in the windows application logs:

Category: Microsoft.EntityFrameworkCore.Database.Command
EventId: 20102

Failed executing DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE "GlucoseResults" (
    "Id" INTEGER NOT NULL CONSTRAINT "PK_GlucoseResults" PRIMARY KEY AUTOINCREMENT,
    "MgValue" INTEGER NOT NULL,
    "MmolValue" decimal(3,2) NOT NULL,
    "DateTimeUTC" TEXT NOT NULL,
    "Trend" TEXT NOT NULL,
    "WasError" INTEGER NOT NULL,
    "Source" TEXT NOT NULL,
    "IsCriticalLow" INTEGER NOT NULL
);

The app does start and the tray icon is there, but it is red and crossed out and is the last value it has from when the app was still working with a previous version as far as I can tell.

Let me know if you need any further logs or testing - thanks!

Delubear commented 3 years ago

Which method are you using to get data from?

Can you navigate to C:\Users\\AppData\Roaming\GlucoseTrayCore\GlucoseTrayCore\1.0.0 and delete the glucose_tray_settings.json file there, then relaunch the program and refill them out to see if that fixes it as well?

Delubear commented 3 years ago

I believe that error you're seeing is standard if the database is already setup, I've seen it when going through my logs.

jk1993 commented 3 years ago

Using nightscout to fetch the data. Deleted the file and restarted but still not seeing anything recent. Had an issue with my last sensor so waiting for the next one to start up so should have some live data soon (in case it is working now but won't fetch unless there's anything very recent). Also noticed that when you set the unit to MMOL/L it doesn't seem to remember it next time you go into the settings and reverts back to MG/DL.

Let me know if you can think of anything else to try. Thanks

Delubear commented 3 years ago

could you send me your settings file for me to test with? Also, just pushed 11.0.2 to fix the radio button for Glucose Units not being set when loading existing settings.

jk1993 commented 3 years ago

Sure - can you add an email address to your github profile and I can send it to you that way? Rather than post it in here since since although the nightscout instance is hosted publicly, I'd rather not publish the link anywhere if not necessary :) alternatively I can post the file here with the URL removed but I feel like it would be useful to test with my instance.

Thanks

Delubear commented 3 years ago

email listed on profile

Delubear commented 3 years ago

I'm also redeploying a nightscout site for testing

Delubear commented 3 years ago

Can confirm I app getting the same results when using Nightscout. Debugging now. Appears we are getting 0 results back from the nightscout api.

Delubear commented 3 years ago

@jk1993 Thanks for the help in finding this. I don't usually use the Nightscout method.

Fixed a deformed URL that was being used when we had a previous result that we were comparing times on.

Fix should be deploying now, version 11.0.3. This should also populate any missed results in your database.

Thank you

jk1993 commented 3 years ago

Brilliant - that all seems to be working now. Thank you for the quick fix!

Cheers