In my React application, I’m using the SendbirdProvider with both the Channel and ChannelList components. The ChannelList component is constantly throwing the “Invalid Parameter” error. I’ve tried using the component with no props, and with the onSelectChannel prop, still get the error.
It seems to come from this useEffect in the ChannelList component. I think ‘currentChannel’ is null, and that’s throwing an error in Sendbird.min.js. Here’s what shows in the console:
SendBird.min.js:6 Uncaught (in promise) SendBirdException: Invalid parameter.
at Function.get (http://localhost:3000/portal/v2/static/js/0.chunk.js:556173:16)
at Function.value (http://localhost:3000/portal/v2/static/js/0.chunk.js:556165:404)
at Function.value (http://localhost:3000/portal/v2/static/js/0.chunk.js:561217:21)
at http://localhost:3000/portal/v2/static/js/0.chunk.js:539007:22
at commitHookEffectListMount (http://localhost:3000/portal/v2/static/js/2.chunk.js:79515:30)
at commitPassiveHookEffects (http://localhost:3000/portal/v2/static/js/2.chunk.js:79552:15)
at HTMLUnknownElement.callCallback (http://localhost:3000/portal/v2/static/js/2.chunk.js:60094:18)
at Object.invokeGuardedCallbackDev (http://localhost:3000/portal/v2/static/js/2.chunk.js:60143:20)
at invokeGuardedCallback (http://localhost:3000/portal/v2/static/js/2.chunk.js:60196:35)
at flushPassiveEffectsImpl (http://localhost:3000/portal/v2/static/js/2.chunk.js:82616:13)
at unstable_runWithPriority (http://localhost:3000/portal/v2/static/js/2.chunk.js:91200:16)
at runWithPriority$1 (http://localhost:3000/portal/v2/static/js/2.chunk.js:70982:14)
at flushPassiveEffects (http://localhost:3000/portal/v2/static/js/2.chunk.js:82584:16)
at performSyncWorkOnRoot (http://localhost:3000/portal/v2/static/js/2.chunk.js:81499:7)
at http://localhost:3000/portal/v2/static/js/2.chunk.js:71036:28
at unstable_runWithPriority (http://localhost:3000/portal/v2/static/js/2.chunk.js:91200:16)
at runWithPriority$1 (http://localhost:3000/portal/v2/static/js/2.chunk.js:70982:14)
at flushSyncCallbackQueueImpl (http://localhost:3000/portal/v2/static/js/2.chunk.js:71031:11)
at flushSyncCallbackQueue (http://localhost:3000/portal/v2/static/js/2.chunk.js:71019:7)
at batchedUpdates$1 (http://localhost:3000/portal/v2/static/js/2.chunk.js:81624:11)
at Object.notify (http://localhost:3000/portal/v2/static/js/0.chunk.js:498081:7)
at Subscription.notifyNestedSubs (http://localhost:3000/portal/v2/static/js/0.chunk.js:498123:20)
at Subscription.handleChangeWrapper (http://localhost:3000/portal/v2/static/js/0.chunk.js:498128:12)
Thanks. In development mode the create-react-app shows a huge error screen due to the exception, fortunately, that’s not the case in production so we can live with it right now.