Skip to content

XMLHttpRequest error while using http post flutter web #143

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

Open
deniscass opened this issue May 1, 2024 · 3 comments
Open

XMLHttpRequest error while using http post flutter web #143

deniscass opened this issue May 1, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@deniscass
Copy link

Describe the bug

I`m attempt use a self installed typesense server to get better search in my Flutter web project.
Is a simple personal project to start learning about typesense. But i get issues to get server access in my flutter web lcoalhost develop machine. with a generic error:

XMLHttpRequest error in search and crud operations to add content to index search.
I`m using Postman client to test my server and all wordks fine, but in Flutter web no.
I check api keys, SSL cert with Letsencrypt certificate, and no work.

I attempt use enable-cors and disable it too, but no working too.

Some tips to get search and upsert functions working?

Thanks in advance

Steps to reproduce the behavior:

  1. Follow steps in pub.dev/typesense
  2. Install typesense-serve in Ubuntu server linux
  3. Setup a new flutter project
  4. Atempt start search or add data to typesense from flutter web
@deniscass deniscass added the bug Something isn't working label May 1, 2024
@happy-san
Copy link
Collaborator

Hello @deniscass
Did you use this guide to install typesense? https://typesense.org/docs/guide/install-typesense.html#deb-package-on-ubuntu-debian

You will have to enable CORS typesense instance
https://typesense.org/docs/26.0/api/server-configuration.html#cors

@deniscass
Copy link
Author

deniscass commented May 2, 2024 via email

@happy-san
Copy link
Collaborator

#116 (comment)
This user also had the same issue and he said it worked fine with direct HTTP call
https://pub.dev/packages/http#using
Could you try if this works for you also? I can then take a closer look into the package itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants