Beacon Bug: Apple Loses iBeacon Ranging….And Drives Developers Mad

ibeacon-bug

A new bug in the Apple iBeacon stack is driving developers a bit, well, buggy – and leaving them wondering if it’s their code, the beacon or something else that’s causing problems in discovering beacons.

The bug causes iPhones to suddenly stop ranging for beacons.

Our team in the UK found a similar result this week – when a demo app suddenly stopped working for no apparent reason.

As David Young of Radius Networks reports:

We have received many reports at Radius Networks of phones stopping detecting iBeacons and requiring a reboot or turning Bluetooth off and back on again to resolve the situation. Folks have reported this on iPhone 4S, iPhone 5s, iPhone 5c and iPads.

I do not have any hard evidence that this is something that broke as of iOS 7.1, but the report frequency has gone way up since its release. The circumstantial evidence is therefore pretty strong.

When this phone gets into this state, the phone can still scan for bluetooth devices, and can still transmit as an iBeacon. It is therefore not a hardware problem with Bluetooth. Based on the available evidence, it is most likely a newly introduced bug in CoreLocation.

So if your app suddenly seems like it isn’t working with your beacons, give your phone a hard restart and see what happens.

This bug should be filed in the Mission Critical category over at Apple. With iBeacon deployment picking up steam on a nearly daily basis it’s bad news for everyone if consumers need to be told to hard restart their phones to get their apps to work.

And please share your insights or experiences in the comments below.

(And a hat tip to Ivan for first alerting us!)

Share Your Thoughts

Join our weekly e-mail list for more on iBeacons. Join the conversation on Twitter, or connect with me on LinkedIn.

Have you seen this bug since the release of iOS 7.1? What’s the frequency of losing ‘ranging’? Share your insights – at least we’ll all know that we haven’t gone crazy and that it’s not our code at fault, but Cupertino.

22 Responses to “Beacon Bug: Apple Loses iBeacon Ranging….And Drives Developers Mad”

  1. Doug,

    I am seeing this on ipod touch (5th gen) as well. It looks like the new iOS update is forcing Core Location to cache ibeacon-related data which is causing it to ignore new reads. It’s a very odd bug and occurs on an inconsistent basis.

    Reply
    • We still experience this problem with the latest ios update on iPad/iPhone.
      Anyone had any luck with the latest update?

      Reply
  2. We have hand similar reports from our user base. Reset of network settings seems to be the only consistent way to resolve the problem and get iOS back to detecting beacons.

    Reply
  3. Someone on Twitter comments that Apple has told them it will be fixed in the next release. Which is good but can’t come soon enough.

    Reply
  4. I’ve run into this issue while developing two ibeacon aware apps that can range each other – very frustrating but hard reset is a temporary workaround. Bluetooth cycle has no effect. Testing on iPad mini and iPhone 4s.

    Reply
  5. Same here. We’ve noticed for unknown reasons, an app will stop pushing ibeacon notifications even though everything else is working. Rebooting the device solves the issue, but after a day or more, it might stop working again. It’s a relief to read your post, but very annoying for our customers (and us!)

    Reply
  6. Same story here. We are currently investigate over the issue. if you implement the delegate method:

    - (void)locationManager:(CLLocationManager *)manager rangingBeaconsDidFailForRegion:(CLBeaconRegion *)region withError:(NSError *)error;

    you will see that the ranging fails with an errorCode 16.

    Reply
  7. We have also hgot many reports on that. We have chance to re-produce this bug with high density (over 50 iBeacons around) several times which is inline with Bob’s words above. But this bug does not happen every handset we have and very hard to reproduce again and again. Hope Apple has already tagged this bug(?!) as mission critical and do not postpone the update to include other features in the next release of new iOS firmware.

    Reply
  8. I have seen this issue with iPhone 4s and iPhone 5 testing I have done at a 30+ beacon customer deployment. As mentioned, requires a complete shutdown and restart (which no consumer would think of doing). Very frustrating.

    This does not happen each time. It’s completely unpredictable and hard bug to replicate.

    Reply
  9. The bug appeared on IOS 7.1 and has not been solved in IOS 7.1.1. We identified it almost immediately after the release and had many exchanges with Apple on the topic. Although we still don’t have a clear visibility (Apple don’t disclose release information) on when the bug fix will be release we know that Apple is aware on how much this bug is driving crazy developers working with the technology. From our latest exchanges we understand between the lines that a fix could have bee identified, although given the little information shared more an optimistic speculation on our side than something we can assume for granted.
    On our side we were able to reproduce it on any device, but with frequencies that varies (i.e. much easier to reproduce on a 4S than on a 5S – on one of our 4S we can reproduce it every almost every day). We believe the bug is in the bluetooth daemon. Once the bug appears it affect any application (so basically it just stop seeing any beacon). The only work around for now is to reboot the phone.. . A good way to detect it is having another Application (like the BLE explorer) that you use to see if you can you can see your beacons or not. If You can not see your beacons in the app and your app does not work than you have THE bug. Definitely a MUST fix on Apple side to give a future to this still promising technology.

    Reply
    • Note, to fix the ranging problem you don’t have to reboot. You can instead just:
      Settings –>General –> Reset –>Reset Network Settings

      This should take care of it.

      Reply
      • Ian Bailey

        Nope that did not work either. I had this problem and upgrqaded to 7.1.2 which seems to fix it for a short time. Also soft restart as well. But still does not work. Any more ideas?

        Reply
  10. We alsoexperienced this kind of bug, both in internal tests that with our customers. As Francois stated it affects all apps that use BLE resource. And the only solution is rebooting the device.

    Reply
  11. skompdev

    Thanks for posting this article. The bugs with Ibeacons and the fact they have to be tested using real hardware makes developing apps with this technology so difficult. The 2 times i tried to demo my code for a client, it flaked out and didn’t range properly and really left a bad impression. Neither project go the go ahead and I’m still trying to get this code working properly……

    Reply
  12. Does anyone know if Apple released a patch to this iBeacon / iOS bug? We filed a bug report, but have not received an update from Apple.

    Reply
  13. I’m finding this bug as well on an iPhone 4s. Restarting the phone sometimes works, but sometimes doesn’t. Combine this with the fact that iOS can take up to 15 minutes to detect and deliver a message to a backgrounded app makes debugging very tough!

    It can be tough to know whether it is the iOS bug or you just have to give the device a little more time. I’m meant to be giving demos of apps to potential clients and can’t have it failing like this.

    Come on Apple, let’s have a fix!

    Reply
  14. Actually really glad to find this article as we have been trying hard to get beacon messaging to work too. I have tested with iOS 8 but it is still not working properly. Hope for a quick fix very soon.

    Reply
  15. Normann

    This issue has really drove me mad!
    Some of my test-device did not respond to any beacon ranging at all. But on most of them everythin worked fine. I had different iOS Versions and different device generation. The problems were not related to any device or iOS Version, including 7.1.2. But as someone mentioned before, the bug is related to the background app refresh setting in the main settings. On all devices where my beacons were dead, the background app refresh was disabled. After enabling it everything was peferct.
    So as a workaround I now check on app-start, if this setting is disabled. When it is disabled, I present an alert view and notice the user, that only by activating this setting, he can have the full app experience…hope this helps

    Reply

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>