Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

[RN 0.50] Version doesn't get pushed, ls: "No installs recorded" #1072

Closed

Description

@fungilation

Steps to Reproduce

  1. Ran code-push release-react [APP] ios --outputDir ../[APP]-bundle -d Production
  2. Built app in Xcode, with native modules update that can't be pushed by CodePush
  3. Run app, quit and restart to get latest Code Pushed versions

Expected Behavior

Pushed code version gets deployed

Actual Behavior

"No installs recorded" on pushed version, after running code-push deployment ls [APP] and quit, restart app.

$ code-push deployment ls [APP]:
screenshot 2017-11-06 11 43 32

Error recorded on Sentry.io: https://sentry.io/share/issue/14c81f416a6c4a3899ee2950dc53aa1b/

Environment

  • react-native-code-push version: 5.1.3-beta
  • react-native version: 0.50.1
  • iOS/Android/Windows version: iOS
  • Does this reproduce on a debug build or release build? Release
  • Does this reproduce on a simulator, or only on a physical device? Physical

$ react-native info:

Environment:
  OS: macOS Sierra 10.12.6
  Node: 8.9.0
  Yarn: 1.3.2
  npm: 5.5.1
  Watchman: 4.9.0
  Xcode: Xcode 9.1 Build version 9B55
  Android Studio: Not Found

Packages: (wanted => installed)
  react: 16.0.0 => 16.0.0
  react-native: 0.50.1 => 0.50.1

Activity

  1. adbl commented on Nov 7, 2017

    @adbl
  2. fungilation commented on Nov 7, 2017

    @fungilation
    Author

    Metro Bundler fails again, probably.

  3. fungilation commented on Nov 7, 2017

    @fungilation
    Author

    Update: Got another Sentry error a few hours ago: https://sentry.io/share/issue/1d0884bb8de44f3998ff8e1fe32aa23c/

    I just updated RN from 0.50.1 to 0.50.2, and added this to my package.json:

      "resolutions": {
        "metro-bundler": "0.20.1"
      }
    

    This seems to have done the trick, with a new CodePush and restarting my app:
    screenshot 2017-11-07 14 25 39

    Commenting upstream on what appears to be a fix.

    Thanks for the reference Andreas Amsenius (@adbl)

  4. fungilation commented on Dec 5, 2017

    @fungilation
    Author

    Re-opening this as I'm again seeing similar "No installs recorded" on pushed version, after running code-push deployment ls [APP].

    Previously 5.2.0-beta, upgrading to 5.2.1. On 5.2.0-beta, pushed versions get deployed as reported by code-push deployment ls. But not since upgrading to 5.2.1.

    $ react-native info
    
    Environment:
      OS: macOS Sierra 10.12.6
      Node: 8.9.1
      Yarn: 1.3.2
      npm: 5.5.1
      Watchman: 4.9.0
      Xcode: Xcode 9.2 Build version 9C40b
      Android Studio: Not Found
    
    Packages: (wanted => installed)
      react: 16.0.0 => 16.0.0
      react-native: 0.50.4 => 0.50.4
    
  5. changed the title [-][RN 0.50] Version doesn't get pushed, error (Sentry): Can't find variable: record[/-] [+][RN 0.50] Version doesn't get pushed, ls: "No installs recorded"[/+] on Dec 5, 2017
  6. ruslan-bikkinin commented on Dec 6, 2017

    @ruslan-bikkinin
    Contributor

    Gary Fung (@fungilation) please double check this is not metro-bundler/RN issue as it was before.

  7. fungilation commented on Dec 6, 2017

    @fungilation
    Author

    I'm pretty certain it's not, as strictly in terms of change management, I haven't touched RN itself with this change. And Metro related issues have been fixed in RN 0.50.

    Before: RN-code-push 5.2.0-beta, versions pushed and verified as deployed based on code-push deployment ls.

    After: RN-code-push 5.2.1, versions pushed not deployed. Same RN.

  8. ruslan-bikkinin commented on Dec 6, 2017

    @ruslan-bikkinin
    Contributor

    Gary Fung (@fungilation) could you please provide minimal version of your app so we could try to reproduce your issue? Please attach app logs too if you have it.

  9. fungilation commented on Dec 6, 2017

    @fungilation
    Author

    I'm not sure how I can quickly provide a minimal but still functional version of my app. How about an ejected skeleton from CRNA with my package.json?

    {
      "name": "APP",
      "version": "0.0.1",
      "private": true,
      "eslintConfig": {
        "parserOptions": {
          "ecmaVersion": 6,
          "sourceType": "module",
          "ecmaFeatures": {
            "jsx": true,
            "experimentalObjectRestSpread": true
          }
        },
        "env": {
          "browser": true,
          "node": true
        },
        "plugins": [
          "react",
          "react-native"
        ],
        "rules": {
          "comma-dangle": [
            2,
            "always-multiline"
          ],
          "semi": [
            2,
            "never"
          ],
          "react-native/no-unused-styles": 2,
          "react-native/split-platform-components": 2
        }
      },
      "scripts": {
        "start": "node node_modules/react-native/local-cli/cli.js start"
      },
      "dependencies": {
        "babel-plugin-idx": "^2",
        "he": "^1.1.0",
        "lodash": "^4.17.2",
        "moment": "^2.19.0",
        "moment-timezone": "^0.5.10",
        "node-summary": "../node-summary",
        "react": "16.0.0",
        "react-native": "0.50.4",
        "react-native-blur": "^3.2.0",
        "react-native-code-push": "5.2.0-beta",
        "react-native-firebase": "^3.0",
        "react-native-fit-image": "^1.4.8",
        "react-native-highlight-words": "smartkarma/react-native-highlight-words",
        "react-native-keep-awake": "^2.0.6",
        "react-native-linear-gradient": "^2.0.0",
        "react-native-modalbox": "^1.3.8",
        "react-native-notification": "../react-native-notification",
        "react-native-orientation": "^3.0.0",
        "react-native-parallax-scroll-view": "../react-native-parallax-scroll-view",
        "react-native-safari-view": "^2.0.0",
        "react-native-sentry": "^0.31",
        "react-native-sha256": "^1.1.1",
        "react-native-status-bar-size": "^0.3.2",
        "react-native-swiper": "^1.5.10",
        "react-native-tooltip": "../react-native-tooltip",
        "react-native-tts": "^1.3.0",
        "react-native-vector-icons": "^4.1.1",
        "react-native-webview-bridge": "../react-native-webview-bridge-RN0.40",
        "react-redux": "^5.0.1",
        "redux": "^3.6.0",
        "redux-thunk": "^2.1.0"
      },
      "devDependencies": {
        "redux-logger": "^3.0.6"
      },
      "resolutions": {
        "moment-timezone/moment": "^2.19.0"
      }
    }
  10. fungilation commented on Dec 9, 2017

    @fungilation
    Author

    Update: Upgraded RN to 0.51.0 and tested a deploy. code-push deployment ls [APP] now also keep showing "No installs recorded" while react-native-code-push is kept on 5.2.0-beta.

    I'm at a loss what broke code push with my install, and if it is specific to my install, how I would fix it. I'd try react-native unlink and link again, but that fails too: #1085

    Or is this more systemic, if there's any other reports of deploy breakage while CodePush is being folded into App Center?

    Suggestion appreciated on how I can "reset" my install or otherwise test why ls keeps showing "No installs recorded" from CodePush server?

  11. 5 remaining items

  12. fungilation commented on Dec 12, 2017

    @fungilation
    Author

    Ok. Gone through every step of uninstalling and reinstalling/linking manually. Same thing.

    Along the way, I even found and fixed a side issue. This is in my index.js:

    APP = codePush({
        deploymentKey: '[KEY]',   // can't rely on CodePushDeploymentKey: $(CODEPUSH_KEY) in Info.plist?
        checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
        installMode: codePush.InstallMode.ON_NEXT_SUSPEND,   // https://github.com/Microsoft/react-native-code-push/pull/770
        // installMode: codePush.InstallMode.ON_NEXT_RESUME,    // https://github.com/Microsoft/react-native-code-push/blob/master/docs/api-js.md#installmode
        minimumBackgroundDuration: 600,    // code-push deployment ls APP > Install Metrics should show N pending. To be installed after N seconds
      })(APP)

    where I didn't specify deploymentKey at run time before, as I relied on key from Xcode config. In my Info.plist:

    <key>CodePushDeploymentKey</key>
    <string>$(CODEPUSH_KEY)</string>
    

    and I have CODEPUSH_KEY as 2 variables in Xcode production and staging build configs. This was all working before. But now Chrome DevTools console attached to my app in simulator now tells me it was missing a key, so I additionally set it in index.js as shown above. Chrome console now returns on app launch:

    [CodePush] Checking for update.
    [CodePush] Downloading package.
    

    BUT, hoping for the best with actual code pushed in production, with a code-push release-react APP ios ..., then starting and restarting my Xcode built app on device. No new version gets deployed still and code-push deployment ls APP still shows under the Install Metrics column, "No installs recorded".

    I'm out of ideas. Anything else I can debug or test?

  13. ruslan-bikkinin commented on Dec 12, 2017

    @ruslan-bikkinin
    Contributor

    Gary Fung (@fungilation) could you please share with me the output of code-push app ls and appcenter apps list (please install appcenter cli with npm i -g appcenter-cli)?

  14. fungilation commented on Dec 12, 2017

    @fungilation
    Author
    $ code-push app ls
    ┌─────────────┬─────────────────────┐
    │ Name        │ Deployments         │
    ├─────────────┼─────────────────────┤
    │ WonderSwipe │ Production, Staging │
    └─────────────┴─────────────────────┘
    
    $ appcenter apps list
    * gfung/WonderSwipe (current app)
    

    And from https://appcenter.ms/ dashboard, deploys were working up to last version at v231 on Dec. 4, about a week ago. Please tell me my hair pulling isn't just me and this is something server-side, maybe related to migration to App Center 😭

    screenshot 2017-12-12 02 03 52

  15. ruslan-bikkinin commented on Dec 12, 2017

    @ruslan-bikkinin
    Contributor

    Gary Fung (@fungilation) Its looks strange, I believe we should investigate this on our side. Yeah, probably, this issue somehow related with migration to appcenter. Gary Fung (@fungilation) could you please confirm that switching to code-push release-react gfung/WonderSwipe solves your problem? I mean after executing this command and installing update on device install metrics begins to appear?

  16. fungilation commented on Dec 12, 2017

    @fungilation
    Author

    Umm,

    $ code-push release-react gfung/WonderSwipe
    Usage: code-push release-react <appName> <platform> [options]
    

    Or did you mean: (gfung/WonderSwipe is the current app selected in appcenter)

    $ appcenter codepush release-react -d Production
    Detecting ios app version:
    
    Using the target binary version value "1.0.1" from "ios/wonderswipe/Info.plist".
    
    Running "react-native bundle" command:
    
    node node_modules/react-native/local-cli/cli.js bundle --assets-dest /var/folders/q2/nn87n125621g5t3h_n_nx4vw0000gn/T/code-push1171112-53420-19imw5v.21n8 --bundle-output /var/folders/q2/nn87n125621g5t3h_n_nx4vw0000gn/T/code-push1171112-53420-19imw5v.21n8/main.jsbundle --dev false --entry-file index.js --platform ios
    Scanning folders for symlinks in /Users/garyfung/Documents/code/WonderSwipe/node_modules (23ms)
    Scanning folders for symlinks in /Users/garyfung/Documents/code/WonderSwipe/node_modules (15ms)
    Loading dependency graph, done.
    
    bundle: start
    bundle: finish
    bundle: Writing bundle output to: /var/folders/q2/nn87n125621g5t3h_n_nx4vw0000gn/T/code-push1171112-53420-19imw5v.21n8/main.jsbundle
    bundle: Copying 1 asset files
    bundle: Done writing bundle output
    bundle: Done copying assets
    
    Releasing update contents to CodePush:
    
    Successfully released an update containing the "/var/folders/q2/nn87n125621g5t3h_n_nx4vw0000gn/T/code-push1171112-53420-19imw5v.21n8" directory to the "Production" deployment of the "WonderSwipe" app.
    

    So I did that. After, I rebuilt app in Xcode. Some relevant Xcode logs that has "codepush" in the lines, while my app is running on device in Production mode and attached to Xcode:

    2017-12-12 11:32:59.192725-0800 wonderswipe[7833:2776259] [Accessibility] ****************** Loading GAX Client Bundle ****************
    2017-12-12 11:33:05.021621-0800 wonderswipe[7833:2776259] 
    [CodePush] Loading JS bundle from file:///var/containers/Bundle/Application/9137FF1E-62E3-4C22-B117-150D5D46BF05/wonderswipe.app/main.jsbundle
    2017-12-12 11:33:05.022 [info][tid:main][RCTCxxBridge.mm:213] Initializing <RCTCxxBridge: 0x1d01cf5a0> (parent: <RCTBridge: 0x1d00c0cb0>, executor: (null))
    ...
    2017-12-12 11:33:08.008205-0800 wonderswipe[7833:2776259] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
    2017-12-12 11:33:08.131089-0800 wonderswipe[7833:2776259] [MC] Lazy loading NSBundle MobileCoreServices.framework
    2017-12-12 11:33:08.131169-0800 wonderswipe[7833:2776259] [MC] Loaded MobileCoreServices.framework
    2017-12-12 11:33:08.169 [info][tid:com.facebook.react.JavaScript] [CodePush] Checking for update.
    2017-12-12 11:33:08.169253-0800 wonderswipe[7833:2776576] [CodePush] Checking for update.
    2017-12-12 11:33:09.710 [info][tid:com.facebook.react.JavaScript] [CodePush] Downloading package.
    2017-12-12 11:33:09.709896-0800 wonderswipe[7833:2776576] [CodePush] Downloading package.
    2017-12-12 11:33:12.377086-0800 wonderswipe[7833:2776566] WF: === Starting WebFilter logging for process wonderswipe
    

    Then I detached app from Xcode and restarted it. Checking code-push deployment ls WonderSwipe and https://appcenter.ms/, same thing. No installs or downloads recorded on server, "No installs recorded".

  17. ruslan-bikkinin commented on Dec 13, 2017

    @ruslan-bikkinin
    Contributor

    Gary Fung (@fungilation) could you please add download progress logs to your app like this:

    sync() {
        CodePush.sync(
          { /* your options */},
          (progress) => {
           console.log(progress.receivedBytes + " of " + progress.totalBytes + " received.")
          }
        );
      }

    and share these logs with us?

  18. ovaris commented on Dec 13, 2017

    @ovaris

    I think I have the same problem, after migrating to appcenter (and moving app under new organization), last thing I see in iOS log is:

    [CodePush] Checking for update.
    2017-12-13 16:33:21.157 [info][tid:com.facebook.react.JavaScript] [CodePush] Awaiting user action.
    2017-12-13 16:33:21.160993+0200 xxx[95954:3612489] [CodePush] Awaiting user action.
    2017-12-13 16:33:27.463 [info][tid:com.facebook.react.JavaScript] [CodePush] Downloading package.
    2017-12-13 16:33:27.464112+0200 xxx[95954:3612489] [CodePush] Downloading package.
    

    Using RN 51.0 and react-native-code-push: 5.2.1

  19. fungilation commented on Dec 13, 2017

    @fungilation
    Author

    Ruslan Bikkinin (@ruslan-bikkinin) This is console logs I'm getting:

    10:36:37.656 console.js:32 [CodePush] Sync already in progress.
    10:36:38.255 console.js:32 [CodePush] undefined of undefined received.
    10:36:39.151 console.js:32 [CodePush] undefined of undefined received.
    

    Please check if I've integrated your code correctly, since I used to specify options in codePush({options})(root_component), not options in a separate .sync call before or after that.

    class WonderSwipe extends Component {
      ...
    }
    
      codePush.sync({
          deploymentKey: '[KEY]',   // can't rely on CodePushDeploymentKey: $(CODEPUSH_KEY) in Info.plist?
          checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
          installMode: codePush.InstallMode.ON_NEXT_SUSPEND,   // https://github.com/Microsoft/react-native-code-push/pull/770
          // installMode: codePush.InstallMode.ON_NEXT_RESUME,    // https://github.com/Microsoft/react-native-code-push/blob/master/docs/api-js.md#installmode
          minimumBackgroundDuration: 600,    // code-push deployment ls WonderSwipe > Install Metrics should show N pending. To be installed after N seconds
        },
        (progress) => {
          console.log("[CodePush]", progress.receivedBytes + " of " + progress.totalBytes + " received.")
        }
      )
      WonderSwipe = codePush()(WonderSwipe)
  20. fungilation commented on Dec 13, 2017

    @fungilation
    Author

    And in case you are wondering, I have in Info.plist:

    	<key>NSAppTransportSecurity</key>
    	<dict>
    		<key>NSAllowsArbitraryLoads</key>
    		<true/>
    	</dict>
    
  21. fungilation commented on Dec 15, 2017

    @fungilation
    Author

    Ruslan Bikkinin (@ruslan-bikkinin) any status update would be much appreciated, like whether you think it really is a server side issue or you need more time to investigate? I just want to decide whether I should hold off my app releases or not while CodePush is broken. Much appreciated

  22. ruslan-bikkinin commented on Dec 18, 2017

    @ruslan-bikkinin
    Contributor

    Hi again Gary Fung (@fungilation) and sorry for the delayed response - currently we are under-resourced and have to take care of other things in terms of appcenter and codepush. As for your case, I’ve tried to reproduce it, but with no luck, so could you please share with me the minimum version of your app where the issue reproduces? (package.json is not enough due to we also need js code to reproduce the issue). You also can email me at v-rubikk@microsoft.com and share the full working version of your app so I can try to investigate it, but again - the minimum working version of you the code with minimum repro steps is the best choice for us because we’ll be able to determine the root cause of the issue much faster.

    I’ve also notice that you are using --outputDir parameter, could you please try to release an update without it? Just to make sure that your issue does not relate to this one somehow microsoft/code-push#545

  23. ovaris commented on Dec 18, 2017

    @ovaris

    The issue was somehow fixed by itself for us, so latest code-push release using appcenter cli worked just fine.

  24. fungilation commented on Dec 19, 2017

    @fungilation
    Author

    Hallelujah!
    screenshot 2017-12-18 16 31 33

    This after upgrading other packages I have (moment, react-native-firebase, react-native-sentry), and as part of upgrades I nuked the ios/Pods directory and rebuilt it. And after rebuilding app in Xcode, it just started working with this in Xcode logs:

    [CodePush] Loading JS bundle from file:///var/containers/Bundle/Application/DBB97322-3648-4D92-AE6A-D87B49DDF1D8/wonderswipe.app/main.jsbundle
    ...
    2017-12-18 16:22:08.718137-0800 wonderswipe[8885:2912327] [MC] Lazy loading NSBundle MobileCoreServices.framework
    2017-12-18 16:22:08.718205-0800 wonderswipe[8885:2912327] [MC] Loaded MobileCoreServices.framework
    2017-12-18 16:22:08.778 [info][tid:com.facebook.react.JavaScript] [CodePush] Sync already in progress.
    2017-12-18 16:22:08.777925-0800 wonderswipe[8885:2912479] [CodePush] Sync already in progress.
    2017-12-18 16:22:11.025 [warn][tid:com.facebook.react.CodePushQueue][RCTEventEmitter.m:54] Sending `CodePushDownloadProgress` with no listeners registered.
    2017-12-18 16:22:11.025619-0800 wonderswipe[8885:2912486] Sending `CodePushDownloadProgress` with no listeners registered.
    2017-12-18 16:22:11.062185-0800 wonderswipe[8885:2912474] WF: === Starting WebFilter logging for process wonderswipe
    2017-12-18 16:22:11.062231-0800 wonderswipe[8885:2912474] WF: _userSettingsForUser mobile: {
        filterBlacklist =     (
        );
        filterWhitelist =     (
        );
        restrictWeb = 1;
        useContentFilter = 0;
        useContentFilterOverrides = 0;
        whitelistEnabled = 0;
    }
    2017-12-18 16:22:11.062280-0800 wonderswipe[8885:2912474] WF: _WebFilterIsActive returning: NO
    2017-12-18 16:22:11.065051-0800 wonderswipe[8885:2912483] 
    [CodePush] Applying full update.
    

    Emphasis on the last line: [CodePush] Applying full update. when before, Xcode logs would end on a [CodePush] Downloading package. line without further logs filtered on [CodePush].

    Tested with deploys via both forms:
    appcenter codepush release-react -d Production
    and
    code-push release-react WonderSwipe ios --outputDir ../WonderSwipe-bundle -d Production --des ""

    Considering the timing of both Olli Varis (@ovaris) and I having pushed versions downloading/applying in our apps again today. A confirmation from Microsoft that this has been a server issue and is now fixed would be great?

  25. sergey-akhalkov commented on Dec 20, 2017

    @sergey-akhalkov
    Contributor

    Hi Gary Fung (@fungilation), Olli Varis (@ovaris), thanks for reaching us and sorry for the inconvenience. The issue looks really weird (especially in the fact that it does not reproduce for us and that it has been resolved by itself). Also we haven't seen it before.

    As for now - please update your code-push-cli due to it contains a bugfix that may affect not only users who are using code-signing (this fix has not been merged for appcenter-cli yet). Probably the issue can somehow relate to this one microsoft/code-push#547 - we are working on it.

    Please let us know if it will happen again, so I'm closing this for now.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions