You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the application in release mode, the device fails to complete activation when it first launches. The last event in the state machine is a transition from {{NotActivated}} to {{WaitingForPushDeviceDetails}}. A workaround would be to close and relaunch the app. Once relaunched, activation/deactivation works.
Attempt to activate the device by scrolling down to the "Push Notifications" sliver of the scroll view, and press "Activate"
You should notice nothing happening. This is because the Future does not complete, because Ably Cocoa never calls back the {{result}} in the following code:
print("Did not return a value asynchronously because flutterResultForActivate was nil. The app might have been restarted since calling activate.")
}
}
Other notes:
This only happens on iOS
Other platform methods are working (e.g. connect realtime).
h1. Problem?
This requires further investigation.
This might it is an Ably Cocoa, specifically an Activation State Machine issue, potentially a race condition which occurs when the app runs faster (e.g. in release mode).
The text was updated successfully, but these errors were encountered:
ben-xD
added
the
bug
Something isn't working. It's clear that this does need to be fixed.
label
Dec 6, 2021
After further investigation, it looks like it is because the APNs token is not provided to the app early enough in some cases, and the realtime and rest clients are instantiated without it.
When running the application in release mode, the device fails to complete activation when it first launches. The last event in the state machine is a transition from {{NotActivated}} to {{WaitingForPushDeviceDetails}}. A workaround would be to close and relaunch the app. Once relaunched, activation/deactivation works.
{code}
2021-12-06 15:00:34.685283+0700 Runner[21776:7802732] DEBUG: ARTPushActivationStateMachine: transition: ARTPushActivationStateNotActivated -> ARTPushActivationStateWaitingForPushDeviceDetails
{code}
To reproduce it:
** {{flutter run --dart-define=ABLY_API_KEY=$ABLY_API_KEY --release}}.
** Xcode "release" configuration and debug executable unchecked (see screenshot)
!https://user-images.githubusercontent.com/24711048/144826023-3348d069-3482-4c32-9511-98a32d3a17d8.png|CleanShot 2021-12-06 at 09 58 04!
ably-flutter/ios/Classes/handlers/PushActivationEventHandlers.swift
Lines 34 to 45 in 8e85a88
Other notes:
h1. Problem?
This requires further investigation.
This might it is an Ably Cocoa, specifically an Activation State Machine issue, potentially a race condition which occurs when the app runs faster (e.g. in release mode).
The text was updated successfully, but these errors were encountered: