# \[Solved\] iOS Broken dependency: @sentry/react-native 5.27.0

**URL:** <https://forum.mattermost.com/t/solved-ios-broken-dependency-sentry-react-native-5-27-0/20570>\
**Category:** Mobile Apps\
**Created:** [October 10, 2024, 9:56am UTC](https://forum.mattermost.com/t/solved-ios-broken-dependency-sentry-react-native-5-27-0/20570 "2024-10-10T09:56:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jherman](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@jherman](https://forum.mattermost.com/u/jherman)\
**Post date:** [October 10, 2024, 9:56am UTC](https://forum.mattermost.com/t/solved-ios-broken-dependency-sentry-react-native-5-27-0/20570/1 "2024-10-10T09:56:49Z")

</div>

Software:

- Mattermost Mobile Release 2.20.1
- Ruby 3.2.2 (Installation of Ruby 3.0.6 failed over and over - it’s an unsupported and end-of-life version)
- macOS Sequoia 15.0.1
- Xcode 16.0

Hardware:

- Mac mini, M1 2020

So first of all `npm install` works perfectly fine without any errors.  
But then everytime I try to build the mobile release 2.20.1 with the npm-dependency @sentry/react-native 5.27.0, I get a Xcode error

> Missing ‘#include \<sys/\_types/\_ucontext64.h\>’; ‘ucontext64\_t’ must be declared before it is used

While researching, I found out, that this is a bug in sentry and it was fixed with v5.31.0.  
See [missing ucontext64\_t type Xcode Version 16.0 (16A242d) · Issue #4097 · getsentry/sentry-react-native · GitHub](https://github.com/getsentry/sentry-react-native/issues/4097)

But Mattermost is using Sentry v5.27.0.  
So how is it possible for you to build that with a broken dependency?

Best regards  
Jens

---

<div class="post-metadata">

**Author:** ![john.combs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.combs/32/7118_2.png) [@john.combs](https://forum.mattermost.com/u/john.combs)\
**Post date:** [October 11, 2024, 10:13pm UTC](https://forum.mattermost.com/t/solved-ios-broken-dependency-sentry-react-native-5-27-0/20570/2 "2024-10-11T22:13:51Z")

</div>

Hi Jens, thanks for bringing this up! It sounds like the issue may stem from the older version of Sentry being used in the Mattermost mobile build. You could try updating the Sentry dependency to v5.31.0 in your local environment as a temporary fix while we investigate. Let us know if you need further assistance!

---

<div class="post-metadata">

**Author:** ![jherman](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@jherman](https://forum.mattermost.com/u/jherman)\
**Post date:** [December 3, 2024, 3:20pm UTC](https://forum.mattermost.com/t/solved-ios-broken-dependency-sentry-react-native-5-27-0/20570/3 "2024-12-03T15:20:23Z")

</div>

Hi John,

thanks for your answer and sorry for my late response. I already tried that:

- changed @sentry/react-native to v5.31.0
- removed node\_modules, package-lock.json, ios/Podfile.lock, ios/Pods
- cleared all cached (at least all caches I know)

But after that you still get many errors:

- this error in like 100 lines: `Gekidou/Sources/Gekidou/Storage/Database+Category.swift:7:44 Missing argument label 'value:' in call`
- and some others…

In the meantime I switched some software and hardware parameters (but that didn’t help):

- macOS Sequoia 15.1
- Xcode 16.1
- MacBook Pro M4

What is the supported MacOS / Xcode version for building Mattermost v2.22.0?  
I think I have to downgrade MacOS…

~ Jens

---

<div class="post-metadata">

**Author:** ![john.combs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.combs/32/7118_2.png) [@john.combs](https://forum.mattermost.com/u/john.combs)\
**Post date:** [December 4, 2024, 1:59am UTC](https://forum.mattermost.com/t/solved-ios-broken-dependency-sentry-react-native-5-27-0/20570/4 "2024-12-04T01:59:37Z")

</div>

Hi Jens, thank you for the detailed follow-up and for pointing out the root cause related to Sentry!

@matthewbirtch - Is this something that we would be able to create a Jira ticket for so the team can review upgrading Sentry in future releases to address compatibility with Xcode 16.0?

In the meantime Jens, feel free to share any other insights or challenges you encounter! Let us know how else we can assist. 😊

---

<div class="post-metadata">

**Author:** ![elias](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@elias](https://forum.mattermost.com/u/elias)\
**Post date:** [December 7, 2024, 11:36pm UTC](https://forum.mattermost.com/t/solved-ios-broken-dependency-sentry-react-native-5-27-0/20570/5 "2024-12-07T23:36:52Z")

</div>

@jherman if you are trying to build 2.20.1 that is an old version by now that is using an old version of Sentry and also has some issues building on xcode 16

So you have three options here

1. Build your target version with Xcode 15
2. Make the changes to your target version so that it can build on Xcode 16, changes for this can be found in the repo [Add fixes for xCode 16 changes (#8254) · mattermost/mattermost-mobile@94a7231 · GitHub](https://github.com/mattermost/mattermost-mobile/commit/94a7231a055eaec9ac540e1306b018a73b305886)
3. 
  1. Build a newer version of the app

Hope this helps

---

<div class="post-metadata">

**Author:** ![jherman](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@jherman](https://forum.mattermost.com/u/jherman)\
**Post date:** [December 12, 2024, 12:35pm UTC](https://forum.mattermost.com/t/solved-ios-broken-dependency-sentry-react-native-5-27-0/20570/6 "2024-12-12T12:35:29Z")

</div>

Thank you so much @elias !  
I thought v2.22.0 is the newest version, because that is the latest tag (used in Github) and the latest release, but there already is a newer release branch v2.23.0 with the Xcode 16 fix. Now it’s working totally fine! Thanks again 🙂
