tbryant / brewometer-cordova

Brewometer cordova app
6 stars 1 forks source link

Android App Fails to Post Data to the Cloud #3

Open noahbaron opened 7 years ago

noahbaron commented 7 years ago

Device was Galaxy Tab 10.5 reported to post data ok for previous version of app.

tbryant commented 7 years ago

I'm not seeing this on a Nexus 6, seems to work as before.

would be good to know if the Cloud URL is complete and correct: image

here is the Sandbox url from the blog post for convenience: SANDBOX Cloud App URL (copy and paste into iOS/Android Brewometer App):

https://script.google.com/macros/s/AKfycbzKkh8UrtqZnEjpYmJW9UZHcQ1eFOyTlxQHtfGqoBwzQXB89P4/exec

SANDBOX Google Sheet (Read-Only) click to view and chart data:

https://docs.google.com/spreadsheets/d/1DXZSoJPorKAKdxDc_es6GM5EaFUM2pFW2x0VUwEheyM/edit?usp=sharing

tbryant commented 7 years ago

Based on some feedback from a customer with a Nexus 4, Android 5.1.1 - I have been using the app with a debugger connected - I haven't replicated the issue, but I have seen some strange looking log entries related to org.altbeacon.beacon.service.BeaconService

11-27 16:06:02.952 549-921/? I/ActivityManager: START u0 {act=android.intent.action.MAIN flg=0x10000000 cmp=com.baronbrew.tiltcordova/.Brewometer} from uid 2000 on display 0
11-27 16:06:03.016 549-2348/? I/ActivityManager: Start proc 7006:com.baronbrew.tiltcordova/u0a88 for activity com.baronbrew.tiltcordova/.Brewometer
11-27 16:38:32.304 549-1070/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.baronbrew.tiltcordova cmp=com.baronbrew.tiltcordova/.Brewometer} from uid 10018 on display 0
11-27 16:38:44.934 549-2347/? I/ActivityManager: Killing 7006:com.baronbrew.tiltcordova/u0a88 (adj 16): remove task
11-27 16:38:45.102 549-1300/? W/ActivityManager: Scheduling restart of crashed service com.baronbrew.tiltcordova/org.altbeacon.beacon.service.BeaconService in 1000ms
11-27 16:38:45.103 549-1300/? W/ActivityManager: Scheduling restart of crashed service com.baronbrew.tiltcordova/org.altbeacon.beacon.BeaconIntentProcessor in 11000ms
11-27 16:38:46.145 549-571/? I/ActivityManager: Start proc 11555:com.baronbrew.tiltcordova/u0a88 for service com.baronbrew.tiltcordova/org.altbeacon.beacon.service.BeaconService
11-27 16:38:57.770 549-934/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.baronbrew.tiltcordova/.Brewometer bnds=[40,185][200,385] (has extras)} from uid 10014 on display 0
11-27 16:39:01.514 549-921/? I/ActivityManager: Killing 11555:com.baronbrew.tiltcordova/u0a88 (adj 16): remove task
11-27 16:39:01.692 549-906/? W/ActivityManager: Scheduling restart of crashed service com.baronbrew.tiltcordova/org.altbeacon.beacon.service.BeaconService in 4000ms
11-27 16:39:05.732 549-571/? I/ActivityManager: Start proc 12011:com.baronbrew.tiltcordova/u0a88 for service com.baronbrew.tiltcordova/org.altbeacon.beacon.service.BeaconService
11-27 16:39:14.157 549-606/? I/ActivityManager: START u0 {act=android.intent.action.DELETE dat=package:com.baronbrew.tiltcordova flg=0x10800000 cmp=com.android.packageinstaller/.UninstallerActivity (has extras)} from uid 10014 on display 0
11-27 16:39:15.684 549-571/? I/ActivityManager: Force stopping com.baronbrew.tiltcordova appid=10088 user=-1: uninstall pkg
11-27 16:39:15.684 549-571/? I/ActivityManager: Killing 12011:com.baronbrew.tiltcordova/u0a88 (adj 8): stop com.baronbrew.tiltcordova
11-27 16:39:15.792 549-571/? W/ActivityManager: Scheduling restart of crashed service com.baronbrew.tiltcordova/org.altbeacon.beacon.service.BeaconService in 16000ms
11-27 16:39:15.793 549-571/? I/ActivityManager:   Force stopping service ServiceRecord{3c6140a9 u0 com.baronbrew.tiltcordova/org.altbeacon.beacon.service.BeaconService}
11-27 16:39:15.795 549-2304/? W/ActivityManager: Spurious death for ProcessRecord{1433ac72 12011:com.baronbrew.tiltcordova/u0a88}, curProc for 12011: null
11-27 16:39:15.980 549-582/? I/ActivityManager: Force stopping com.baronbrew.tiltcordova appid=10088 user=0: pkg removed
11-27 16:39:28.549 549-549/? W/BackupManagerService: Removing schedule queue dupe of com.baronbrew.tiltcordova
11-27 16:39:33.750 549-1289/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.baronbrew.tiltcordova cmp=com.baronbrew.tiltcordova/.Brewometer} from uid 10018 on display 0
11-27 16:39:33.863 549-2343/? I/ActivityManager: Start proc 12783:com.baronbrew.tiltcordova/u0a93 for activity com.baronbrew.tiltcordova/.Brewometer
tbryant commented 7 years ago

After further digging I have been able to reproduce the issue. I think the BeaconService has crashed. It looks like it's a bug in Android, and that google fixed it in Android 6.

Here is a relevant thread: https://github.com/AltBeacon/android-beacon-library/issues/289

noahbaron commented 7 years ago

Just read the post, looks like Android 5.x doesn't work reliably. Actually, on the 5.x device I have from Lenovo (5.0.1) I have another app toggling bluetooth every minute, otherwise the iBeacon scan will stop.

We should see if the Brewometer app really fixed this guy's issue, or it was just coincidence and it's having issues again.

On Sun, Nov 27, 2016 at 6:28 PM, Tyler Bryant notifications@github.com wrote:

After further digging I have been able to reproduce the issue. I think the BeaconService has crashed. It looks like it's a bug in Android, and that google fixed it in Android 6.

Here is a relevant thread: AltBeacon/android-beacon-library#289 https://github.com/AltBeacon/android-beacon-library/issues/289

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tbryant/brewometer-cordova/issues/3#issuecomment-263169736, or mute the thread https://github.com/notifications/unsubscribe-auth/ACGyhZ7hIE7--Hi6P5GqmaXDn-hUXb9Uks5rCjxXgaJpZM4KahNE .