Skip to content
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

Latest Steps Not Added To DB/Graph? #145

Closed
thevirtuoso1973 opened this issue Feb 21, 2021 · 30 comments
Closed

Latest Steps Not Added To DB/Graph? #145

thevirtuoso1973 opened this issue Feb 21, 2021 · 30 comments
Assignees
Labels
bug Something isn't working priority:high

Comments

@thevirtuoso1973
Copy link
Collaborator

https://trello.com/c/i2mA7CAL/97-it-does-not-appear-to-be-registering-my-movement

This seems related, from Sentry:

PlatformException: PlatformException(error, No active stream to cancel, null, null)
  File "message_codecs.dart", line 582, in StandardMethodCodec.decodeEnvelope
  File "platform_channel.dart", line 159, in MethodChannel._invokeMethod
  File "<asynchronous suspension>"
  File "platform_channel.dart", line 552, in EventChannel.receiveBroadcastStream.<fn>
  File "<asynchronous suspension>"
  File "unparsed"
@thevirtuoso1973 thevirtuoso1973 added bug Something isn't working priority:high labels Feb 21, 2021
@thevirtuoso1973 thevirtuoso1973 added this to To do in Implementation via automation Feb 21, 2021
@thevirtuoso1973 thevirtuoso1973 changed the title Not Tracking Steps? Graph Not Tracking Steps? Feb 21, 2021
@thevirtuoso1973
Copy link
Collaborator Author

Ok as shown here, his steps are indeed being tracked but not being added to the graph.

@thevirtuoso1973 thevirtuoso1973 changed the title Graph Not Tracking Steps? Latest Steps Not Added To DB/Graph? Feb 21, 2021
@saachipahwa
Copy link
Collaborator

The steps don't get added to the graph. I thought previously it was because the steps are so little so they just appear as 0 but I guess not

@thevirtuoso1973
Copy link
Collaborator Author

The steps don't get added to the graph. I thought previously it was because the steps are so little so they just appear as 0 but I guess not

Hmm that is interesting, did you test it 22 minutes ago (from time of my writing)? Because I just got the same PlatformException again in Sentry.

@thevirtuoso1973
Copy link
Collaborator Author

thevirtuoso1973 commented Feb 21, 2021

Was this after using the testing page to schedule the checkup?

@saachipahwa
Copy link
Collaborator

Was this after using the testing page to schedule the checkup?

No it was by rescheduling in settings

@thevirtuoso1973
Copy link
Collaborator Author

Was this after using the testing page to schedule the checkup?

No it was by rescheduling in settings

Okay can you work on this, it's the priority for now. I can't reproduce it.

@saachipahwa
Copy link
Collaborator

saachipahwa commented Feb 22, 2021

Doesn't add the steps to the graph even when I use the Wellbeing Check Screen button in Testing

@thevirtuoso1973
Copy link
Collaborator Author

Review #151, it may fix it.

@saachipahwa
Copy link
Collaborator

I did, that's what I was testing

@saachipahwa
Copy link
Collaborator

saachipahwa commented Feb 22, 2021

Using WellbeingCheck Notification button in testing, I get this.

W/System (11762): A resource failed to call release.
I/flutter (11762): ══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞══════════════════════════════════════════════════════════
I/flutter (11762): The following PlatformException was thrown while de-activating platform stream on channel
I/flutter (11762): step_count:
I/flutter (11762): PlatformException(error, No active stream to cancel, null, null)
I/flutter (11762):
I/flutter (11762): When the exception was thrown, this was the stack:
I/flutter (11762): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:582:7)
I/flutter (11762): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:18)
I/flutter (11762):
I/flutter (11762): #2 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
I/flutter (11762): #3 EventChannel.receiveBroadcastStream. (package:flutter/src/services/platform_channel.dart:552:29)
I/flutter (11762): #4 EventChannel.receiveBroadcastStream. (package:flutter/src/services/platform_channel.dart:549:18)
I/flutter (11762): #14 _StreamBuilderBaseState._unsubscribe (package:flutter/src/widgets/async.dart:158:21)
I/flutter (11762): #15 _StreamBuilderBaseState.dispose (package:flutter/src/widgets/async.dart:133:5)
I/flutter (11762): #16 StatefulElement.unmount (package:flutter/src/widgets/framework.dart:4854:12)
I/flutter (11762): #17 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1998:13)
I/flutter (11762): #18 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #19 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #20 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #21 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #22 MultiChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6218:16)
I/flutter (11762): #23 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #24 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #25 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6105:14)
I/flutter (11762): #26 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #27 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #28 MultiChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6218:16)
I/flutter (11762): #29 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #30 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #31 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6105:14)
I/flutter (11762): #32 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #33 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #34 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #35 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #36 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #37 MultiChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6218:16)
I/flutter (11762): #38 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #39 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #40 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #41 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #42 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #43 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6105:14)
I/flutter (11762): #44 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #45 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #46 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #47 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #48 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #49 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #50 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #51 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #52 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #53 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #54 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #55 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #56 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #57 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #58 MultiChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6218:16)
I/flutter (11762): #59 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #60 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #61 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #62 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #63 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #64 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #65 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #66 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #67 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #68 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #69 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #70 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6105:14)
I/flutter (11762): #71 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #72 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #73 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #74 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #75 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #76 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6105:14)
I/flutter (11762): #77 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #78 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #79 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #80 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #81 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #82 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #83 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #84 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #85 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #86 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #87 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #88 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #89 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #90 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #91 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #92 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #93 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1996:7)
I/flutter (11762): #94 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4681:14)
I/flutter (11762): #95 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1994:13)
I/flutter (11762): #96 ListIterable.forEach (dart:_internal/iterable.dart:39:13)
I/flutter (11762): #97 _InactiveElements._unmountAll (package:flutter/src/widgets/framework.dart:2007:25)
I/flutter (11762): #98 BuildOwner.finalizeTree. (package:flutter/src/widgets/framework.dart:2821:27)
I/flutter (11762): #99 BuildOwner.lockState (package:flutter/src/widgets/framework.dart:2621:15)
I/flutter (11762): #100 BuildOwner.finalizeTree (package:flutter/src/widgets/framework.dart:2820:7)
I/flutter (11762): #101 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:915:18)
I/flutter (11762): #102 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:302:5)
I/flutter (11762): #103 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15)
I/flutter (11762): #104 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1055:9)
I/flutter (11762): #105 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:971:5)
I/flutter (11762): #109 _invoke (dart:ui/hooks.dart:251:10)
I/flutter (11762): #110 _drawFrame (dart:ui/hooks.dart:209:3)
I/flutter (11762): (elided 12 frames from dart:async)
I/flutter (11762): ════════════════════════════════════════════════════════════════════════════════════════════════════

Later, as I move the phone:

W/FlutterJNI(11762): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: step_count. Response ID: 0
I/chatty (11762): uid=10302(com.ucl.nudge_me) identical 10 lines
W/FlutterJNI(11762): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: step_count. Response ID: 0
W/FlutterJNI(11762): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: step_count. Response ID: 0
I/chatty (11762): uid=10302(com.ucl.nudge_me) identical 10 lines
W/FlutterJNI(11762): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: step_count. Response ID: 0
W/FlutterJNI(11762): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: step_count. Response ID: 0
I/chatty (11762): uid=10302(com.ucl.nudge_me) identical 8 lines
W/FlutterJNI(11762): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: step_count. Response ID: 0
W/FlutterJNI(11762): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: step_count. Response ID: 0
I/chatty (11762): uid=10302(com.ucl.nudge_me) identical 8 lines
W/FlutterJNI(11762): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: step_count. Response ID: 0

@thevirtuoso1973
Copy link
Collaborator Author

The platform detached message should be fine to ignore for now.

When does that Platform exception occur, after you press the done button? Does everything look normal from the user's perspective (e.g. the steps load)?

@saachipahwa
Copy link
Collaborator

saachipahwa commented Feb 22, 2021

The platform detached message should be fine to ignore for now.

When does that Platform exception occur, after you press the done button? Does everything look normal from the user's perspective (e.g. the steps load)?

I think yes. Yeah everything looks normal. What do you mean by steps load? The step count increases as I move the phone and after checkup, goes back to 0 like it should

@saachipahwa
Copy link
Collaborator

No, the exception appears when I click on the wellbeing page after checkup

@thevirtuoso1973
Copy link
Collaborator Author

thevirtuoso1973 commented Feb 22, 2021

No, the exception appears when I click on the wellbeing page after checkup

That's interesting. You may want to print out the list of wellbeing items like so in wellbeing_graph.dart line 215:

          if (snapshot.hasData) {
            final items = snapshot.data;
            print(items);
            final graph = _getGraph(items, widget.animate);
            final buttons = [

to determine if it's a problem with the graph library or our adding to the DB.

Anyway I shall leave it to your judgement for now, but let me know if help is needed.

@saachipahwa
Copy link
Collaborator

It prints out the right amount of steps, so it's being added to the DB correctly. So it's an issue with the graph library

@saachipahwa
Copy link
Collaborator

saachipahwa commented Feb 22, 2021

When I get rid of ..setAttribute(charts.measureAxisIdKey, 'secondaryMeasureAxisId'); on line 145 of wellbeing_graph.dart, it fixes it - steps are displayed

@thevirtuoso1973
Copy link
Collaborator Author

Hmm that's a little suspicious. Removing that would remove the green annotation on the graph, and scale down the graph.
So it sounds like it may have just been really small on the graph?

@saachipahwa
Copy link
Collaborator

But the same amount of steps show up on the iPhone graph

@thevirtuoso1973
Copy link
Collaborator Author

Oh so this problem only occurs on the Android 10 device?

@saachipahwa
Copy link
Collaborator

saachipahwa commented Feb 22, 2021

Yeah, think so. Gonna double check by running it on the iPhone with the new changes one sec

Edit: never mind, it doesn't show up on iPhone either

@saachipahwa
Copy link
Collaborator

saachipahwa commented Feb 22, 2021

I'll carry around the android phone and try again later today when the steps are higher? Or i could just insert a wb item

@thevirtuoso1973

This comment has been minimized.

@thevirtuoso1973
Copy link
Collaborator Author

thevirtuoso1973 commented Feb 22, 2021

@saachipahwa Yes try generating a wellbeing item(s) first from testing page and also try performing a checkup after actually walking.

@saachipahwa
Copy link
Collaborator

I increased the intro screen checkup steps to 1000 and it shows up so not a graph library issue?

Here https://trello.com/c/FbI4WhLm/98-home-button-recognises-movement-by-it-is-not-graphed#action-603268d478d174240c4363ef it looks like his steps isn't reset, although he hasn't explicitly said that he just performed a checkup.

Can you reproduce this/seen this before?

No, every time I do a checkup it has reset

@saachipahwa
Copy link
Collaborator

Generating from testing page works fine! steps show up on the graph

Yep I'll do some walking and see

@thevirtuoso1973
Copy link
Collaborator Author

I'm starting to think there wasn't an issue to begin with, although we should still prob fix that PlatformException.

@saachipahwa
Copy link
Collaborator

His steps should've showed up on his graph, though. Guess we can ask him to show us what he did tomorrow

@saachipahwa
Copy link
Collaborator

I walked a lot today, did a checkup, and the steps showed up on the graph

@thevirtuoso1973
Copy link
Collaborator Author

thevirtuoso1973 commented Feb 23, 2021

His steps should've showed up on his graph, though. Guess we can ask him to show us what he did tomorrow

One explanation for this is if he performed a couple checkups (e.g. using testing page) at the same time, so his steps would have been zero. Especially if he just installed the app.

@thevirtuoso1973
Copy link
Collaborator Author

He has agreed with my explanation. Closing for now.

Implementation automation moved this from To do to Done Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:high
Projects
No open projects
Development

No branches or pull requests

2 participants