Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendTimeout warning/error on flutter Web #16

Open
Martin-QPT opened this issue Aug 11, 2024 · 1 comment
Open

sendTimeout warning/error on flutter Web #16

Martin-QPT opened this issue Aug 11, 2024 · 1 comment

Comments

@Martin-QPT
Copy link

I'm running algoliasearch 1.22.0 on Flutter Web and keep getting the following error:
[🔔 Dio] sendTimeout cannot be used without a request body to send on Web
[🔔 Dio] _StackTrace (../dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 843:28 get current
....

This is the Repository where the Algolia is configured:
class UsersSearchRepository {
const UsersSearchRepository(this._algoliaSearchClient);
final SearchClient _algoliaSearchClient;

Future<List> search(String inputSearchText) async {
final queryHits = SearchParamsObject(
query: inputSearchText,
);
/
final responseHits = await _algoliaSearchClient.searchSingleIndex(
indexName: 'app_users_collection',
searchParams: queryHits,
);
return responseHits.hits.map((searchHit) {
return AppUser.fromMap(searchHit.toJson());
}).toList();
}
}

Initialized below:
@Riverpod(keepAlive: true)
UsersSearchRepository usersSearchRepository(UsersSearchRepositoryRef ref) {

final algoliaSearch = SearchClient(
appId: 'Foo',
apiKey: 'Bar,
);

return UsersSearchRepository(algoliaSearch);
}

@ilmarfreitas
Copy link

The same exception happens to me too.

algolia_helper_flutter: 1.1.0

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

No branches or pull requests

2 participants