title: react native bundle exception java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at BundleDeltaClient
body: <p>I am trying to run react-native RNTester demo app, but after the bundlingthe app crashes with below exception.</p>
  
  <pre><code>12-12 21:05:08.640 25808-25834/com.facebook.react.uiapp E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
      Process: com.facebook.react.uiapp, PID: 25808
      java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY
          at android.util.JsonReader.nextString(JsonReader.java:408)
          at com.facebook.react.devsupport.BundleDeltaClient$BundleDeltaJavaClient.processDelta(BundleDeltaClient.java:103)
          at com.facebook.react.devsupport.BundleDeltaClient.processDelta(BundleDeltaClient.java:71)
          at com.facebook.react.devsupport.BundleDownloader.processBundleResult(BundleDownloader.java:314)
          at com.facebook.react.devsupport.BundleDownloader.access$200(BundleDownloader.java:37)
          at com.facebook.react.devsupport.BundleDownloader$1.onResponse(BundleDownloader.java:174)
          at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153)
          at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
          at java.lang.Thread.run(Thread.java:760)
  </code></pre>
  
  <blockquote>
    <p>Package.json</p>
  </blockquote>
  
  <pre><code>{
    "name": "react-native",
    "version": "1000.0.0",
    "description": "A framework for building native apps using React",
    "license": "MIT",
    "repository": {
      "type": "git",
      "url": "git@github.com:facebook/react-native.git"
    },
    "engines": {
      "node": "&gt;=8.3"
    },
    "prettier": {
      "requirePragma": true,
      "singleQuote": true,
      "trailingComma": "all",
      "bracketSpacing": false,
      "jsxBracketSameLine": true,
      "parser": "flow"
    },
    "jest": {
      "transform": {
        "^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$": "&lt;rootDir&gt;/jest/assetFileTransformer.js",
        ".*": "./jest/preprocessor.js"
      },
      "setupFiles": [
        "./jest/setup.js"
      ],
      "timers": "fake",
      "moduleNameMapper": {
        "^React$": "&lt;rootDir&gt;/Libraries/react-native/React.js"
      },
      "testRegex": "/__tests__/.*-test\\.js$",
      "testPathIgnorePatterns": [
        "/node_modules/",
        "&lt;rootDir&gt;/template",
        "Libraries/Renderer",
        "RNTester/e2e"
      ],
      "haste": {
        "defaultPlatform": "ios",
        "hasteImplModulePath": "&lt;rootDir&gt;/jest/hasteImpl.js",
        "providesModuleNodeModules": [
          "react-native"
        ],
        "platforms": [
          "ios",
          "android"
        ]
      },
      "modulePathIgnorePatterns": [
        "/node_modules/(?!react|fbjs|react-native|react-transform-hmr|core-js|promise)/",
        "node_modules/react/node_modules/fbjs/",
        "node_modules/react/lib/ReactDOM.js",
        "node_modules/fbjs/lib/Map.js",
        "node_modules/fbjs/lib/Promise.js",
        "node_modules/fbjs/lib/fetch.js",
        "node_modules/fbjs/lib/ErrorUtils.js",
        "node_modules/fbjs/lib/URI.js",
        "node_modules/fbjs/lib/Deferred.js",
        "node_modules/fbjs/lib/PromiseMap.js",
        "node_modules/fbjs/lib/UserAgent.js",
        "node_modules/fbjs/lib/areEqual.js",
        "node_modules/fbjs/lib/base62.js",
        "node_modules/fbjs/lib/crc32.js",
        "node_modules/fbjs/lib/everyObject.js",
        "node_modules/fbjs/lib/fetchWithRetries.js",
        "node_modules/fbjs/lib/filterObject.js",
        "node_modules/fbjs/lib/flattenArray.js",
        "node_modules/fbjs/lib/forEachObject.js",
        "node_modules/fbjs/lib/isEmpty.js",
        "node_modules/fbjs/lib/removeFromArray.js",
        "node_modules/fbjs/lib/resolveImmediate.js",
        "node_modules/fbjs/lib/someObject.js",
        "node_modules/fbjs/lib/sprintf.js",
        "node_modules/fbjs/lib/xhrSimpleDataSerializer.js",
        "node_modules/jest-cli",
        "node_modules/react/dist",
        "node_modules/fbjs/.*/__mocks__/",
        "node_modules/fbjs/node_modules/"
      ],
      "unmockedModulePathPatterns": [
        "node_modules/react/",
        "Libraries/Renderer",
        "promise",
        "source-map",
        "fastpath",
        "denodeify",
        "fbjs"
      ],
      "testEnvironment": "node",
      "collectCoverageFrom": [
        "Libraries/**/*.js"
      ],
      "coveragePathIgnorePatterns": [
        "/__tests__/",
        "/vendor/",
        "&lt;rootDir&gt;/Libraries/react-native/"
      ]
    },
    "main": "Libraries/react-native/react-native-implementation.js",
    "files": [
      ".flowconfig",
      "android",
      "cli.js",
      "flow",
      "flow-github",
      "init.sh",
      "scripts/ios-configure-glog.sh",
      "scripts/ios-install-third-party.sh",
      "scripts/launchPackager.bat",
      "scripts/launchPackager.command",
      "scripts/packager.sh",
      "scripts/react-native-xcode.sh",
      "jest-preset.json",
      "jest",
      "lib",
      "rn-get-polyfills.js",
      "Libraries",
      "LICENSE",
      "packager",
      "react.gradle",
      "React.podspec",
      "React",
      "ReactAndroid",
      "ReactCommon",
      "README.md",
      "third-party-podspecs"
    ],
    "scripts": {
      "start": "node cli.js start",
      "test": "jest",
      "test-ci": "JEST_JUNIT_OUTPUT=\"reports/junit/js-test-results.xml\" jest --maxWorkers=2 --ci --testResultsProcessor=\"jest-junit\"",
      "flow": "flow",
      "flow-check-ios": "flow check",
      "flow-check-android": "flow check --flowconfig-name .flowconfig.android",
      "lint": "eslint .",
      "prettier": "prettier \"./**/*.js\" --write",
      "docker-setup-android": "docker pull reactnativeci/android-base:latest",
      "docker-build-android-base": "docker build -t reactnativeci/android-base -f ContainerShip/Dockerfile.android-base .",
      "docker-build-android": "docker build -t reactnativeci/android -f ContainerShip/Dockerfile.android .",
      "test-android-run-instrumentation": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash ContainerShip/scripts/run-android-docker-instrumentation-tests.sh",
      "test-android-run-unit": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash ContainerShip/scripts/run-android-docker-unit-tests.sh",
      "test-android-run-e2e": "docker run --privileged -it reactnativeci/android bash ContainerShip/scripts/run-ci-e2e-tests.sh --android --js",
      "test-android-all": "yarn run docker-build-android &amp;&amp; yarn run test-android-run-unit &amp;&amp; yarn run test-android-run-instrumentation &amp;&amp; yarn run test-android-run-e2e",
      "test-android-instrumentation": "yarn run docker-build-android &amp;&amp; yarn run test-android-run-instrumentation",
      "test-android-unit": "yarn run docker-build-android &amp;&amp; yarn run test-android-run-unit",
      "test-android-e2e": "yarn run docker-build-android &amp;&amp; yarn run test-android-run-e2e",
      "build-ios-e2e": "detox build -c ios.sim.release",
      "test-ios-e2e": "detox test -c ios.sim.release --cleanup"
    },
    "peerDependencies": {
      "react": "16.6.3"
    },
    "dependencies": {
      "@babel/runtime": "^7.0.0",
      "absolute-path": "^0.0.0",
      "art": "^0.10.0",
      "base64-js": "^1.1.2",
      "chalk": "^2.4.1",
      "commander": "^2.9.0",
      "compression": "^1.7.1",
      "connect": "^3.6.5",
      "create-react-class": "^15.6.3",
      "debug": "^2.2.0",
      "denodeify": "^1.2.1",
      "envinfo": "^5.7.0",
      "errorhandler": "^1.5.0",
      "escape-string-regexp": "^1.0.5",
      "event-target-shim": "^1.0.5",
      "fbjs": "^1.0.0",
      "fbjs-scripts": "^1.0.0",
      "fs-extra": "^1.0.0",
      "glob": "^7.1.1",
      "graceful-fs": "^4.1.3",
      "inquirer": "^3.0.6",
      "invariant": "^2.2.4",
      "jest": "24.0.0-alpha.6",
      "jest-junit": "5.2.0",
      "lodash": "^4.17.5",
      "metro": "0.50.0",
      "metro-babel-register": "0.50.0",
      "metro-core": "0.50.0",
      "metro-memory-fs": "0.50.0",
      "mime": "^1.3.4",
      "minimist": "^1.2.0",
      "mkdirp": "^0.5.1",
      "morgan": "^1.9.0",
      "node-fetch": "^2.2.0",
      "node-notifier": "^5.2.1",
      "npmlog": "^2.0.4",
      "nullthrows": "^1.1.0",
      "opn": "^3.0.2",
      "optimist": "^0.6.1",
      "plist": "^3.0.0",
      "pretty-format": "24.0.0-alpha.6",
      "promise": "^7.1.1",
      "prop-types": "^15.5.8",
      "react-clone-referenced-element": "^1.0.1",
      "react-devtools-core": "^3.4.2",
      "react-native-local-cli": "1.0.0-alpha.4",
      "regenerator-runtime": "^0.11.0",
      "rimraf": "^2.5.4",
      "semver": "^5.0.3",
      "serve-static": "^1.13.1",
      "shell-quote": "1.6.1",
      "stacktrace-parser": "^0.1.3",
      "ws": "^1.1.5",
      "xcode": "^1.0.0",
      "xmldoc": "^0.4.0",
      "yargs": "^9.0.0"
    },
    "devDependencies": {
      "@babel/core": "^7.0.0",
      "@babel/generator": "^7.0.0",
      "@reactions/component": "^2.0.2",
      "async": "^2.4.0",
      "babel-eslint": "9.0.0",
      "detox": "9.0.4",
      "coveralls": "^3.0.2",
      "eslint": "5.1.0",
      "eslint-config-fb-strict": "22.1.0",
      "eslint-config-fbjs": "2.0.1",
      "eslint-plugin-eslint-comments": "^3.0.1",
      "eslint-plugin-flowtype": "2.43.0",
      "eslint-plugin-jest": "21.8.0",
      "eslint-plugin-prettier": "2.6.0",
      "eslint-plugin-react": "7.8.2",
      "eslint-plugin-react-native": "3.5.0",
      "flow-bin": "^0.87.0",
      "jest": "24.0.0-alpha.6",
      "jest-junit": "5.2.0",
      "prettier": "1.13.6",
      "react": "16.6.3",
      "react-native-dummy": "0.1.0",
      "react-test-renderer": "16.6.3",
      "shelljs": "^0.7.8"
    },
    "detox": {
      "test-runner": "jest",
      "runner-config": "RNTester/e2e/config.json",
      "specs": "RNTester/e2e",
      "configurations": {
        "ios.sim.release": {
          "binaryPath": "RNTester/build/Build/Products/Release-iphonesimulator/RNTester.app/",
          "build": "xcodebuild -project RNTester/RNTester.xcodeproj -scheme RNTester -configuration Release -sdk iphonesimulator -derivedDataPath RNTester/build -UseModernBuildSystem=NO -quiet",
          "type": "ios.simulator",
          "name": "iPhone 8"
        },
        "ios.sim.debug": {
          "binaryPath": "RNTester/build/Build/Products/Debug-iphonesimulator/RNTester.app/",
          "build": "xcodebuild -project RNTester/RNTester.xcodeproj -scheme RNTester -configuration Debug -sdk iphonesimulator -derivedDataPath RNTester/build -UseModernBuildSystem=NO -quiet",
          "type": "ios.simulator",
          "name": "iPhone 8"
        }
      }
    }
  }
  </code></pre>
  
  <p><strong>Steps to reproduce</strong></p>
  
  <ol>
  <li>Cloned <a href="https://github.com/facebook/react-native" rel="nofollow noreferrer">https://github.com/facebook/react-native</a> project directly.</li>
  <li>RNTester (gradlew RNTester:android:app:installDebug). </li>
  <li>Started the npm server (npm start). Bundling completed 100%. </li>
  <li>As soon as it finish bundling app is crashing.</li>
  </ol>
  
  <p><strong>Device details:</strong></p>
  
  <ul>
  <li>Device tested on : Amazon Fire TV stick, Lenovo Yoga tab 10, Redmi
  4A. </li>
  <li>OS: Windows 10.</li>
  </ul>
  
  <p>Thank you for the help.</p>