WFS 1.4.20 - Ranged Value Complication BUG

When Steps Complication is used with Ranged Value complication it works fine till steps goal is reached. Once steps goal is reached, watch face goes into infinite loop between digital time and black screen. As soon as I lift the steps goal in S Health app, watch face will start working again.

Setting Steps goal sync to on / off does not help.

Also, why is this even happening? All other ranged value complications are working fine. Any Complication should be independent of watch face so why Samsung Steps complication is causing issues?

Note, this is not duplicate of previous [SC] bug report.

As soon as I rise the goal of the steps, the complication starts working.

What complication slot did you use for this or was this an old project that you updated? I tried to duplicate it but it didn’t work.

Also are you using Wear OS 4 the SC doesn’t sync with the One UI 3.5

Ron

To duplicate the issue:

  1. create new project.
  2. add circle complication.
  3. make ranged value layout default (move above short text).
  4. install on device.
  5. customize and set steps complication
  6. see if it works when steps goal is reached.

Issue occurs right after steps goal is reached. (See vid. 2)

This is latest firmware on Galaxy Watch4 but my users are reporting the same thing on GW5.

I’m using Wear OS 3.5. Afaik this shouldn’t be happening because custom complication from any app has it’s own min, max and value.


Freshly installed WFS 1.4.13 - New project, only time and Circle Complication slot.

screenshot_ 5-50-29screenshot_ 5-50-38screenshot_ 5-50-43

Works fine when steps goal is not reached.
screenshot_ 5-50-53

And this is what happens immediately after steps goal is reached. (Note, I’m changing steps goal manually because it’s hard to catch up on video while it occurs naturally but it occurs every time, not only when manually adjusted in S Health app.

What’s interesting is that this happens only when Ranged Value layout is default.

@catherina00 @sinjae
What can be causing this? I have other custom complications with RANGED_VALUE support and this is not happening when value = max. Maybe some issue between Watch face → Complication → S Health → new Health Services integration? But why only on Ranged Value? :thinking:

Best Regards

Tomas

So the issue is definitely something watch face related. This exception does not occur on the same watch face created with older WFS 1.3.13.

java.lang.IllegalArgumentException: value must be between min and max

 WireComplicationData.toApiComplicationData failed for ComplicationData{mType=5, mFields=Bundle[{FIELD_DATA_SOURCE=ComponentInfo{com.samsung.android.wear.shealth/com.samsung.android.wear.shealth.complications.steps.StepsComplicationProviderService}, MAX_VALUE=1000.0, MIN_VALUE=0.0, SHORT_TITLE=ComplicationText{mSurroundingText=REDACTED, mTimeDependentText=null, mStringExpression=null}, VALUE=1141.0, IMAGE_CONTENT_DESCRIPTION=ComplicationText{mSurroundingText=REDACTED, mTimeDependentText=null, mStringExpression=null}, TAP_ACTION=PendingIntent{dd96b9d: android.os.BinderProxy@ccad812}, SHORT_TEXT=ComplicationText{mSurroundingText=REDACTED, mTimeDependentText=null, mStringExpression=null}}]}
                                                                                                    java.lang.IllegalArgumentException: value must be between min and max
                                                                                                    	at j1.u$a.<init>(Unknown Source:90)
                                                                                                    	at j1.f.g(Unknown Source:284)
                                                                                                    	at g1.v0$a.emit(Unknown Source:44)
                                                                                                    	at v7.h.collect(Unknown Source:238)
                                                                                                    	at g1.v0.k(Unknown Source:37)
                                                                                                    	at h7.a.g(Unknown Source:7)
                                                                                                    	at t7.i0.run(Unknown Source:100)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:938)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loop(Looper.java:246)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7690)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)
2023-05-12 06:30:37.959  5708-5708  AndroidRuntime          [536889744340690]                    E  FATAL EXCEPTION: main
                                                                                                    Process: com.watchfacestudio.Test_4147697655774695536889744340690, PID: 5708
                                                                                                    java.lang.IllegalArgumentException: value must be between min and max
                                                                                                    	at j1.u$a.<init>(Unknown Source:90)
                                                                                                    	at j1.f.g(Unknown Source:284)
                                                                                                    	at g1.v0$a.emit(Unknown Source:44)
                                                                                                    	at v7.h.collect(Unknown Source:238)
                                                                                                    	at g1.v0.k(Unknown Source:37)
                                                                                                    	at h7.a.g(Unknown Source:7)
                                                                                                    	at t7.i0.run(Unknown Source:100)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:938)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loop(Looper.java:246)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7690)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)
                                                                                                    	Suppressed: t7.g0: [l1{Cancelling}@d7a635e, Handler (android.os.Handler) {17233f}.immediate]

This leads to multiple crashes… then the service is completely broken and complication slot cannot be used again

E  channel '95e7e07 com.samsung.android.wearable.watchfacestudio.WatchFaceStudioRuntime (server)' ~ Channel is unrecoverably broken and will be disposed!

RangedValueError.wfs.zip (164.3 KB)

Full Dump:
dumpState_R870XXU1GWD6_202305120744.zip (4.7 MB)

pid: com.watchfacestudio.Test_4147697655774695536889744340690

EDIT: Maybe this is something which needs to be finally fixed on S Health app side? Some simple check for value to not go over max value because new Watch Face Format | Android Developers cannot handle it correctly?

EDIT2: Based on GoalProgressComplicationData | Android Developers documentation,

RangedValueComplicationData is allowed to be larger than targetValue (e.g. you’ve done 12000 steps) and renderers may chose to acknowledge this in a special way (e.g. by colorizing part of the progress bar in a different color to indicate progress past the goal).

So looks like this can still be fixed on watch face side, or not? If not, because we use new Watch Face Format, S Health needs an update for this. Either switch to GoalProgressComplicationData.Builder or use some simple check for ranged value

val value = if (stepscount <= stepsgoal) stepscount else stepsgoal

EDIT3: I had to edit my HS Complication app too to have it working, but this obviously requires fix on watch face side because Ranged Value should be allowed to go above Max

Issue not resolved with WFS 1.4.19

RANGED_VALUE complication is unusable because watch face is getting force-closes (exceptions) when value is higher than max.

@amoledwatchfaces
Thank you for the detail report. Unfortunately, this is not a simple issue that Watch Face Studio can fix.
I hope it will be fixed in the next device S/W update for One UI 5.0.

Hi @sinjae , thanks for responding.

Cannot it be fixed even when it was working fine with 1.3.13?

Of course it could be fixed on Watch Software (S Health) side by adjusting value to not go over max but from the android documentation, watch face should be able to render progress bar even when the value is greater than max (leaving progress bar full for example, as before)

Hello. Can you tell me if the bugs reported on the beta version have been fixed or not?

Please check the release note to know about the fixes.

1 Like

From Android Developers documentation,

RangedValueComplicationData is allowed to be larger than targetValue (e.g. you’ve done 12000 steps) and renderers may chose to acknowledge this in a special way (e.g. by colorizing part of the progress bar in a different color to indicate progress past the goal).

Renderer = watch face = WFS.

S Health will be adjusted like this in the future:

value = if (stepscount <= stepsgoal) stepscount else stepsgoal

(value equal to targetvalue when steps goal is reached)


Problem is that the issue will be there no matter the S Health app / software fix.
When there is some 3rd party app which allows value to be higher than targetValue, our watch faces will have constant force-stops.

I’d like to add on to this a little bit.

I tried to replicate the bug. But in my case, the circle complication has only the RANGED_VALUE type.

When you put the steps from Samsung Health and it exceeds the Steps Goal, my watchface did not crash. However, the RANGED_VALUE Steps complication freezes.

The SHORT_TEXT version continues to update and count, but the RANGED_VALUE version stops. If you reboot your watchface (or switch to another one and switch back), with your steps goal having reached already, the RANGED_VALUE Steps complication from Samsung Health is completely blank.

Something also I think it is worth to mention.
If you put the SHORT_TEXT type as the default layout and the RANGED_VALUE after, the Steps complication that is prioritized seems to be the SHORT_TEXT version. I am also guessing that it is the case because I happened to hide the progress bar for the RANGED_VALUE layout.

This could be a way to mitigate the issue, for now and to prevent crashes.

Hi. Problem is definitely in the progress bar rendering. Watch face does not take into account the situation when the value exceeds max value. You can check logcat and you will see the same error.

1200 steps >= 1000 steps goal.

Watch face should take this into account and show full progress bar but right now, it’s not properly implemented and watch face crashes. (3x complication crash, then watch face is force stopped and started with complication slot being empty or frozen)

Now, they can, of course, do a little trick on S Health app side (firmware) and change Ranged Value complication code so the value will equal max value when steps >= stepsgoal.

That would solve issues with steps complication but there are also other 3rd party apps that could potentially provide same value combo (for example some weather app will show weather feels like temp of 25° while min for current day is 5° and max is 20°. This will again result in crashes.

So, right now, we can prioritize short_text over ranged_value but when you have some watch face which was specially built with ranged_value complication, it won’t be a good idea to update it. Me, personally have a lot of these and I simply can’t update right now.

Progress bar steps complication is really basic thing and it should work properly without any crashes.

1 Like

Hi amoledwatchfaces, could you tell me which app you used to record watch screen?

Hi.

I’m using adb

Start recording

adb shell “screenrecord /sdcard/screenrecord.mp4”

Stop recording

press Ctrl + C on keyboard and confirm with ‘Y’

Pull video from watch and remove it from watch sdcard

adb pull /sdcard/screenrecord.mp4
adb shell “rm /sdcard/screenrecord.mp4”

2 Likes

Woa, thanks so much!

I believe this is resolved in an upcoming update. However, I don’t have any ideas when that will be released.

Ron
Samsung Developer Relations

Yes, it was mentioned in the support request reply. Hopefully they’ll release new version soon.

I’m using Ranged Value complication in multiple watch faces and this prevents me from publishing updates. Every other user uses S Health steps goal complication to see progress of the goal. I can’t let them getting watch face force closes.

Wish there was some alpha testing whatever version, but still, great work from WFS dev team.

Anyone with a Galaxy Watch6 to test if by any chance the problem was solved?

Received this reply from support

But can’t confirm this on Wear OS 3.5. Issue is still there.
Latest S Health; Version 6.23.5.008

Tomas

@amoledwatchfaces

Yes, it has been fixed.

Look at this screenshot, on the left side, I’ve used the RANGED VALUE complication.

Screenshot_20230729_190023_sysui

Goals are set at 8000 steps on S-Health.

version 6.24.1.035

1 Like

Thanks for reporting Matteo! Really appreciated :slight_smile:

Looks like Samsung engineers capped RV value to not go over steps goal. It’s 50% fix as there may be other custom complications with values higher than max (for example other exercise oriented apps). Hard to say it it’s really ‘unfixable’ in the WFS.

1 Like