Open pradeepiisc opened 6 years ago
Was it an error in SyncAdapter.java line number 36 ? ( can you see the logs), I addressed one such issue in the Pull request raised. To answer your question, the flow is : SyncAdapter is the class responsible for syncing, inside that the onPerformSync function is always called whenever Syncadapter.onPerformSync on I think sync thread. So, to see how syncing happens, go through syncSensorData(..) function in the SyncAdapter file. The idea is to convert raw readings into smaller aggregates per duration (something like 5 minutes), and sync them ...
2018-10-04 00:29:05.734 3244-3244/? D/Rajesh: 78
2018-10-04 00:29:05.743 2191-2191/? I/LatinIme: onActivate() : EditorInfo = Package = co.siempo.phone : Type = Text : Learning = Enable : Suggestion = Hide : AutoCorrection = Enable : Microphone = Show : NoPersonalizedLearning = Disable
2018-10-04 00:29:05.748 2191-2191/? W/VoiceImeTranscriptor: UIME feature enabled: true
2018-10-04 00:29:05.750 2191-2191/? W/VoiceImeTranscriptor: UIME feature enabled: true
2018-10-04 00:29:05.757 1334-1421/? D/CompatibilityInfo: mCompatibilityFlags - 10
2018-10-04 00:29:05.757 1334-1421/? D/CompatibilityInfo: applicationDensity - 420
2018-10-04 00:29:05.757 1334-1421/? D/CompatibilityInfo: applicationScale - 1.0
2018-10-04 00:29:05.767 1334-1421/? D/CompatibilityInfo: mCompatibilityFlags - 10
2018-10-04 00:29:05.767 1334-1421/? D/CompatibilityInfo: applicationDensity - 420
2018-10-04 00:29:05.767 1334-1421/? D/CompatibilityInfo: applicationScale - 1.0
2018-10-04 00:29:05.768 2191-2191/? I/Conv2QueryExtension: Current locale: en_IN, config allows these locales: de,en,fr,it,es,pt
2018-10-04 00:29:05.768 2191-2191/? I/Conv2QueryExtension: Conv2Query not enabled due to current app [co.siempo.phone] not in whitelist
2018-10-04 00:29:05.768 2191-2191/? I/Conv2QueryExtension: onActivate() : Disabled by unsupported host app
2018-10-04 00:29:05.768 2191-2191/? W/VoiceImeTranscriptor: UIME feature enabled: true
2018-10-04 00:29:05.772 2211-2211/? I/NavigationBarTransitions: applyDarkIntensity darkIntensity: 0.0 buttonDispatchers.size(): 6
2018-10-04 00:29:05.772 2211-2211/? I/ButtonDispatcher: setVisibility() : visibility = 0 mVisibility = 4 mIsTemporaryInvisible = false this = com.android.systemui.statusbar.phone.ButtonDispatcher@7049ab3
2018-10-04 00:29:05.772 2211-2211/? I/ButtonDispatcher: setVisibility() : mVisibility = 0 this = com.android.systemui.statusbar.phone.ButtonDispatcher@7049ab3
2018-10-04 00:29:05.772 2211-2211/? I/ButtonDispatcher: setVisibility() : visibility = 4 mVisibility = 4 mIsTemporaryInvisible = false this = com.android.systemui.statusbar.phone.ButtonDispatcher@a60022
2018-10-04 00:29:05.772 2211-2211/? I/ButtonDispatcher: setVisibility() : visibility = 4 mVisibility = 4 mIsTemporaryInvisible = false this = com.android.systemui.statusbar.phone.ButtonDispatcher@d8a9870
2018-10-04 00:29:05.773 2363-18245/? E/NetworkScheduler: Invalid component specified.
2018-10-04 00:29:05.773 2211-2211/? I/ButtonDispatcher: setVisibility() : visibility = 0 mVisibility = 0 mIsTemporaryInvisible = false this = com.android.systemui.statusbar.phone.ButtonDispatcher@fd0d417
2018-10-04 00:29:05.773 2211-2211/? I/ButtonDispatcher: setVisibility() : visibility = 0 mVisibility = 0 mIsTemporaryInvisible = false this = com.android.systemui.statusbar.phone.ButtonDispatcher@d538004
2018-10-04 00:29:05.773 2211-2211/? I/ButtonDispatcher: setVisibility() : visibility = 0 mVisibility = 0 mIsTemporaryInvisible = false this = com.android.systemui.statusbar.phone.ButtonDispatcher@4a6e9ed
2018-10-04 00:29:05.774 2211-2211/? I/StatusBar/NavBarView: setDisabledFlags disabledFlags: 0 disableBack: false disableHome: false disableRecent: false
2018-10-04 00:29:05.774 2211-2211/? I/NavigationBarTransitions: applyDarkIntensity darkIntensity: 0.0 buttonDispatchers.size(): 6
2018-10-04 00:29:05.781 2191-3681/? E/native: personalized-decoder.cc:769 Cannot create graph rescoring model.
2018-10-04 00:29:05.809 2191-2191/? I/FeaturePermissions: onSharedPreferenceChanged() : Key = pref_key_latest_ime_activation_time : Feature = null
2018-10-04 00:29:05.810 2191-2191/? I/FeaturePermissions: onSharedPreferenceChanged() : Key = latest_activation_time : Feature = null
2018-10-04 00:29:06.122 20833-20964/com.curefit.sensorapp:sync I/FirebaseAuth: [FirebaseAuth:] Loading module via FirebaseOptions.
2018-10-04 00:29:06.123 20833-20964/com.curefit.sensorapp:sync I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation
2018-10-04 00:29:06.301 2413-2413/? W/ResourceType: No package identifier when getting value for resource number 0x00000000
2018-10-04 00:29:06.303 2211-2360/? D/NetworkController.MobileSignalController(5): updateTelephony: hasService=true ss=SignalStrength: 99 0 -120 -160 -120 -1 -1 25 -95 -11 12 2147483647 0 2147483647 gsm|lte 99 99
2018-10-04 00:29:06.303 2211-2360/? I/NetworkController.MobileSignalController(5): updateVoiceNetworkType voiceNetType: 13 mCurrentState.connected: true
2018-10-04 00:29:06.308 2211-2360/? I/NetworkController.MobileSignalController(5): isShowSXLTEStyle: false isRoaming: false
2018-10-04 00:29:06.470 2191-2191/? I/PhenotypeExpConfig: refreshConfiguration() : Force = false : UpdateAvailable = false : Age = 34 minutes : MaxAge = 720 minutes
2018-10-04 00:29:06.472 2191-2191/? I/LatinIme: onDeactivate()
2018-10-04 00:29:06.474 1334-3221/? I/ActivityManager: Send message START_OTA_APP_MSG to handler
2018-10-04 00:29:06.475 1334-1421/? I/ActivityManager: Handle message START_OTA_APP_MSG ...
2018-10-04 00:29:06.475 1334-3221/? D/ActivityManager: userId2 =0
2018-10-04 00:29:06.475 1334-1421/? I/ActivityManager: Message Object: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.curefit.sensorapp cmp=com.curefit.sensorapp/.MainActivity }
2018-10-04 00:29:06.476 1334-1421/? I/ActivityManager: Candidate Number: 1
2018-10-04 00:29:06.476 1334-1421/? I/ActivityManager: APP OTA intent - Intent { act=com.evenwell.OTAUpdate.CHECK_APP_OTA flg=0x10000000 pkg=com.evenwell.OTAUpdate (has extras) }
2018-10-04 00:29:06.476 1334-1421/? I/ActivityManager: APP OTA intent extras - Bundle[{ORG_INTENT=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.curefit.sensorapp cmp=com.curefit.sensorapp/.MainActivity }, PKG_NAME=com.curefit.sensorapp}]
2018-10-04 00:29:06.476 1334-3221/? D/ActivityManager: resolveActivity - rInfo =ResolveInfo{1d0c72f com.curefit.sensorapp/.MainActivity m=0x0}
2018-10-04 00:29:06.476 2211-2211/? I/NavigationBarTransitions: applyDarkIntensity darkIntensity: 0.0 buttonDispatchers.size(): 6
2018-10-04 00:29:06.476 2211-2211/? I/ButtonDispatcher: setVisibility() : visibility = 4 mVisibility = 0 mIsTemporaryInvisible = false this = com.android.systemui.statusbar.phone.ButtonDispatcher@7049ab3
2018-10-04 00:29:06.476 1334-1421/? I/ActivityManager: OTA_APP activity started.
2018-10-04 00:29:06.476 2211-2211/? I/ButtonDispatcher: setVisibility() : mVisibility = 4 this = com.android.systemui.statusbar.phone.ButtonDispatcher@7049ab3
2018-10-04 00:29:06.477 2211-2211/? I/ButtonDispatcher: setVisibility() : visibility = 4 mVisibility = 4 mIsTemporaryInvisible = false this = com.android.systemui.statusbar.phone.ButtonDispatcher@a60022
2018-10-04 00:29:06.477 2211-2211/? I/ButtonDispatcher: setVisibility() : visibility = 4 mVisibility = 4 mIsTemporaryInvisible = false this = com.android.systemui.statusbar.phone.ButtonDispatcher@d8a9870
2018-10-04 00:29:06.482 1334-1421/? D/CompatibilityInfo: mCompatibilityFlags - 0
2018-10-04 00:29:06.482 1334-1421/? D/CompatibilityInfo: applicationDensity - 420
2018-10-04 00:29:06.482 1334-1421/? D/CompatibilityInfo: applicationScale - 1.0
2018-10-04 00:29:06.483 1334-3221/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.curefit.sensorapp cmp=com.curefit.sensorapp/.MainActivity} from uid 10249
2018-10-04 00:29:06.485 5735-5735/? D/OTAUpdate: [OTAReceiver] Receive action: com.evenwell.OTAUpdate.CHECK_APP_OTA
2018-10-04 00:29:06.486 5735-5735/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1476 android.content.ContextWrapper.startService:650 android.content.ContextWrapper.startService:650 com.evenwell.OTAUpdate.OTAReceiver.invokeCheckAPPOTA:332 com.evenwell.OTAUpdate.OTAReceiver.onReceive:189
2018-10-04 00:29:06.498 1334-3221/? D/ActivityTrigger: activityStartTrigger: Activity is Triggerred in full screen ApplicationInfo{b1c6d27 com.curefit.sensorapp}
2018-10-04 00:29:06.499 1334-3221/? E/ActivityTrigger: activityStartTrigger: not whiteListedcom.curefit.sensorapp/com.curefit.sensorapp.MainActivity/1
2018-10-04 00:29:06.499 1334-3221/? D/CompatibilityInfo: mCompatibilityFlags - 0
2018-10-04 00:29:06.499 1334-3221/? D/CompatibilityInfo: applicationDensity - 420
2018-10-04 00:29:06.499 1334-3221/? D/CompatibilityInfo: applicationScale - 1.0
2018-10-04 00:29:06.500 1334-3221/? D/ActivityTrigger: activityResumeTrigger: The activity in ApplicationInfo{b1c6d27 com.curefit.sensorapp} is now in focus and seems to be in full-screen mode
2018-10-04 00:29:06.500 1334-3221/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.curefit.sensorapp/com.curefit.sensorapp.MainActivity/1
2018-10-04 00:29:06.500 1334-3221/? D/ActivityTrigger: ActivityTrigger activityPauseTrigger
2018-10-04 00:29:06.503 2211-2211/? I/ButtonDispatcher: setVisibility() : visibility = 0 mVisibility = 0 mIsTemporaryInvisible = false this = com.android.systemui.statusbar.phone.ButtonDispatcher@fd0d417
2018-10-04 00:29:06.503 2211-2211/? I/ButtonDispatcher: setVisibility() : visibility = 0 mVisibility = 0 mIsTemporaryInvisible = false this = com.android.systemui.statusbar.phone.ButtonDispatcher@d538004
2018-10-04 00:29:06.503 2211-2211/? I/ButtonDispatcher: setVisibility() : visibility = 0 mVisibility = 0 mIsTemporaryInvisible = false this = com.android.systemui.statusbar.phone.ButtonDispatcher@4a6e9ed
2018-10-04 00:29:06.503 2211-2211/? I/StatusBar/NavBarView: setDisabledFlags disabledFlags: 0 disableBack: false disableHome: false disableRecent: false
2018-10-04 00:29:06.503 2211-2211/? I/NavigationBarTransitions: applyDarkIntensity darkIntensity: 0.0 buttonDispatchers.size(): 6
2018-10-04 00:29:06.504 5735-5735/? D/OTAUpdate: [OTAService] onStart() receive action: ACTION_CHECK_APP_OTA_SERVICE. status: STATUS_NONE(0)
2018-10-04 00:29:06.506 1334-2050/? I/PhoneWindow: isNeedChangeStatusBarColor taskInfo: [android.app.ActivityManager$RunningTaskInfo@e50f872] size: 1
2018-10-04 00:29:06.506 1334-2050/? I/PhoneWindow: isAPPNeedChangeSBColor pkgName: com.curefit.sensorapp needKeep: false
2018-10-04 00:29:06.506 1334-2050/? I/PhoneWindow: isNeedChangeStatusBarColor false
2018-10-04 00:29:06.507 5735-21143/? W/System.err: org.json.JSONException: End of input at character 0 of
2018-10-04 00:29:06.507 5735-21143/? W/System.err: at org.json.JSONTokener.syntaxError(JSONTokener.java:449)
2018-10-04 00:29:06.507 5735-21143/? W/System.err: at org.json.JSONTokener.nextValue(JSONTokener.java:97)
2018-10-04 00:29:06.507 5735-21143/? W/System.err: at org.json.JSONArray.
okay, I have put a breakpoint in onPerformSync(...) but it never came here. Issue could be in SyncUtils.java where on first launch it goes to the if (flag) { ... } section and on any subsequent launch, it goes to the else { } part where the error message is printed - "Sync Account Error"
That shouldn't happen, syncable is true by default, any way I merged the latest pull request to master, try pulling the changes and launch the app. If you still see a crash, please try sharing logs at the point crash is happening, i.e. your device being connected to the laptop, by cable. And try filtering the logs to ones corresponding to error, using filters in the logcat console. The above logs don't have any exception corresponding to the process run by the SensorApp, so they are not useful.
2018-10-04 01:37:35.350 1334-1427/? E/BatteryExternalStatsWorker: modem info is invalid: ModemActivityInfo{ mTimestamp=51142817 mSleepTimeMs=7766 mIdleTimeMs=-6183 mTxTimeMs[]=[0, 1, 337, 7, 15] mRxTimeMs=12383 mEnergyUsed=0}
2018-10-04 01:37:51.952 1334-1427/? E/BatteryExternalStatsWorker: no controller energy info supplied for wifi
2018-10-04 01:37:51.952 1334-1427/? E/BatteryExternalStatsWorker: no controller energy info supplied for bluetooth
2018-10-04 01:37:59.075 660-665/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'INTERFACE' not found
2018-10-04 01:37:59.075 660-665/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'STATE' not found
2018-10-04 01:37:59.075 660-665/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'TIME_NS' not found
2018-10-04 01:37:59.075 660-665/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found
2018-10-04 01:37:59.245 759-2346/? E/IzatSvc_ComboNetworkProvider: Exiting with error proc line 208 "1"
2018-10-04 01:38:08.043 1334-1422/? E/LightsService: Light requested not available on this device. 2
2018-10-04 01:38:09.449 1334-1427/? E/BatteryExternalStatsWorker: modem info is invalid: ModemActivityInfo{ mTimestamp=51176915 mSleepTimeMs=11672 mIdleTimeMs=-5113 mTxTimeMs[]=[0, 1, 280, 10, 13] mRxTimeMs=10620 mEnergyUsed=0}
2018-10-04 01:38:09.936 1334-6114/? E/ActivityTrigger: activityResumeTrigger: not whiteListedco.siempo.phone/co.siempo.phone.activities.DashboardActivity/12311
2018-10-04 01:38:10.070 775-775/? E/SurfaceFlinger: CaptureScreen: layer name = com.curefit.sensorapp/com.curefit.sensorapp.ViewDataActivity#0
2018-10-04 01:38:11.414 2363-30570/? E/NetworkScheduler: Invalid component specified.
2018-10-04 01:38:11.937 1334-2437/? E/ActivityTrigger: activityStartTrigger: not whiteListedcom.curefit.sensorapp/com.curefit.sensorapp.MainActivity/1
2018-10-04 01:38:11.938 1334-2437/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.curefit.sensorapp/com.curefit.sensorapp.MainActivity/1
2018-10-04 01:38:11.983 1334-17951/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.curefit.sensorapp/com.curefit.sensorapp.MainActivity/1
2018-10-04 01:38:12.033 2363-30570/? E/NetworkScheduler: Invalid component specified.
2018-10-04 01:38:12.085 2363-30570/? E/NetworkScheduler: Invalid component specified.
2018-10-04 01:38:12.124 2363-30570/? E/NetworkScheduler: Invalid component specified.
2018-10-04 01:38:12.149 2363-30570/? E/NetworkScheduler: Invalid component specified.
2018-10-04 01:38:13.801 1334-1422/? E/LightsService: Light requested not available on this device. 2
2018-10-04 01:38:16.178 29270-29270/com.curefit.sensorapp E/SensorApp: PerformSync called
2018-10-04 01:38:16.221 1334-5603/? E/ActivityTrigger: activityStartTrigger: not whiteListedcom.curefit.sensorapp/com.curefit.sensorapp.ViewDataActivity/1
2018-10-04 01:38:16.222 1334-5603/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.curefit.sensorapp/com.curefit.sensorapp.ViewDataActivity/1
2018-10-04 01:38:16.260 1334-5603/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.curefit.sensorapp/com.curefit.sensorapp.ViewDataActivity/1
2018-10-04 01:38:16.386 30602-30618/com.curefit.sensorapp:sync E/AndroidRuntime: FATAL EXCEPTION: SyncAdapterThread-1
Process: com.curefit.sensorapp:sync, PID: 30602
java.lang.ArrayIndexOutOfBoundsException: length=15; index=15
at com.curefit.sensorapp.data.AccDataContracted.
This has been fixed on latest master
java.lang.ArrayIndexOutOfBoundsException: length=63; index=63
at com.curefit.sensorapp.data.AccDataContracted.
Hmm, changes has size of n-1, and the loop runs till n-1, so the bug. May be you can change array to be of size n. Better, you should play with this file based on what kind of stats you need etc
Did these changes -> crash isn't there but data is not coming to the server/
2018-10-04 01:58:32.095 5957-5957/com.curefit.sensorapp:sync E/ActivityThread: Service com.curefit.sensorapp.services.SensorUpdateService has leaked IntentReceiver com.curefit.sensorapp.receivers.ScreenReceiver@ffdc0d8 that was originally registered here. Are you missing a call to unregisterReceiver()?
android.app.IntentReceiverLeaked: Service com.curefit.sensorapp.services.SensorUpdateService has leaked IntentReceiver com.curefit.sensorapp.receivers.ScreenReceiver@ffdc0d8 that was originally registered here. Are you missing a call to unregisterReceiver()?
at android.app.LoadedApk$ReceiverDispatcher.
some issue with registerReceiver(...) in SensorUpdateService.java file
com.curefit.sensorapp.services.SensorUpdateService.onStartCommand(SensorUpdateService.java:56)
Whenever the app tries to sync in background or when we open, it gives an error of "Sync Account Error". Could you give a small flow diagram of how the flow should be when sending data to server on app launch or when in background. This will make it easy to debug. Thanks