Haul: React Native 0.52 Android Delta Bundles

Created on 17 Jan 2018  路  8Comments  路  Source: callstack/haul

In the latest version of react native, android by default tries to load a new 'delta' bundle.
(See: https://github.com/facebook/react-native/blob/79e24ede40b2508aaa77b8ff3876d3dbf4cfe6d8/ReactAndroid/src/main/res/devsupport/xml/preferences.xml)
This results in an error when using Haul because the app requests an index.delta file that is not being served.

The fix is simple though, open the dev menu, select the "Dev Settings" option, then uncheck the "Use JS Deltas" box. Close then re-open your app and it should request the normal javascript bundles as before.

Most helpful comment

I'm sorry to reopen issue. I want to ask you for detox integration.
I cannot disable delta bundles running

detox test --configuration android.emu.debug 

command and an error emitted shows.

2018-03-29 10 52 11

Even if we unchecked using DeltaBundles' check box and restart running test, it doesn't work and the same error shows.

Can it be disable with configuration file or from command line like additional options? or I should wait for next release ?

All 8 comments

This is covered by a PR already :) https://github.com/callstack/haul/pull/327

Closed #334 via #327. Expect it in the next beta release.

I'm sorry to reopen issue. I want to ask you for detox integration.
I cannot disable delta bundles running

detox test --configuration android.emu.debug 

command and an error emitted shows.

2018-03-29 10 52 11

Even if we unchecked using DeltaBundles' check box and restart running test, it doesn't work and the same error shows.

Can it be disable with configuration file or from command line like additional options? or I should wait for next release ?

@tkow same issue here, but I even do not see red box, and I can't invoke dev menu to disable delta budnles :(

Anyone knows how to override default dev settings?

@Strate have you tried beta.14 or rc.0 (with Webpack 4 so breaking)?

@thymikee I am on 1.0.0-beta.14.

Fixed with modifying onCreate method in MainApplication.java:

 @Override
    public void onCreate() {
        super.onCreate();
        DevInternalSettings settings = (DevInternalSettings) getReactGateway().getReactInstanceManager().getDevSupportManager().getDevSettings();
        if (settings != null) {
            settings.setBundleDeltasEnabled(false);
        }      
    }

I'm not sure what getReactGateway() is, but for the MainApplication.java we have, getReactNativeHost() instead works fine.

Updated my reciepe, to support prod mode

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aaronkchsu picture aaronkchsu  路  5Comments

jukben picture jukben  路  6Comments

jurajkrivda picture jurajkrivda  路  4Comments

ellereeeee picture ellereeeee  路  3Comments

xareelee picture xareelee  路  5Comments