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

When DevTools are open in Safari, the database query hangs forever #3442

Open
eeeedgar opened this issue Jan 30, 2025 · 7 comments
Open

When DevTools are open in Safari, the database query hangs forever #3442

eeeedgar opened this issue Jan 30, 2025 · 7 comments

Comments

@eeeedgar
Copy link

eeeedgar commented Jan 30, 2025

When the Safari DevTools are open, a database query hangs indefinitely.
Closing the DevTools in Safari (or using any other browser) makes the query run as expected.

Environment

  • Safari version: 18.3
  • Flutter web with Drift (2.24.0)
  • Problem is reproducible only in Safari with open DevTools.

Steps to Reproduce

  1. Create a Flutter web app that uses Drift for local database access.
  2. Implement a simple query, for example:
Future<List<DataObject>> getData() async {
    return await database.select(table).get();
}
  1. Build and run this Flutter web app locally or deploy it somewhere accessible.
  2. Open the app in Safari (version 18.3 tested).
  3. Open the Safari DevTools (e.g., via Develop > Show Web Inspector).
  4. Refresh the page so that the query runs once again on load.

This method is executed in the Data Access Layer once when the page is refreshed.

Additional Notes

  • No errors or warnings appear in the console when the query hangs.
  • Other browsers (Chrome, Firefox, Edge) do not exhibit this behavior, even with their DevTools open.
  • The issue arises consistently on every page refresh when Safari DevTools is open.
@JPGmooder
Copy link

Same here +1

@eeeedgar eeeedgar changed the title When DevTools is open in Safari, the database query hangs forever When DevTools are open in Safari, the database query hangs forever Jan 30, 2025
@MaximKuzin862
Copy link

+1

@dickermoshe
Copy link
Collaborator

Anything glaring in the browser console?

@eeeedgar
Copy link
Author

eeeedgar commented Feb 3, 2025

@dickermoshe no, nothing related

@simolus3
Copy link
Owner

simolus3 commented Feb 3, 2025

Thanks for the report! Was the associated drift worker also from the 2.24.0 release?

@eeeedgar
Copy link
Author

eeeedgar commented Feb 4, 2025

@simolus3 yes

@simolus3
Copy link
Owner

simolus3 commented Feb 5, 2025

Can you reproduce this with new drift project? I tried reproducing this with the examples/web_worker_example/ project in this repository, but the query stream keeps working with the console open in Safari.

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

5 participants