Closed rdcoder33 closed 2 years ago
Seems like an issue with the firebase extension.
cc: @jasonbosco @kishorenc
@rdcoder33 Could you share the exact reproduction steps?
More specifically: The dart code you're using to write documents.
Could you make sure you've created a collection called "3d_icons" in Typesense? The Firebase extension doesn't create the collection for you - it only syncs documents within a collection.
Could you make sure you've created a collection called "3d_icons" in Typesense? The Firebase extension doesn't create the collection for you - it only syncs documents within a collection.
oh didn't know that. Indexing functions work now but got a Error: XMLHttpRequest error
when searching.
searching code in Flutter Web / Dart:
searchTypeSense() async {
Map<String, String> search = {
'q': 'kid',
'query_by': 'tags',
};
client.collection("3d_icons").documents.search(search);
}
Client Config is same as above (first comment)
@rdcoder33 Could you try doing the same API call using curl and see if you're able to replicate the issue?
@rdcoder33 Could you try doing the same API call using curl and see if you're able to replicate the issue?
It works on curl:
But for the same request and parameters on dart client (pub.dev plugin) is shows following error:
dart-sdk[/lib/async/stream.dart]() 1288:7
I am testing this on flutter web.
@happy-san Any thoughts on this ^
Hi, @rdcoder33 this seems to be a web-specific issue. Looking around I found these links: Hope you'll give them a try.
https://stackoverflow.com/a/66879350/11218270 https://pub.dev/packages/flutter_cors
1- Go to
flutter\bin\cache
and remove a file named:flutter_tools.stamp
2- Go toflutter\packages\flutter_tools\lib\src\web
and open the filechrome.dart
. 3- Find'--disable-extensions'
4- Add'--disable-web-security'
Since this is a separate issue from what you opened, I'd recommend opening a new issue for future reference.
This doesn't solve the problem for me. Same error
@rdcoder33 Can you share the exact response you're receiving from the server?
Specifically the response headers.
Hi @rdcoder33 Did you resolve XMLHttpRequest error?
Ohh sorry for the late reply. Nope, it didn't get solved so we opted for the HTTP request to type sense API rather than using the flutter plugin.
@rdcoder33 Would you care to correspond with me in figuring out a fix?
@rdcoder33 Would you care to correspond with me in figuring out a fix?
I would love to but kinda a busy currently. I will send you the details of the issue by tomorrow (it's nighttime in India) and will try to correspond probably after 2-3 days.
I hope this works for you?
Sure that'll be great. I'm in the same timezone.
Hey, I have installed the extension and using the official Typesense cloud to host but I am getting this error from the firebase cloud function when creating new documents:
Flutter Web/ Dart code:
Below are the screenshots for the extension configuration and firebase functions log: