stream-feed-flutter
stream-feed-flutter copied to clipboard
Realtime For Feeds Not Working
Describe the bug I am using the realtime subscription but I am not getting any activities or anything.
What version of Flutter do you use? 2.10.2
What package are you using? What version? 0.5.0 What platform is it about?
- [x] Android
- [x] iOS
- [ ] Web
- [ ] Windows
- [ ] MacOS
- [ ] Linux
a copy of flutter doctor --verbose
[✓] Flutter (Channel stable, 2.10.2, on macOS 12.2.1 21D62 darwin-arm, locale
en-US)
• Flutter version 2.10.2 at /Users/rickeylee/Desktop/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 097d3313d8 (5 days ago), 2022-02-18 19:33:08 -0600
• Engine revision a83ed0e5e3
• Dart version 2.16.1
• DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/rickeylee/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android
Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.10.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
[✓] VS Code (version 1.64.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.34.0
[✓] Connected device (4 available)
• SM N950U (mobile) • ce061716d1923703017e •
android-arm64 • Android 9 (API 28)
• iPhone 12 Pro Max (mobile) • 00008101-0012090C14F9001E •
ios • iOS 15.2.1 19C63
• iPhone (mobile) • d0545eb2ff26e1c087d1b29c26f8e15da19284bb •
ios • iOS 15.2.1 19C63
• Chrome (web) • chrome •
web-javascript • Google Chrome 98.0.4758.109
! Error: iPhone 12 Pro Max is busy: Preparing the watch for development via
iPhone 12 Pro Max. Xcode will continue when iPhone 12 Pro Max is finished.
(code -10)
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
To Reproduce Steps to reproduce the behavior: Create a feed timeline and subscribe to the timeline and have new activities added to it.
Expected behavior To get new activities when added to the feed.
This worked a few weeks ago and just noticed that it's not working.
Hmm weird, did you change anything in your dashboard?
@sachaarbonel nope nothing was changed.
I see in the debug console when the realtime is started but after that I don't get any updates.
@sachaarbonel any update on what to do on this?
Sorry @rlee1990, I can't replicate this with my API key, can I impersonate you? I'll delete the activity id right away
@sachaarbonel Yes please do. What ever it takes to figure this out.
Running this integration test with your credentials works for me faye_client_test.dart. Flutter wise, did you have any change in your codebase recently, in the way you manage your state? Maybe you have an unnecessary rebuild somewhere
I still just use riverpod for state management
I am checking everything. I haven't made any changes to any code for Stream Feeds at all.
I'm going to try something and see if that works.
I found the issue. When I removed this subscription:
subStories = await SNAB.streamFeedClient
.aggregatedFeed('timeline_stories')
.subscribe((message) {
print('New message: $message');
});
Then this one works:
final feed = SNAB.streamFeedClient.flatFeed(
'timeline', '${widget.user.uid}_${widget.user.currentAccount}');
sub = await feed.subscribe((message) {
print('Message: $message');
setState(() {
for (var element in message!.newActivities!) {
if (posts.contains(element)) {
final oldPost = posts.firstWhere((post) => post.id == element.id);
posts.remove(oldPost);
posts.add(element);
} else {
posts.insert(0, element);
}
}
});
});
Are we only to have one realtime stream or am I doing something wrong? @sachaarbonel
Im getting this when both are added:
flutter: (2022-02-25 11:02:42.189426) ℹ️ 🕒 Client null attempting to subscribe to [/site-92418-feed-timeline_storiesi1OPQTtBcSR5Moe3k6BiRS0QoV52_personal]()
I even tried this:
final timeline = SNAB.streamFeedClient.aggregatedFeed(
'timeline_stories', '${widget.user.uid}_${widget.user.currentAccount}');
subStories = await timeline.subscribe((message) {
print('New message: $message');
});
There is a bug somewhere in our Faye implementation I'll investigate and let you know when we have a fix for you to try out
Okay thank you
Any updates on this?
Any up on this
@sachaarbonel has this been resolved yet?
@sachaarbonel is there any progress on this?