Skip to content

Loop stuck searching for sensor but G7 app is getting results #2286

Closed

Description

@ssabo

Describe the bug

I’ve had two related issues and I’m not sure if they are the same or just similar.

The first issue I had on 1/29 and is that I had walked away from my phone for 30m. When I came back the CGM was understandably behind on readings. The Dexcom connected back by itself within a few minutes. Loop told me it was searching for sensor for hours though. During this outage I tried

  • keeping the phone very close, in direct line of sight, to the sensor
  • rebooting the phone
  • clearing out all the old Dexcom Bluetooth pairs
  • deleting the CGM configuration and re adding it

None of those fixed it so I put it down for a couple hours and noticed it had reconnected.

The second issue occurred on 1/30 and is still unresolved. Loop notified me it has not been looping for a while. Loop thinks Dexcom is searching for sensor but Dexcom is giving me current readings

Attach an Issue Report

Loop Report 2025-01-30 18:27:47-08:00.md

To Reproduce
Steps to reproduce the behavior:

  1. Unknown at this time

Expected behavior

Loop should be providing recent readings from the G7 sensor

Screenshots
If applicable, add screenshots to help explain your problem.

Image
Image

Phone

  • Hardware: iphone 15 pro
  • OS Version: 18.3

Loop Version

  • Version Number: 3.4.4 (2)
  • Repo: [LoopKit/Loop, Katie, etc]

CGM

  • Device: Dexcom G7
  • Manager app: Dexcom App

Pump

  • Manufacturer: Simulated Pump
  • Model: n/a
  • Firmware version: n/a

Additional context
Add any other context about the problem here.

Activity

  1. JonathonMcIntyre commented on Feb 7, 2025

    @JonathonMcIntyre

    I have been experiencing the same problems for roughly the same duration. I have done 1 sensor change and it still seems to occur on the new sensor as well.
    I have had to delete the cgm in Loop and then re add to consistently get it to come back though it may take a few tries.
    It will also come back on its own sometimes but no idea why.

    Sometimes I notice that after the loop has the problem that Dexcom G7 app will disconnect too . No consistent occurrences though.
    My specs are the same with the exception of the iPhone which is a 12.

  2. braverymole commented on Feb 12, 2025

    @braverymole

    I think I am having the same problem with my daughters loop app. Loop loses sensor but g7 app connected fine.

  3. Quandazo commented on Feb 13, 2025

    @Quandazo

    This is also happening for me. It never happened before I updated to ios 18 on my iphone. For over a year with the same phone it never happened and about 2 weeks after I updated to ios18 is started happening. Loop loses the connection to the sensor but the G7 app shows the readings fine. On rare occasions the G7 app also loses connection but more often it is just loop. I also noticed that when I use my Apple Maps application and specifically for directions it causes loop to disconnect from the sensor. I went 1 week without using Apple Maps directions and did not lose connection. Used Apple Maps once and hours later Loop lost connection to sensor. Typically I have to delete the connection from the G7, make a new connection, close all apps, restart phone and open G7app... wait for connection and then open Loop.

  4. ssabo commented on Mar 10, 2025

    @ssabo
    Author

    Spent some time looking at this today trying to figure out what’s happening.

    I caught a failure happening live. The G7 app had exited but it did get a reading again after reopening and waiting <5min

    Loop readings stopped right at the time where the g7 app had its last datapoint so presumably there is some kind of correlation.

    The loop device communication log ends here. It’s not had another log event published for over 30m since this. It seems like it thinks the sensor has ended and is scanning for a new one but nothing is happening

    * 2025-03-10 08:07:13 +0000 G7CGMManager DXCMCw connection Sensor connected
    * 2025-03-10 08:07:14 +0000 G7CGMManager DXCMCw receive Sensor didRead G7GlucoseMessage(glucose:Optional(84), sequence:484 glucoseIsDisplayOnly:false state:ok messageTimestamp:144204 age:9, data:4e004c330200e401000109005400060461000f)
    * 2025-03-10 08:07:15 +0000 G7CGMManager DXCMCw connection Sensor disconnected: suspectedEndOfSession=false
    * 2025-03-10 08:12:08 +0000 G7CGMManager DXCMCw connection Sensor connected
    * 2025-03-10 08:12:19 +0000 G7CGMManager DXCMCw connection Sensor disconnected: suspectedEndOfSession=true
    * 2025-03-10 08:12:19 +0000 G7CGMManager DXCMCw connection Forgetting existing sensor and starting scan for new sensor.
    
  5. ssabo commented on Mar 10, 2025

    @ssabo
    Author

    Recovery message. Looks like there is no logging happening between failure and recovery right now for the G7 plugin

    2025-03-10 08:07:15 +0000 G7CGMManager DXCMCw connection Sensor disconnected: suspectedEndOfSession=false
    * 2025-03-10 08:12:08 +0000 G7CGMManager DXCMCw connection Sensor connected
    * 2025-03-10 08:12:19 +0000 G7CGMManager DXCMCw connection Sensor disconnected: suspectedEndOfSession=true
    * 2025-03-10 08:12:19 +0000 G7CGMManager DXCMCw connection Forgetting existing sensor and starting scan for new sensor.
    * 2025-03-10 09:37:09 +0000 G7CGMManager  connection New sensor DXCMCw discovered, activated at 2025-03-08 16:03:50 +0000
    * 2025-03-10 09:37:09 +0000 G7CGMManager DXCMCw receive Sensor didRead G7GlucoseMessage(glucose:Optional(124), sequence:502 glucoseIsDisplayOnly:false state:ok messageTimestamp:149599 age:4, data:4e005f480200f601000104007c0006088f000f)
    * 2025-03-10 09:37:10 +0000 MockPumpManager MockId send enactBolus(0.7, automatic)
    * 2025-03-10 09:37:10 +0000 MockPumpManager mockpump receive Bolus accepted
    * 2025-03-10 09:37:10 +0000 MockPumpManager MockId receive enactBolus succeeded
    * 2025-03-10 09:37:18 +0000 G7CGMManager DXCMCw connection Sensor disconnected: suspectedEndOfSession=false
    * 2025-03-10 09:42:08 +0000 G7CGMManager DXCMCw connection Sensor connected
    * 2025-03-10 09:42:08 +0000 G7CGMManager DXCMCw receive Sensor didRead G7GlucoseMessage(glucose:Optional(132), sequence:503 glucoseIsDisplayOnly:false state:ok messageTimestamp:149898 age:3, data:4e008a490200f701000103008400060b99000f)
    * 2025-03-10 09:42:09 +0000 MockPumpManager MockId send enactBolus(0.7, automatic)
    * 2025-03-10 09:42:09 +0000 MockPumpManager mockpump receive Bolus accepted
    * 2025-03-10 09:42:09 +0000 MockPumpManager MockId receive enactBolus succeeded
    * 2025-03-10 09:42:18 +0000 G7CGMManager DXCMCw connection Sensor disconnected: suspectedEndOfSession=false
    
  6. ssabo commented on Mar 10, 2025

    @ssabo
    Author

    So it looks like what might be happening is the sensor is getting connected and disconnected before auth can happen. This would make sense why the Dexcom app also sees the error at this time.

    https://github.com/LoopKit/G7SensorKit/blob/2be3eb29b0a18aa89f8b60281341e46e07d024e5/G7SensorKit/G7CGMManager/G7Sensor.swift#L193

    I haven’t figured out yet is what is going on for the next hour while loop is allegedly scanning but Dexcom has recovered. I need to read more about how the messages are structured. I suspect there is something about the message structure where loop having forgotten the sensor has it ignoring messages with readings while it waits for a new message that allows it to reestablish.

  7. ssabo commented on Mar 10, 2025

    @ssabo
    Author

    It looks like the g7 plugin has debug log events published throughout it that would be really helpful. I do not know how to enable debug logging though.

  8. marionbarker commented on Mar 10, 2025

    @marionbarker
    Contributor

    Have you been following the conversation on zulipchat:

    A possible improvement has been proposed and is available as a customization.

    This does not fix all loss of G7 readings but improves the situation significantly for people who were having the problem and have implemented the customization.

    The debug log output you noted is only seen when connected to Xcode.

  9. ssabo commented on Mar 10, 2025

    @ssabo
    Author

    @marionbarker i had not! Thank you for pointing me to that. I’m not on Zulip yet but that patch looks like it addresses what I’m experiencing.

    I’ll join zulip and catch up on the conversation and try running the customization next.

  10. timd24 commented on Mar 17, 2025

    @timd24

    Yes, I have the same issue. I have been restarting my phone or deleting the sensor to clear the error for now.

  11. marionbarker commented on Mar 19, 2025

    @marionbarker
    Contributor

    This is a real Issue and is under investigation. But we only want one Issue to track.

    Closing this Issue and keeping #2265 open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions