Abortcontroller is not defined error

[Problem/Question]
Hi I got the error of “abortcontroller is not defined” when I call getChannel method.
Is it the right way to use abortcontroller-polyfill on npm?
I think it should be done in packages level.
This error occurred on LG, SAMSUNG TV 2016 ~ 2019 version.


// If problem, please fill out the below. If question, please delete.
[SDK Version]
// What version of the SDK are you using? 4.6.0

[Reproduction Steps]
// Please provide reproduction steps and, if possible, code snippets.

catched error when getChannel called

 this.sbChatApi.openChannel
        .getChannel(channelUrl)
        .then(channel => {
          log("retrieved channel", channel);
             });
        .catch(error => {
          log("getChannel error occurred", error);
        });

[Frequency]
// How frequently is this issue occurring? always

[Current impact]
// How is this currently impacting your implementation? can’t enter chat

Hello @Hyosung_Meta_Lim,

Are you able to open a case with our Support team via the Sendbird Dashboard to investigate further? I wonder if there are some limitations on TV based browsers that are not accounted for.

I am also facing the same issue on my mac

Module not found: Error: Can’t resolve ‘abortcontroller-polyfill/dist/polyfill-patch-fetch’ in ‘path/App/node_modules/@sendbird/chat’
ERROR in ./node_modules/@sendbird/chat/__bundle-e0824602.js 1:0-60
Module not found: Error: Can’t resolve ‘abortcontroller-polyfill/dist/polyfill-patch-fetch’ in ‘/path/App/node_modules/@sendbird/chat’

ERROR in ./node_modules/@sendbird/chat/__bundle-438a46aa.js 1:0-60
Module not found: Error: Can’t resolve ‘abortcontroller-polyfill/dist/polyfill-patch-fetch’ in ‘path/App/node_modules/@sendbird/chat’

[Frequency]
// How frequently is this issue occurring? Always

[Current impact]
// Not able to initialise sendbird ui kit

Hi @Shaurya_Sharma,

Could you please provide us with the UIKit and Sendbird Chat versions you are using?

UI kit was working for me last week with “@sendbird/uikit-react” version “^3.4.5”.

While trying ui-kit in some new project it is breaking for me. I can see some changed pushed in repo “GitHub - sendbird/sendbird-chat-sdk-javascript: Sendbird Chat SDK for JavaScript.” 13hours ago.

The same issue got reproduced in my other working project when I reinstalled the node modules.

You can figure out with abortcontroller-polyfill on npm.
https://www.npmjs.com/package/abortcontroller-polyfill

Import below on your component.
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'

It is still not resolved after adding abort controller module. The issue is within chat module which comes as a dependency when sendbird ui-kit sdk is installed

Module not found: Error: Can’t resolve ‘abortcontroller-polyfill/dist/polyfill-patch-fetch’ in ‘path/App/node_modules/@sendbird/chat’

Did you mean ‘polyfill-patch-fetch.js’?

BREAKING CHANGE: The request ‘abortcontroller-polyfill/dist/polyfill-patch-fetch’ failed to resolve only because it was resolved as fully specified

(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a ‘.mjs’ file, or a '.js’ file where the package.json contains ‘“type”: “module”’).

The extension in the request is mandatory for it to be fully specified.

Add the extension to the request.

ERROR in ./node_modules/@sendbird/chat/__bundle-e0824602.js 1:0-60

Module not found: Error: Can’t resolve ‘abortcontroller-polyfill/dist/polyfill-patch-fetch’ in ‘path/App/node_modules/@sendbird/chat’

Did you mean ‘polyfill-patch-fetch.js’?

BREAKING CHANGE: The request ‘abortcontroller-polyfill/dist/polyfill-patch-fetch’ failed to resolve only because it was resolved as fully specified

(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a ‘.mjs’ file, or a '.js’ file where the package.json contains ‘“type”: “module”’).

The extension in the request is mandatory for it to be fully specified.

Add the extension to the request.

ERROR in ./node_modules/@sendbird/chat/__bundle-438a46aa.js 1:0-60

Module not found: Error: Can’t resolve ‘abortcontroller-polyfill/dist/polyfill-patch-fetch’ in ‘path/App/node_modules/@sendbird/chat’

Did you mean ‘polyfill-patch-fetch.js’?

BREAKING CHANGE: The request ‘abortcontroller-polyfill/dist/polyfill-patch-fetch’ failed to resolve only because it was resolved as fully specified

(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a ‘.mjs’ file, or a '.js’ file where the package.json contains ‘“type”: “module”’).

The extension in the request is mandatory for it to be fully specified.

Add the extension to the request.

Yes, I am having this same error as well recently. It was working as intended a few hours ago.

Hello all,

We just released 4.7.1 which included a hotfix for this issue.

The issue is still persisting on my end while using the @sendbird/uikit-react (v3.4.5) package. Is there going to be an update for that?

@Just_Luke,

The UIKit utilizes the ^ syntax for versioning meaning it will accept any new minor or patch versions. Since 4.7.1 falls under the minor version increase of "@sendbird/chat": "^4.2.3" , you should be able to clear your cache and install again or force install the next version.

1 Like

Thank you, Tyler! It’s working again.

Did you run npm cache clean and then npm install?