Watch face: intermittent Permission Required from animate() after returning from notifications

Hi,

I’m developing an unpublished Connect IQ watch face and testing it locally on my own watch. It is not available in the Connect IQ Store.

I’m trying to understand the correct lifecycle handling for restarting an animation after returning to the watch face.

Environment recorded in the attached device log:

  • tactix 8 51 mm AMOLED, device family fenix847mm

  • Firmware 23.40

  • ConnectIQ API 6.0.3

  • ConnectIQ runtime 6.0.2

Animation works after a wrist gesture. However, occasionally, after reading a notification (and pressing BACK to return to the watch face, a brief IQ error icon appears. The watch face then resumes without further interaction.

The device log records:

Error: Permission Required
Details: "Symbol 'animate' not available to 'Watch Face'"

The failing call path is:

onShow() → startLifecycleAnimation() → WatchUi.animate()

Before calling animate, my code checks that the display is HIGH, Application.getApp().isActive() is true, and the face is outside its known settings/editor/preview contexts. A catch for Lang.Exception does not intercept this failure.

One assumption in my current code may be wrong: onShow() derives a local sleeping flag from the display mode. I do not know whether a HIGH display necessarily means that the watch face itself is permitted to animate.

Could you clarify:

  1. Is there a supported way to check whether a watch face currently has permission to call animate, independently of display mode and isActive()?

  2. What is the correct callback or pattern for restarting animation after returning from notifications or another screen when no new OS onExitSleep() callback occurs?

  3. If restarting is not supported in that situation, should the face remain at the normal update rate until the next genuine wake event?

I’m not manually invoking onExitSleep(). Active animations are cancelled on hide, sleep and app-inactive transitions.

I’ve attached selected device-log entries with local paths and app identifiers omitted, plus an abridged code excerpt. The excerpt is not a standalone reproduction. The failure is intermittent on the physical watch.

I’m looking for guidance on the supported API behavior, rather than assuming this is a firmware bug.

Thank you.

Relevant entries transcribed from the device log.
Local Windows paths and application identifiers are omitted. These are selected log fields, not an unchanged copy of the complete original log.

Device: tactix 8 51 mm AMOLED (CIQ family fenix847mm)
Firmware-Version: 23.40
ConnectIQ-API-Version: 6.0.3
ConnectIQ-Version: 6.0.2

---
Error: Permission Required
Details: "Symbol 'animate' not available to 'Watch Face'"
Time: 2026-11-15T07:18:02Z
Stack (function names and source line numbers):
  startLifecycleAnimation — line 306
  onShow — line 241
---
Error: Permission Required
Details: "Symbol 'animate' not available to 'Watch Face'"
Time: 2026-11-15T08:06:08Z
Stack (function names and source line numbers):
  startLifecycleAnimation — line 306
  onShow — line 241
ABRIDGED MONKEY C CODE EXCERPT — UNPUBLISHED DEVELOPMENT WATCH FACE

Based on the methods reviewed during debugging. Rendering/cache work and some diagnostics are omitted. This is not a complete, buildable reproduction.
The app-owned fields below are local bookkeeping, not native permission values.
NativeFaceConfig.preview is an app-owned flag read from :launchedFromWatchFaceSettingsEditor at startup.

function onShow() {
    settingsOpen = false;
    var showMode = System.getDisplayMode();
    visible = true;
    if (!animationRunning) {
        sleeping = showMode != System.DISPLAY_MODE_HIGH_POWER;
    }
    // Rendering/cache setup omitted.
    startLifecycleAnimation(false, "Show");
    WatchUi.requestUpdate();
}

function startLifecycleAnimation(genuineWake as Lang.Boolean, origin as Lang.String) as Void {
    if (animationRunning || !smoothSeconds || settingsOpen || editorActive || NativeFaceConfig.preview) {
        return;
    }
    if (!RenderState.mayAnimate(visible, sleeping, System.getDisplayMode())) {
        return;
    }
    if (!genuineWake) {
        if (returnStartAttempted || returnStartDenied) { return; }
        var app = Application.getApp();
        if (!(app has :isActive) || !app.isActive()) { return; }
        returnStartAttempted = true;
    }
    animationAllowed = true;
    pendingAnimationStart = false;
    try {
        WatchUi.animate(self, :animationPhase, WatchUi.ANIM_TYPE_LINEAR,
            0.0, 1.0, 300.0, null);
        animationRunning = true;
    } catch (error instanceof Lang.Exception) {
        animationRunning = false;
        animationAllowed = false;
        returnStartDenied = true;
        // Ordinary-exception reporting omitted.
    }
    // Diagnostics omitted.
}

module RenderState {
    function mayAnimate(visible, sleeping, mode) {
        return visible && !sleeping && mode == System.DISPLAY_MODE_HIGH_POWER;
    }
}

Relevant surrounding lifecycle behavior:
- Actual OS onExitSleep calls the helper with genuineWake=true.
- App onActive also calls this helper with genuineWake=false and origin="Active".
- Active animations are cancelled on onHide, onEnterSleep and app onInactive.
- The recorded failing stack is onShow -> startLifecycleAnimation -> animate.

Question: deriving sleeping from display HIGH in onShow may be an incorrect assumption. What supported lifecycle pattern should replace this to restart an animation after returning without a new OS onExitSleep, if that is supported?

  • I suspect what's involved here is often called low power and high power.  T most times, a WF is in low power where onUpdate is only called once a minute.  After a gesture, etc, it goes into high power form about 10-25 seconds, and onUpdate is called every second.

    Using onExitSleep and onEnterSleep you can see when there's a transition between high and low power.  onExitSleep means the WF just entered high power. onEnterSleep, low power.

  • Thank you. Yes, I have already tested that lifecycle pattern: starting the animation only from an actual OS onExitSleep() callback and cancelling it in onEnterSleep().

    It works after a wrist gesture. The unresolved case is returning from another screen.

    In some returns, a persisted diagnostic trace shows a new watch-face instance going through onStart() → getInitialView() → onShow() → its first rendered frame, without a recorded onExitSleep() in that instance. It then receives approximately once-per-second updates, but no animation has been started. A subsequent wrist gesture delivers onExitSleep(), and animation works again.

    I also tried starting from onShow() when the display reports HIGH and isActive() is true. This works on many returns, but occasionally causes the fatal Permission Required error in the attached log. I understand those checks may not establish the watch face’s actual power state.

    For a newly started instance in this situation, should I assume animations are unavailable until it receives its own onExitSleep(), even if the display is HIGH and the app is active?

    Or is there another supported callback or pattern for starting animation after such a return?

    I’m not manually invoking onExitSleep(). I’m trying to distinguish an implementation mistake from an expected lifecycle limitation.