Terminating app due to uncaught exception 'Sendbird Exception', reason: 'Database error

My application is crashing while showing the SBUOpenChannelViewController. Please find the crash log.

pod 'SendBirdUIKit', '2.1.10'

Use the following code to load the channel view

        let channelVC = SBUOpenChannelViewController(channelUrl: channelUrl,
                                                     messageListParams: messageListParams)
        self.navigationController?.pushViewController(channelVC, animated: true)

Router[13304:280845] *** Terminating app due to uncaught exception ‘Sendbird Exception’, reason: ‘Database error.’
*** First throw call stack:
(
0 CoreFoundation 0x00007fff20421af6 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20177e78 objc_exception_throw + 48
2 SendBirdSDK 0x00000001075d1b10 +[SBDMessageDatabase insertOrReplaceWithMessages:] + 512
3 SendBirdSDK 0x00000001075f9311 -[SBDMessageDataSource upsertMessages:] + 67
4 SendBirdSDK 0x000000010761843a __66-[SBDBaseChannel getMessagesByTimestamp:params:completionHandler:]_block_invoke_2 + 676
5 SendBirdSDK 0x000000010768a4ae __67-[SBDHTTPClient runRequestWithSharedSession:uri:completionHandler:]_block_invoke + 1393
6 CFNetwork 0x00007fff2351b6ca CFNetwork + 34506
7 CFNetwork 0x00007fff2352f992 _CFHTTPMessageSetResponseProxyURL + 17344
8 libdispatch.dylib 0x0000000107a9b7ec _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x0000000107a9c9c8 _dispatch_client_callout + 8
10 libdispatch.dylib 0x0000000107aa3296 _dispatch_lane_serial_drain + 796
11 libdispatch.dylib 0x0000000107aa3f9d _dispatch_lane_invoke + 493
12 libdispatch.dylib 0x0000000107aafde2 _dispatch_workloop_worker_thread + 882
13 libsystem_pthread.dylib 0x00007fff61163a3d _pthread_wqthread + 290
14 libsystem_pthread.dylib 0x00007fff61162b77 start_wqthread + 15
)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception ‘Sendbird Exception’, reason: ‘Database error.’
terminating with uncaught exception of type NSException
CoreSimulator 732.18.6 - Device: iPhone 11 (1790CBC8-1F9E-400A-A009-02CD1CE39C98) - Runtime: iOS 14.4 (18D46) - DeviceType: iPhone 11

Any suggestion or fix appreciated, Thanks

i have same problem.

I can’t do it now.
please check the issue as soon as possible.

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x2802632f0 UIStackView:0x1221360d0.width == 0   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2021-07-12 14:54:09.427950+0900 iphone[54156:8730834] [LayoutConstraints] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x280263a70 UIView:0x1221357a0.width == 0   (active)>",
    "<NSLayoutConstraint:0x2802630c0 UIStackView:0x1115cbb90.leading == UILayoutGuide:0x281807720'UIViewSafeAreaLayoutGuide'.leading + 20   (active)>",
    "<NSLayoutConstraint:0x280263160 UIStackView:0x1115cbb90.trailing == UILayoutGuide:0x281807720'UIViewSafeAreaLayoutGuide'.trailing - 16   (active)>",
    "<NSLayoutConstraint:0x28026e990 H:|-(0)-[SendBirdUIKit.SBUMessageInputView:0x122118260](LTR)   (active, names: '|':UIView:0x122130a30 )>",
    "<NSLayoutConstraint:0x28026e9e0 SendBirdUIKit.SBUMessageInputView:0x122118260.right == UIView:0x122130a30.right   (active)>",
    "<NSLayoutConstraint:0x280296a30 'UISV-alignment' UIView:0x122134ee0.leading == UIView:0x1221357a0.leading   (active)>",
    "<NSLayoutConstraint:0x280296b20 'UISV-alignment' UIView:0x122134ee0.trailing == UIView:0x1221357a0.trailing   (active)>",
    "<NSLayoutConstraint:0x2802968a0 'UISV-canvas-connection' UIStackView:0x1115cbb90.leading == UIView:0x122134ee0.leading   (active)>",
    "<NSLayoutConstraint:0x2802968f0 'UISV-canvas-connection' H:[UIView:0x122134ee0]-(0)-|   (active, names: '|':UIStackView:0x1115cbb90 )>",
    "<NSLayoutConstraint:0x280296d00 'UIView-Encapsulated-Layout-Width' UIView:0x122130a30.width == 414   (active)>",
    "<NSLayoutConstraint:0x280262fd0 'UIViewSafeAreaLayoutGuide-left' H:|-(0)-[UILayoutGuide:0x281807720'UIViewSafeAreaLayoutGuide'](LTR)   (active, names: '|':SendBirdUIKit.SBUMessageInputView:0x122118260 )>",
    "<NSLayoutConstraint:0x280263070 'UIViewSafeAreaLayoutGuide-right' H:[UILayoutGuide:0x281807720'UIViewSafeAreaLayoutGuide']-(0)-|(LTR)   (active, names: '|':SendBirdUIKit.SBUMessageInputView:0x122118260 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x280263a70 UIView:0x1221357a0.width == 0   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2021-07-12 14:54:09.449105+0900 iphone[54156:8730834] Sentry - debug:: currentOrientation is unknown.
2021-07-12 14:54:09.552626+0900 iphone[54156:8731032] *** Terminating app due to uncaught exception 'Sendbird Exception', reason: 'Database error.'
*** First throw call stack:
(0x187fff298 0x19bd59480 0x107dc7a44 0x107ded838 0x107e0bf34 0x107e7d070 0x10513d660 0x10513d660 0x1885faac4 0x18860b584 0x187c362b0 0x187c37298 0x187bdfa40 0x187be0548 0x187be9fac 0x1d05255bc 0x1d052886c)
libc++abi: terminating with uncaught exception of type NSException
Signal: SIGABRT (signal SIGABRT)

please help me…

  pod 'SendBirdSDK', '3.0.224'
  pod 'SendBirdUIKit', '2.1.7'

it works

but lastest release has bug…

I’m experiencing this issue as well, after following the quickstart documentation. Send first message | UIKit iOS SDK | Sendbird Docs

The crash occurs as soon as I try to send a message in a chat.

I tried downgrading to an older SendBirdUIKit version but unfortunately still experiencing this issue.

Not sure what I might have done wrong in between installing the SDK and attempting to send the first message, it does seem like a bug on Sendbird’s end.

@SubinsJose, @Kangsik_Choi, @jin, @adam_t
We are fixing this issue and will update it as soon as possible. :pray:
Please use SendBirdSDK 3.0.226 version until we release a new version.

I also have same error exception but only in some devices.
Is this issue the same?
Below is the error stack from Crashlytics.
Fatal Exception: Sendbird Exception
0 CoreFoundation 0x195f8b298 __exceptionPreprocess
1 libobjc.A.dylib 0x1a9ce5480 objc_exception_throw
2 SendBirdSDK 0x10461b0b8 (Missing)
3 SendBirdSDK 0x1046b5940 (Missing)
4 SendBirdSDK 0x1046b3b20 (Missing)
5 SendBirdSDK 0x1046afeac (Missing)
6 SendBirdSDK 0x1046073ac (Missing)
7 SendBirdSDK 0x104699344 (Missing)
8 SendBirdSDK 0x1046243ec (Missing)
9 libdispatch.dylib 0x195bc22b0 _dispatch_call_block_and_release
10 libdispatch.dylib 0x195bc3298 _dispatch_client_callout
11 libdispatch.dylib 0x195b6ba40 _dispatch_lane_serial_drain$VARIANT$mp
12 libdispatch.dylib 0x195b6c518 _dispatch_lane_invoke$VARIANT$mp
13 libdispatch.dylib 0x195b75fac _dispatch_workloop_worker_thread
14 libsystem_pthread.dylib 0x1de3d95bc _pthread_wqthread
15 libsystem_pthread.dylib 0x1de3dc86c start_wqthread

Currently i am trying to update the pod version like @Kangsik_Choi suggested using SendBirdUIKit 2.1.7 and SendBirdSDK 3.0.226 as @Tez suggested. I will update the result when it’s tested.

Update : After updating as suggested the it’s fixed.

@SubinsJose, @Kangsik_Choi, @jin, @adam_t, @Kevin_Lee

We have released the hotfix version.
Please update version to SendBirdSDK 3.0.228, or execute $pod update on your terminal.

@Tez Thanks for the quick fix, will check and update.

1 Like

No longer crashing for me - thanks very much @Tez

1 Like