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

SDK error handling on initialisation process and network issues #298

Open
rpoltorak opened this issue Mar 4, 2022 · 1 comment
Open

Comments

@rpoltorak
Copy link

I would like to handle two cases:

  1. The SDK is not initialised properly for some reason, for example adblock, other tools that disables scripts, etc.
  2. The SDK is not working properly because the network is blocked and it cannot sent a request for a long period of time

Does the SDK provides a way that we could handle those problems mentioned above? I mean for example I would like to collect the data and push some logs to my backend if the SDK is not initialised properly but I'm afraid I don't have some explicit to do that. Correct me if I'm wrong, but I've tried to use isSdkReady method. Not sure if this is a correct approach but anyway I had to force my linter to use it because it's a private static method. Or maybe there's better way? Unfortunately I don't see anything in the exposed methods that could help.

The second thing is with the network. I don't see any network event handlers that could trigger if the SDK cannot connect to GameAnalytics API.

Any help with this would be much appreciate it :) Thanks in advance.

@the1schwartz
Copy link
Contributor

The SDK will initialize correctly even though it didn't get to get connected with backend as it could be offline to start with.

If the SDK fails to connect to GameAnalytics API, the SDK should try again every 8 seconds to send its cached events to the GA backend.

I am not sure how to properly check if the SDK requests are being blocked by other plugins or scripts in the browser.

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

2 participants