question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Background JS loading not behaving as expected in SDK 25, leading to slow app launch

See original GitHub issue

I have a production app built with sdk 24 (I’m not upgrading to sdk 25 since the startup of the app is much slower with that) with loadJSInBackgroundExperimental enabled. I also have following in my app.json

    "assetBundlePatterns": [
      "assets/fonts/*",
      "node_modules/@expo/vector-icons/fonts/*"
    ],

which is supposed to bundle everything I have inside the app.

The issue is that at the first start with a slow internet connection app is stuck at loading screen until it loads all of the assets or js bundle (not sure which).

I also get following error in Sentry:

Error: Could not download from 'https://d1wp6m56sqw74a.cloudfront.net/~assets/d2285965fe34b05465047401b8595dd0'
  at None (app:///main.ios.bundle:18:806)
  at None (app:///main.ios.bundle:18:860)
  at value (app:///main.ios.bundle:20:3368)
  at None (app:///main.ios.bundle:20:1141)
  at value (app:///main.ios.bundle:20:2507)
...
(1 additional frame(s) were not displayed)

I’m pretty sure it used to be working for me because I tested it with Charles proxy.

Is there any way to disable loading assets and js bundle at all to make sure first app start (which can be last in case someone has to wait for THAT long) takes reasonable time or at least doesn’t depend on Expo backend? That would be the only real solution I see.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ArsenyYankovskycommented, Feb 6, 2018

This affects both iOS and Android and not only the first launch. Second and further launches have two “blocking” facebook and exp.host calls (up to 5 seconds combined).

0reactions
terriblebencommented, Mar 30, 2018

Hey everyone who was taking a look at this thread - can you try with SDK 26? We redid the way the app fetches updates.

We didn’t pay special attention to requests made by our third party libs like Facebook. It’s possible you’ll still see network traffic from those. Let us know if it seems to be adversely affecting your app launch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How We Reduced Our React App's Load Time by 60% - InfoQ
Loading extra code means slower downloads and more work for the browser, leading to slower response times.
Read more >
Slow Requests on Local Flask Server - python - Stack Overflow
Just a simple server like the following takes close to 5 seconds to respond. from flask import Flask app = Flask(__name__) @app.route("/") ...
Read more >
Improving Your App's Performance - Apple Developer
An app that takes a long time to launch, or responds slowly to input, may appear to the user as if it's not...
Read more >
Restrictions on starting activities from the background
Android 10 (API level 29) and higher place restrictions on when apps can start activities when the app is running in the background....
Read more >
Common issues and resolutions for Power Apps
Disable all browser extensions and add-ons. Try with another device, if possible. Known issues. Power Apps Studio is not accessible from Power ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found