flutter_branch_sdk icon indicating copy to clipboard operation
flutter_branch_sdk copied to clipboard

PlatformException 1003 - network error on startListening()

Open dgilperez opened this issue 1 year ago • 1 comments
trafficstars

I am seeing some instances of that error in production using 7.02, which are probably perfectly normal. On other SDKs, I use to retry those network errors are they are most likely transient.

In order to do that, the startListening method could better return a future, so we can wait for that result to process correctly, or catch that particular PlatformError and then retry it with some backoff strategy.

Is that even possible here? Would you consider doing that? Any alternative?

Thanks :)

dgilperez avatar Feb 07 '24 11:02 dgilperez

@dgilperez

This error is returned by the native SDK.

In flutter I'm just throwing the exception to the application.

I have to evaluate what Branch suggestion is to deal with these cases.

RodrigoSMarques avatar Feb 07 '24 14:02 RodrigoSMarques

The native SDK is launched before the Dart/Flutter code runs.

If the SDK encountered a network problem at startup, the only way to restart communication is to restart the application or put it in the background and return again.

The native SDK does not provide a method for this.

RodrigoSMarques avatar May 17 '24 14:05 RodrigoSMarques