question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StreamFeed.removeActivity returns successful response but appears to remove the activity async.

See original GitHub issue

Repro Steps:

  1. Using connected stream-js client, create an instantiated StreamFeed object.
const feed = streamClient.feed('some-feed-name', 'some-stream-user-id);
  1. Find activity
const beforeRemoveResponse = await streamClient.getActivities({ ids: ['some-activity-id']});
feed.removeActivity(beforeRemoveResponse.results[0].id);
const afterRemoveResponse = await streamClient.getActivities({ ids: ['some-activity-id']});

Expected Behavior: The afterRemoveResponse result is empty, as I’ve removed the activity and Stream gave me 200/OK Http response code.

Actual: The activity is still there for some amount of time.

I guess this could be expected behavior or a result of caching, however it is undocumented and coupled with the fact that length of processing appears to vary from near instantaneous to minutes it is something that has sucked up some of my time and not friendly.

gz#7877

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ferhatelmascommented, Dec 22, 2020

What you did in the snippet is receiving built group id for an aggregated/notification feed. That id is pseudo id generated from aggregation format. That’s why activities inside a group is dynamic as new ones are coming and can be changed with ranking too. You don’t want it in general because its usage very limited, IMHO.

Use real activity id or foreign id/time pair on client if you want to fetch specific activities. From your snippet, 80204172-3665-11eb-a9c2-0ae838defca7 is the id. client.getActivities({ids: [your_id]})

1reaction
ferhatelmascommented, Dec 21, 2020

@shiivan this is expected. Activity is removed from the associated feed so users can’t get it but admin (server-side) can always receive activities, they aren’t removed.

To confirm, you can read the feed and removed activity won’t be there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to filter an item from an observable array? - Stack Overflow
I'm able to successfully remove the activity from my database, but refreshing my ui is throwing me. I have tried different versions of ......
Read more >
services/java/com/android/server/PackageManagerService.java
All available activities, for your resolving pleasure. ... Log.w(TAG, "Couldn't remove app data directory for package: " ... return new int[] { val...
Read more >
Activity formatter - Product Documentation | ServiceNow
The activity formatter provides an easy way to track items not saved with a field in the record, for example, journal fields like...
Read more >
Asynchronous Activity - Handle Unexpected Popup Messages
We tried with Parallel Process, however that is not closing when popup appears. Example, Bot tries to type a text in Type into...
Read more >
eventsource.cs
Format("Activity dying: {0} -> StartEvent({1})", currentActivityId, eventId)); // remove activity only from current logging scope (af) int dummy; af.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found