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

Warning: Possible Unhandled Promise Rejection (id: 0) #378

Open
arstropica opened this issue Jun 21, 2023 · 0 comments
Open

Warning: Possible Unhandled Promise Rejection (id: 0) #378

arstropica opened this issue Jun 21, 2023 · 0 comments

Comments

@arstropica
Copy link

arstropica commented Jun 21, 2023

Current Behavior

I get this warning after every pingInterval call.

Possible Unhandled Promise Rejection (id: 0):
    SyntaxError: Unexpected end of JSON input
    SyntaxError: Unexpected end of JSON input

The plugin works perfectly otherwise, and I have confirmed that my networkSaga and network reducer are configured correctly. (I can see the network state from Redux's @@INIT action onward. I have also tried using my own private ping server with no difference.

FYI - I didn't set up the network middleware as I am not looking to preserve the state when a user goes offline. Instead, I have another saga that tracks offlineActionTypes.CONNECTION_CHANGE and navigates to my offline screen if the payload changes to false, or back to my main screen if it changes to true.

software version
react-native-offline 6.0.2
react-native 0.63.2
node 14.19.1
npm or yarn yarn (1.22.19)

Any help would be greatly appreciated.

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

1 participant