You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mWeb - The animation is not loading at all when use is offline #31236
Version Number: 1.3.98.0 Reproducible in staging?: y Reproducible in production?: n If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
it is related to this PR. As the animations were moved from the bundle to the assets, we don't load them on the app initialization to reduce TTI and bundle size. The animations are loaded as soon as the network is available. It is similar behavior to displaying an image.
I think so, but TBH we didn't really discuss it broadly. I don't think we need to block deploy on this but should probably have a conversation about it. Maybe we can inline the .lottie assets using asset/inline instead of asset/resource?
I'd say this is a weekly, TBD if it's really a problem we need to solve or not. Some thoughts:
It might be even less of a problem when we get offline browser-level image caching set up
Maybe we could get an SVG snapshot of each animation that's inlined in the HTML and display that while the lottie animation is loading
Or maybe we can find a way to either inline or preload .lottie assets. If we could preload them like fonts when the page loads that could be a good way to address the problem
Someday we could also look at setting up service workers in our app to build better cross-session browser caching of all assets.
I think if we get good caching and potentially also preload .lottie assets like we do for our web fonts, we could eliminate most scenarios where a user could possibly see this type of bug or similar bugs where there's a delay before the animation loads.
Prefetching is not working, but for me image caching is not working in production at all. That's still being tracked over here, so I'm putting this on HOLD for that
changed the title [-][HOLD #31196] mWeb - The animation is not loading at all when use is offline[/-][+][HOLD #12603] mWeb - The animation is not loading at all when use is offline[/+]on Dec 29, 2023
Prefetching is not working, but for me image caching is not working in production at all. That's still being tracked over here, so I'm putting this on HOLD for that
@roryabraham I'm sorry to hear that. I've quickly tested it on the production, and both prefetching and caching work for me:
production.mov
Can you please give me additional information about the method you use to test it?
Ok, I probably found out the reason for that. I assume you use Safari, not Chrome. And prefetching is not supported by Safari. It is hidden behind the feature flag.
And I'm now realizing that this issue is indeed fixed – I made yet another mistake because I had disable caching checked in the network tab. Unchecking that fixed this issue too.
Thanks for all your work here @kosmydel, closing this out!
changed the title [-][HOLD #12603] mWeb - The animation is not loading at all when use is offline[/-][+]mWeb - The animation is not loading at all when use is offline[/+]on Jan 2, 2024
Activity
kbecciv commentedon Nov 11, 2023
Issue is not reproducible on production
Screen_Recording_20231111_114023_Chrome.mp4
OSBotify commentedon Nov 11, 2023
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
StagingDeployCashdeploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:melvin-bot commentedon Nov 11, 2023
Triggered auto assignment to @AndrewGable (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.kosmydel commentedon Nov 13, 2023
Hey,
it is related to this PR. As the animations were moved from the bundle to the assets, we don't load them on the app initialization to reduce TTI and bundle size. The animations are loaded as soon as the network is available. It is similar behavior to displaying an image.
AndrewGable commentedon Nov 13, 2023
So @roryabraham - Is this expected now?
roryabraham commentedon Nov 14, 2023
I think so, but TBH we didn't really discuss it broadly. I don't think we need to block deploy on this but should probably have a conversation about it. Maybe we can inline the
.lottieassets usingasset/inlineinstead ofasset/resource?roryabraham commentedon Nov 14, 2023
Just changing
asset/resourcetoasset/inlinedoesn't work out-of-the-box, so more research will be needed to try to preload / inline lottie assets.roryabraham commentedon Nov 14, 2023
I'd say this is a weekly, TBD if it's really a problem we need to solve or not. Some thoughts:
.lottieassets. If we could preload them like fonts when the page loads that could be a good way to address the problemI think if we get good caching and potentially also preload
.lottieassets like we do for our web fonts, we could eliminate most scenarios where a user could possibly see this type of bug or similar bugs where there's a delay before the animation loads.15 remaining items
roryabraham commentedon Dec 8, 2023
Co-assigning myself as I have good context here
roryabraham commentedon Dec 20, 2023
We've got a WIP PR for this here
roryabraham commentedon Dec 29, 2023
Prefetching is not working, but for me image caching is not working in production at all. That's still being tracked over here, so I'm putting this on HOLD for that
[-][HOLD #31196] mWeb - The animation is not loading at all when use is offline[/-][+][HOLD #12603] mWeb - The animation is not loading at all when use is offline[/+]kosmydel commentedon Jan 2, 2024
@roryabraham I'm sorry to hear that. I've quickly tested it on the production, and both prefetching and caching work for me:
production.mov
Can you please give me additional information about the method you use to test it?
kosmydel commentedon Jan 2, 2024
Ok, I probably found out the reason for that. I assume you use Safari, not Chrome. And prefetching is not supported by Safari. It is hidden behind the feature flag.
roryabraham commentedon Jan 2, 2024
Oh, sorry for the typo @kosmydel – I meant to say that prefetching is now working but online caching was not. Bad mistake to make...
and nope, I'm using Chrome.
roryabraham commentedon Jan 2, 2024
And I'm now realizing that this issue is indeed fixed – I made yet another mistake because I had
disable cachingchecked in the network tab. Unchecking that fixed this issue too.Thanks for all your work here @kosmydel, closing this out!
[-][HOLD #12603] mWeb - The animation is not loading at all when use is offline[/-][+]mWeb - The animation is not loading at all when use is offline[/+]kosmydel commentedon Jan 3, 2024
Oh, thanks for the clarification! Good to know that everything is working!