Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting type error when upgrading to 2.0.0 to 3.0.1 #54

Open
DeepikaSharma5 opened this issue Dec 5, 2022 · 2 comments
Open

Getting type error when upgrading to 2.0.0 to 3.0.1 #54

DeepikaSharma5 opened this issue Dec 5, 2022 · 2 comments

Comments

@DeepikaSharma5
Copy link

DeepikaSharma5 commented Dec 5, 2022

I was using 2.0.0 without any issue for SDK 30. But as now I have upgraded to SDK 31 the previous version doesen't work. So I tried to update the package to 3.0.1. But after upgrade, when I run the project I am getting an error as TypeError: _reactNativeForegroundService.default.stopService is not a function. (In '_reactNativeForegroundService.default.stopService()', '_reactNativeForegroundService.default.stopService' is undefined) and the app crashed.

I am using SDK 33, react-native 0.64.4

@akvakh @YuliaGrigorieva @aylarov @DmitryIvaneychik

@eisodev
Copy link

eisodev commented Jan 18, 2023

Review the docs again, they added getInstance() to the function call after v3.

Before:
VIForegroundService.stopService();

After:
VIForegroundService.getInstance().stopService();

@gauri-28
Copy link

gauri-28 commented Mar 1, 2023

Still getting same issue

_reactNativeForegroundService.default.stopService is not a function. (In '_reactNativeForegroundService.default.stopService()', '_reactNativeForegroundService.default.stopService' is ### undefined)

After using -> VIForegroundService.getInstance().stopService();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants