segmentio / analytics-react-native

The hassle-free way to add analytics to your React-Native app.
https://segment.com/docs/sources/mobile/react-native/
MIT License
354 stars 181 forks source link

[2.19.2] Possible Unhandled Promise Rejection (id: 0): Error: Promise timed out #954

Closed efstathiosntonas closed 3 days ago

efstathiosntonas commented 3 weeks ago

I get this on app start:

Possible Unhandled Promise Rejection (id: 0):
Error: Promise timed out
Error: Promise timed out

and later on:

Promise Rejection Handled (id: 0):
 WARN    This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id 0.

Steps to reproduce

Expected behavior don't know Actual behavior throws promise timeout

efstathiosntonas commented 3 weeks ago

It appears that this is happening only on 2.19.2, downgrading to 2.19.1 does not throw the rejection any more.

gitwilliam commented 2 weeks ago

It may be unrelated, but I was getting the same error mentioned in the OP and also: Queue timeout before completed restoration. Downgrading to 2.19.1 resolved both of them.

alanjcharles commented 2 weeks ago

hi folks thanks for the report- will prioritize this and follow up asap.

alanjcharles commented 2 weeks ago

@efstathiosntonas @gitwilliam At present, the only PR I can find related to this issue is #943. From what I can tell in my investigation so far, these errors on app launch are expected and described in detail in that PR mentioned above. The change was introduced to prevent flushing before plugins (including SegmentDestination) are initialized. I can reproduce the warnings you are seeing but I am not experiencing any event loss.

Please let me know if you are experiencing event loss or any other unintended/regressive behavior and we can go from there.

jvgeee commented 2 weeks ago

@alanjcharles No event loss, but I'm getting these errors every few seconds when running my app (not just at app launch). Please have them as opt-in through a config flag or something, it's clogging up my debug terminal!

image
efstathiosntonas commented 2 weeks ago

@alanjcharles same as @jvgeee, It’s clogging the terminal and it’s really annoying since our minds automatically tries to find out what is going on when we see a promise rejection happening 😂

paulina-grunwald commented 2 weeks ago

I have same problems. any solutions?

engineeringcontractorstockpile commented 2 weeks ago

We also have that here.

dwxw commented 1 week ago

Same here.

ijhar8 commented 1 week ago

getting same error on 2.19.1 with sdk "expo": "50.0.19"

AuroPick commented 5 days ago

same warning on 2.19.1

hvardhan-unth commented 3 days ago

Addressed in #966

thianphat commented 1 day ago

Addressed in #966

Getting this still