-
Notifications
You must be signed in to change notification settings - Fork 317
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
Crashing on multiple geofencing adds while in a geofence #113
Comments
@Tempus35 were you able to solve/figure this out? I'm receiving the same error when the app goes in the background for too long. |
@bromeostasis are you using the iOS or Android code? |
@Tempus35 Android. |
@Tempus35 wow as I was typing this, I got the error again when initializing our app.
|
@bromeostasis So I am trying to remember how I fixed my issue. I know it has to do with the SQL connection being closed and so it errors. The function that errors is in the GeoNotificationStore when it tries to save to localstorage (ie in this case sqlite as localstorage). It might have been fixed in the changes I made to GeoNotificationNotifier, see my PR #116. I change the way the intent is setup allow it to run in the background and open differently. |
@Tempus35 great, giving it a shot! It's been a fairly difficult issue to reproduce, but I'll try it and let you know how it goes. |
@bromeostasis nah it is referring to a function I changed in another place, change that line back to .setAutoCancel(true) and try again. |
@Tempus35 hehe yeah I realized that and deleted my comment :D I added the autocancel parameter to Notification.java and got the build to work. Unfortunately, I'm still seeing the error as soon as I start adding fences! I only copied over the GeoNotificationNotifier.java code (plus the Notification.java fix). Do you recommend I grab the entire PR? |
@bromeostasis nah, that PR was not fulling finished, I will look back through my last code I made and see if there was anything else that might have been a fix for that. |
@Tempus35 thanks so much, I really appreciate it! |
@Tempus35 by the way, this:
means that the issue also happens in the foreground. Just wanted to let you know since you mentioned
|
@bromeostasis So one thing I read about while doing some quick research as well is that if you replace line 52 in LocalStorageDBHelper ( public static LocalStorageDBHelper getInstance(Context ctx) ) to public static synchronized LocalStorageDBHelper getInstance(Context ctx) See if that helps, while I continue to look around. |
@Tempus35 thanks! I actually rebuilt the GeoNotificationNotifier changes and haven't seen the error since. I'm thinking my dropbox may have had an old version so I didn't actually get the changes on my device. I'm gonna leave those changes up for the evening to test it out. If I get the error again, I'll definitely try adding the synchronized keyword and ask for your help once more! |
@bromeostasis Not a problem, I have had a couple issues with this plugin and more than happy to share what I found out. |
@Tempus35 cool, much appreciated! ✌️ |
@Tempus35 unfortunately, I'm seeing more of this problem today on my Android 4 device (have yet to see it on Android 5 since Java changes). It happens when I log into our app, which does subsequently add a lot of geofences, and I am definitely inside of one. More verbose logs (locations/names removed) :
|
@Tempus35 any thoughts on the continuing failure? I've still seen my app crash in the foreground like above ☝️ and in the background (though not 100% sure this is the cause for the background failure, but like 75% 😄 ). |
@bromeostasis I am at a lose really, I know it has to do with the database and storage, ie the database is closed and then it tries to use it only to crash. Maybe there would be a way to check for the closed DB, then reopen if it is. When I get more time, hopefully soon, I can try looking more. |
@Tempus35 thanks for the feedback. I'm looking at removing the database.close() instances as I've found a couple of sites that indicate they aren't necessary! http://touchlabblog.tumblr.com/post/24474750219/single-sqlite-connection I'll let you know how it goes! |
@Tempus35 hello again! Any chance you've seen/had any experience with this latest failure? #139 Really stumped on this one and it's causing our app to fail after a fewd ays in the background. Thanks! |
I have not experienced those, I have not had to test running through many geofences in a period of time though. |
@Tempus35 ok thanks for the response :D |
@bromeostasis Yup, if I come across something I will post. I have not been using the plugin much of later since the current app I am now working on does not need it. |
@bromeostasis @Tempus35 I just opened this Issue #158 It looks like this one is related even though its been closed? |
@Tempus35 @bromeostasis I am facing the same issue. Have you found any solution to this problem? |
@nabinkumarn @mhfen it's been a while since I've looked at this, but I believe removing the We're still struggling with #139 to this day, but I don't think we're seeing this issue anymore. |
@bromeostasis Thanks for the response. I removed all the |
@nabinkumarn great, glad it worked out! |
I am having the app crash when multiple geofences (6+) are added using addOrUpdate function while I am currently in a geofence. I am using plugin version 0.5.0.
The text was updated successfully, but these errors were encountered: