Skip to content

debug flag ignored - errors logged #874

@adamcclifton

Description

@adamcclifton

When debug is disabled in the config, debug errors and warnings are still firing.

Primarily the "Failed to send # events." error.
image

I understand that this is not a problem for analytics, as these events are stored and sent later. But these errors are spamming our stability monitoring in production and cannot be disabled.

It seems like this problem was fixed in version 2.10.0 according to this issue:
#704
And if I roll back to version 2.10.0 things work as expected, the errors only appear if debug: true.

So maybe there has been a regression in later releases?

  • analytics-react-native version: 2.16.0 (and 2.15.0 at least)
  • Integrations versions (if used):
  • React Native version: 0.71.10
  • iOS or Android or both? iOS confirmed

Steps to reproduce

  • Create and run app, with debug: true and wifi enabled.
  • Close the app, hopefully this will leave some unsent events.
  • Turn off wifi and relaunch app.
  • Note that the "Failed to send # events." error is triggered. Hopefully it will just work at startup with events from the previous session, otherwise you may have to trigger some events and wait.
  • Now set debug: false and relaunch the app.
  • Note that the "Failed to send # events." error is still appearing, even tho debug is disabled.

Expected behavior
The "Failed to send # events." error does not appear when debug is set to false

Actual behavior
The "Failed to send # events." error is appearing when debug is set to false

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions