analytics-react-native icon indicating copy to clipboard operation
analytics-react-native copied to clipboard

Queue timeout before completed restoration

Open zgordon02 opened this issue 1 year ago • 9 comments

  • analytics-react-native version: ^2.19.2
  • Integrations versions (if used): N/A
  • React Native version: 0.72.1 AND 0.74.3
  • iOS or Android or both? BOTH

Screenshot 2024-07-10 at 1 04 04 PM

Steps to reproduce Send various screen and track events

Here is an example screen event I am sending: SCREEN event saved {"name": "TEST_SCREEN", "properties": {"_environment": "LOCAL", "_otaVersion": "N/A"}, "type": "screen"}

Expected behavior No warning Actual behavior This warning appears multiple times per session. However, the events are shown properly in the segment console

zgordon02 avatar Jul 10 '24 18:07 zgordon02

Important to note that I have left almost all options to their default:

    segmentClient.current = createClient({
      writeKey: environment?.segmentKey,
      trackAppLifecycleEvents: true,
    });

zgordon02 avatar Jul 10 '24 19:07 zgordon02

++ Also getting this.

"@segment/analytics-react-native": "^2.17.0",

mayfairr avatar Jul 13 '24 12:07 mayfairr

I am also getting same warnings... checkerror

umairmaqbool3 avatar Jul 15 '24 18:07 umairmaqbool3

Same here with version 2.19.2. Adding a comment to get notifications on this thread 👌

mcoeur avatar Jul 18 '24 14:07 mcoeur

Also seeing these warnings spewed in my console.

seanadkinson avatar Jul 18 '24 17:07 seanadkinson

Same here, any ideas how to suppress or silence these warnings?

MarkKravchuk avatar Jul 18 '24 18:07 MarkKravchuk

Same here, any ideas how to suppress or silence these warnings?

I have not tried this, but the code should be something like this:

import { LogBox } from 'react-native';
// ...
LogBox.ignoreLogs(["An internal error occurred: Error: Queue timeout before completed restoration"]);

That being said, I would not recommend ignoring the warning. Segment should fix it

zgordon02 avatar Jul 18 '24 18:07 zgordon02

I think this is caused by this recent change https://github.com/segmentio/analytics-react-native/pull/943

The QueueFlushingPlugin has a default timeout of 500ms and it will fail if it's not intialized within that time. But in our testing it sometimes takes 2 seconds for the entire thing to be ready. So it will block every events from being sent.

leethree avatar Jul 19 '24 13:07 leethree

So it will block every events from being sent.

FWIW I have not noticed events dropped while seeing this warning. It appears to be functioning normally

zgordon02 avatar Jul 19 '24 14:07 zgordon02

Also getting this, following.

anon-r-7 avatar Jul 31 '24 15:07 anon-r-7

also seeing this after upgrading

CoryWritesCode avatar Aug 01 '24 15:08 CoryWritesCode

+1

itajenglish avatar Aug 11 '24 05:08 itajenglish

Commenting to get updated

DAVIS-PYTH avatar Aug 18 '24 10:08 DAVIS-PYTH

I think this has been fixed in the last release. I no longer these warnings anymore after updating.

itajenglish avatar Aug 18 '24 13:08 itajenglish

Thanks @itajenglish

installing version 2.19.4 fixed this for me.

PS: I reached out on LinkedIn

DAVIS-PYTH avatar Aug 18 '24 14:08 DAVIS-PYTH

Seeing that others have mentioned it's fixed in the latest release, I'm closing this issue.

zgordon02 avatar Aug 19 '24 14:08 zgordon02

It might be related. After upgrading to 2.19.4, I keep getting this in the log

INFO Flush triggered but queue restoration and settings loading not complete. Flush will be retried.

image

dhatGuy avatar Aug 19 '24 14:08 dhatGuy

same here with @dhatGuy

DAVIS-PYTH avatar Aug 19 '24 16:08 DAVIS-PYTH

@dhatGuy I could repoen this issue, but that warning may be unrelated to this one. Can you create a new issue?

zgordon02 avatar Aug 19 '24 16:08 zgordon02

@dhatGuy I could repoen this issue, but that warning may be unrelated to this one. Can you create a new issue?

Yes, I have https://github.com/segmentio/analytics-react-native/issues/989

dhatGuy avatar Aug 19 '24 17:08 dhatGuy

+1, also getting "Flush triggered but queue restoration and settings loading not complete. Flush will be retried" only after the upgrade.

anon-r-7 avatar Aug 26 '24 13:08 anon-r-7