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

mWeb - The animation is not loading at all when use is offline #31236

Closed
2 of 6 tasks
kbecciv opened this issue Nov 11, 2023 · 22 comments
Closed
2 of 6 tasks

mWeb - The animation is not loading at all when use is offline #31236

kbecciv opened this issue Nov 11, 2023 · 22 comments
Assignees

Comments

@kbecciv
Copy link

kbecciv commented Nov 11, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


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:

Issue found when executing PR #30901

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in with any account
  3. Disable the internet
  4. Tab on Fab menu
  5. Tap Save the world
  6. Noticed - no animation is loaded
  7. Tap on avatar
  8. Tap on WS
  9. Noticed - no animation is loaded
  10. Go to Setting - Security
  11. Noticed - no animation is loaded

Expected Result:

The animation is loading when user is offline

Actual Result:

The animation is not loading at all when use is offline

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Screen_Recording_20231111_111412_Chrome.1.mp4

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Nov 11, 2023
@kbecciv
Copy link
Author

kbecciv commented Nov 11, 2023

Issue is not reproducible on production

Screen_Recording_20231111_114023_Chrome.mp4

@OSBotify
Copy link
Contributor

👋 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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Nov 11, 2023

Triggered auto assignment to @AndrewGable (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@kosmydel
Copy link
Contributor

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
Copy link
Contributor

So @roryabraham - Is this expected now?

@roryabraham
Copy link
Contributor

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?

@roryabraham
Copy link
Contributor

Just changing asset/resource to asset/inline doesn't work out-of-the-box, so more research will be needed to try to preload / inline lottie assets.

@roryabraham roryabraham added Weekly KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Nov 14, 2023
@roryabraham
Copy link
Contributor

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.

@roryabraham
Copy link
Contributor

I also think maybe we should put this on HOLD, consolidate discussion in #28160, and treat that as a tracking issue

@melvin-bot melvin-bot bot added the Overdue label Nov 22, 2023
@luacmartins luacmartins changed the title mWeb - The animation is not loading at all when use is offline [HOLD #28160] mWeb - The animation is not loading at all when use is offline Nov 29, 2023
@AndrewGable
Copy link
Contributor

On hold

@melvin-bot melvin-bot bot removed the Overdue label Nov 30, 2023
@roryabraham
Copy link
Contributor

#28160 is closed, but I think we can reasonably put this on HOLD for offline image caching, namely #11425

@roryabraham
Copy link
Contributor

I think it would also be good to get @kosmydel to look into this to see if it can be fixed independently of necolas/react-native-web#2442

@roryabraham roryabraham changed the title [HOLD #28160] mWeb - The animation is not loading at all when use is offline mWeb - The animation is not loading at all when use is offline Nov 30, 2023
@roryabraham
Copy link
Contributor

@roryabraham
Copy link
Contributor

@kosmydel provided an exciting update in the thread. I'm going to put this on HOLD for #31196, because both issues share a common solution.

@roryabraham roryabraham changed the title mWeb - The animation is not loading at all when use is offline [HOLD #31196] mWeb - The animation is not loading at all when use is offline Dec 8, 2023
@roryabraham roryabraham self-assigned this Dec 8, 2023
@roryabraham
Copy link
Contributor

Co-assigning myself as I have good context here

@melvin-bot melvin-bot bot added the Overdue label Dec 18, 2023
@roryabraham
Copy link
Contributor

We've got a WIP PR for this here

@melvin-bot melvin-bot bot removed the Overdue label Dec 20, 2023
@melvin-bot melvin-bot bot added the Overdue label Dec 29, 2023
@roryabraham
Copy link
Contributor

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

@melvin-bot melvin-bot bot removed the Overdue label Dec 29, 2023
@roryabraham roryabraham 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 Dec 29, 2023
@kosmydel
Copy link
Contributor

kosmydel commented Jan 2, 2024

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?

@kosmydel
Copy link
Contributor

kosmydel commented 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.

Screenshot 2024-01-02 at 09 35 38

@roryabraham
Copy link
Contributor

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
Copy link
Contributor

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!

@roryabraham roryabraham 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 Jan 2, 2024
@kosmydel
Copy link
Contributor

kosmydel commented Jan 3, 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.

Oh, thanks for the clarification! Good to know that everything is working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants