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

How to silence console.errors from the SDK? #335

Closed
ethanneff opened this issue Jan 1, 2020 · 3 comments
Closed

How to silence console.errors from the SDK? #335

ethanneff opened this issue Jan 1, 2020 · 3 comments

Comments

@ethanneff
Copy link

Problem

console.error() interrupts React Native apps with a large overlay. This is problematic when debugging the app in offline mode.

Details

I get the following error from the Split SDK when implementing a factory:

console.error: "[ERROR] Split SDK emitted SDK_READY_TIMED_OUT event."
const factory = SplitFactory({
  core: { authorizationKey, key }
});

Screenshot_20191231-200804

Question

How do I silence console.errors from the Split SDK? Even when listening to the event, the console.error still comes through.

client.on(client.Event.SDK_READY_TIMED_OUT, function () {});
@NicoZelaya
Copy link
Contributor

Hi @ethanneff!

I would like to start by offering you my most sincere apologies for dropping the ball on getting back to you, as well as ours for the inconveniences.

It's actually our plan to remove the calls to console.error and just stick with console.log method. We'll also treat these as just another log level instead of always printing.
While it's not an actual error or exception of any kind and it doesn't affect the execution flow (should only be a red message) we've recently learned that some client side tools might consider these as actual errors.

I'll make sure to speed up resolution for this one so we can test and make a patch release before end of week.

Kindest regards,
Nicolas Zelaya.

@ethanneff
Copy link
Author

ethanneff commented Mar 21, 2020

When was this fixed? Our app is currently using 10.10.0 and we are still getting the errors. #351 apparently did not fix this issue 😞

Simulator Screen Shot - iPhone 11 - 2020-03-20 at 15 08 41

@NicoZelaya
Copy link
Contributor

Hi @ethanneff ! Sorry I didn't want to tag you earlier to not generate a notification because I thought we reached out separately but yes, should be fixed. Can you try version 10.11.1 ?

I'm curious why you say PR #351 didn't solve it, how are you testing that? Was included on the 10.11.0 release if I'm not mistaken.

In any case, give a try to 10.11.0 or 10.11.1 and you should be able to turn off error logs and besides, we're not using the console.error method anymore in order to fix these React Native issue.

I'll reopen until I hear back from you.
Thanks in advance!
Nico.

@NicoZelaya NicoZelaya reopened this Mar 21, 2020
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