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

fix(supabase_flutter): Add timeout to Hive.openBox to fix hanging issue #799

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

dshukertjr
Copy link
Member

What kind of change does this PR introduce?

Currently when initializing Supabase within Safari while dev tool is opened, Supabase.initialize() hangs leaving the user with just a white screen.

This is caused by await Hive.openBox(_hiveBoxName, encryptionCipher: encryptionCipher); hanging. Although the reason for why the function does not complete is unknown, we could at least add a timeout so that when it does hang, we can at least catch the TimeoutException and proceed.

Fixes #794

@dshukertjr dshukertjr requested a review from Vinzent03 January 17, 2024 13:39
@dshukertjr dshukertjr merged commit 7fc3ed0 into main Jan 18, 2024
3 checks passed
@dshukertjr dshukertjr deleted the fix/hive-safari branch January 18, 2024 17:17
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.

Supabase stops initialization on safari with dev tools open after page refresh
2 participants