# ActivityPub plugin: stack level too deep

**URL:** https://meta.discourse.org/t/activitypub-plugin-stack-level-too-deep/354445
**Category:** Bug
**Tags:** activitypub
**Created:** [February 25, 2025, 4:20pm UTC](https://meta.discourse.org/t/activitypub-plugin-stack-level-too-deep/354445 "2025-02-25T16:20:12Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [February 25, 2025, 4:20pm UTC](https://meta.discourse.org/t/activitypub-plugin-stack-level-too-deep/354445/1 "2025-02-25T16:20:13Z")

</div>

Getting this error in logs recently (past 4-5 days):

```plaintext
Message (18 copies reported)

Job exception: stack level too deep
Backtrace

activesupport-7.2.2.1/lib/active_support/core_ext/object/blank.rb:166:in `present?'  
/var/www/discourse/plugins/discourse-activity-pub/lib/discourse_activity_pub/json_ld.rb:57:in `base_object_id'  
/var/www/discourse/plugins/discourse-activity-pub/lib/discourse_activity_pub/json_ld.rb:58:in `base_object_id'  
/var/www/discourse/plugins/discourse-activity-pub/lib/discourse_activity_pub/json_ld.rb:58:in `base_object_id'  
/var/www/discourse/plugins/discourse-activity-pub/lib/discourse_activity_pub/json_ld.rb:58:in `base_object_id'  

```

Env doesn’t have much info around the object:

```plaintext
|queue|default|
|---|---|
|class|Jobs::DiscourseActivityPubProcess|
|args|[object Object], []|

```

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [February 25, 2025, 4:31pm UTC](https://meta.discourse.org/t/activitypub-plugin-stack-level-too-deep/354445/2 "2025-02-25T16:31:51Z")

</div>

I have 970 incidents of that under some timeperiod. Everyday few, anyway. I can’t see any real visible issues, though.

(And now I’ve started get some strange deadlock things, but that would be worth of own topic)

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [March 14, 2025, 5:01pm UTC](https://meta.discourse.org/t/activitypub-plugin-stack-level-too-deep/354445/3 "2025-03-14T17:01:04Z")

</div>

I still get this, but I can’t tell how do I get it.

I know this much. Or little.

One log incident repeats this line really many times. I don’t know how many, because scrolling started hurt my wrist.

```plaintext
/var/www/discourse/plugins/discourse-activity-pub/lib/discourse_activity_pub/json_ld.rb:58:in `base_object_id'

```

I don’t like that tick becore base\_object\_id

It show a link icon and it is leading to GitHub 404.

[https://github.com/discourse/discourse/blob/3165992a90c481e5aa6fb1b18854cf7d9c3ed791/plugins/discourse-activity-pub/lib/discourse\_activity\_pub/json\_ld.rb#L58](https://github.com/discourse/discourse/blob/3165992a90c481e5aa6fb1b18854cf7d9c3ed791/plugins/discourse-activity-pub/lib/discourse_activity_pub/json_ld.rb#L58)

That doesn’t mean anything, right? In that branch isn’t acitivity-pub directory, but why it shows that? I’m just curious.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [March 24, 2025, 8:59am UTC](https://meta.discourse.org/t/activitypub-plugin-stack-level-too-deep/354445/4 "2025-03-24T08:59:00Z")

</div>

I missed this somehow! Apologies, this should address it.

[https://github.com/discourse/discourse-activity-pub/pull/198](https://github.com/discourse/discourse-activity-pub/pull/198)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [March 24, 2025, 10:41am UTC](https://meta.discourse.org/t/activitypub-plugin-stack-level-too-deep/354445/5 "2025-03-24T10:41:01Z")

</div>

Thanks @angus 👍 It’s been merged.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [March 24, 2025, 11:39am UTC](https://meta.discourse.org/t/activitypub-plugin-stack-level-too-deep/354445/6 "2025-03-24T11:39:05Z")

</div>

Thanks.

Very 101-question, because I’m curious. I couldn’t see anything suspicious anywhere, and all it did was just annoying error in logs. Did that error something… real?

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [March 24, 2025, 5:25pm UTC](https://meta.discourse.org/t/activitypub-plugin-stack-level-too-deep/354445/7 "2025-03-24T17:25:19Z")

</div>

It was used in code that protected against duplicate activities being sent in quick succession, which some other platforms do from time to time. So if you didn’t notice anything, you’re not federating with a server that does that.
