Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
If we are using the in memory DB for sqlite (due to not being in a secure context), it's possible for requests to come in after the worker has been setup but before the DB has been setup. With the shared service context, we would wait for the setup to finish but with the in memory db, we used an async IIFE (due to issues using top level await) which was not being awaited before the worker is done initializing.
It's likely this bug was introduced after removing indexed db as that was adding the extra time needed for sqlite to properly setup.
Screenshots (if appropriate)
How to Test
Setup the branch in an http environment that's not localhost.
You could do this using enos or using a tool like ngrok. If using ngrok, you'd need to force the scheme to be http with something like ngrok http --scheme=http 4200. Your browser might also try and force you onto HTTPS with ngrok's urls. For Firefox, I had to set network.stricttransportsecurity.preloadlist to false in about:config.
If you already have an entry in your hosts file for
boundary
that points tolocalhost
as shown in this comment, you could also use that.Checklist
[ ] I have added before and after screenshots for UI changes[ ] I have added JSON response output for API changes[ ] I have added steps to reproduce and test for bug fixes in the description[ ] I have commented on my code, particularly in hard-to-understand areas[ ] I have added tests that prove my fix is effective or that my feature works[ ] I have addeda11y-tests
label to run a11y audit tests if neededPCI review checklist
Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.