top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

codepush automatic rollback doesn't occur in react-native android app?

0 votes
378 views

Update is installed but status is in pending on App Center. Since sync is alreday called , it won't rollback automatically and also not updating to newer version. The app crashes on startup everytime.

So how to rollback or update to new code push bundle version in this case ?

Here is the sample code:

componentDidMount() { 
codePush.sync(codePushOptions,(status) => {  
switch (status) {    
case codePush.SyncStatus.CHECKING_FOR_UPDATE:
//console.log("Checking for updates.");
break;  
case codePush.SyncStatus.DOWNLOADING_PACKAGE:
//console.log("Downloading package.");
break;   
case codePush.SyncStatus.INSTALLING_UPDATE:
//console.log("Installing update.");
break;  
case codePush.SyncStatus.UP_TO_DATE:
break;  
case codePush.SyncStatus.UPDATE_INSTALLED:         
break;
}
})
throw new Error();
}

Note : I have thrown error to check working of auto rollback.

posted Nov 14, 2018 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

Can anyone suggest the library for Push Notification?

0 votes

Can you help me how to implement Drawer in React Native with using Native Base?

I have tried with the sample code as per the documentation but it's not working. Also, I'm using react navigation as well.

Code:

import React, { Component } from 'react';
import { Drawer } from 'native-base';
import SideBar from './yourPathToSideBar';
export default class DrawerExample extends Component {
  render() {
    closeDrawer = () => {
      this.drawer._root.close()
    };
    openDrawer = () => {
      this.drawer._root.open()
    };
    return (
      <Drawer
        ref={(ref) => { this.drawer = ref; }}
        content={<SideBar navigator={this.navigator} />}
        onClose={() => this.closeDrawer()} >
      // Main View
      </Drawer>
    );
  }
}
0 votes

Hi,

Facing the below error while relaunching the app in android device.

Error type 3
Error: Activity class {com.demo/demoActivity} does not exist.

Can anyone guide me how to resolve this?

...