Skip to content

Conversation

@deepraj02
Copy link
Contributor

The sendTimeout was being applied to ALL requests, including GET requests which don't have a request body. On the web platform, Dio correctly warns that sendTimeout should only be used with requests that have a body to send.

Fixes :

  • Modified the sendTimeout property in the FlagsmithConfig class to set it to null when running on web platforms (kIsWeb), ensuring compatibility with environments where timeouts may not be applicable.

Logs (before vs after) :
flagsmith2

flagsmith1

Copy link
Contributor

@emyller emyller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deepraj02 Thanks for the contribution! The fix looks good, though can you please explain the amount of dependency changes? If possible, we'd prefer to handle these in a separate effort.

@deepraj02
Copy link
Contributor Author

only imported the kIsWeb from package:flutter/foundation.dart to tackle the issue.

@emyller
Copy link
Contributor

emyller commented Jul 7, 2025

@deepraj02 Nice. Can you please revert then the changes to lock files? I believe they're unrelated with this fix.

@deepraj02
Copy link
Contributor Author

yeah sure, my bad @emyller

@deepraj02 deepraj02 force-pushed the fix-noisy-debug-logs branch from 7b1a178 to 016c4e0 Compare July 7, 2025 21:54
@deepraj02
Copy link
Contributor Author

@emyller done !

@emyller emyller merged commit 753ce81 into Flagsmith:main Jul 7, 2025
3 checks passed
@emyller
Copy link
Contributor

emyller commented Jul 7, 2025

Thanks @deepraj02! Your fix will be included in our next release of the Flutter client. :)

@deepraj02
Copy link
Contributor Author

@emyller Sounds great!

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

Successfully merging this pull request may close these issues.

Flagsmith client noisy warning logs in debug mode

2 participants