After upgrading to version 1.8.0 of the SDK, calling AppCenter.getInstallId() results in a null value in Android because AppCenter is not enabled on start. I believe it has to do with PR https://github.com/Microsoft/AppCenter-SDK-React-Native/pull/383 that looks like it implements some sort of auto start option. I wasn't able to get AppCenter to be enabled on app load unless I downgraded to 1.7.1
Please list the steps used to reproduce your issue.
isEnabled(), I get falsegetInstallId() returns null5.
react-native info command output:
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Memory: 764.03 MB / 16.00 GB
Shell: 2.7.1 - /usr/local/bin/fish
Binaries:
Node: 8.11.3 - ~/.nvm/versions/node/v8.11.3/bin/node
Yarn: 1.9.4 - ~/.nvm/versions/node/v8.11.3/bin/yarn
npm: 6.1.0 - ~/.nvm/versions/node/v8.11.3/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
Android SDK:
Build Tools: 23.0.1, 25.0.0, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.1, 27.0.2, 27.0.3
API Levels: 23, 24, 25, 26, 27
IDEs:
Android Studio: 3.0 AI-171.4443003
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
@storybook/react-native: ^3.4.10 => 3.4.10
@types/apollo-upload-client: ^8.1.0 => 8.1.0
@types/babel-core: ^6.25.5 => 6.25.5
@types/chalk: ^2.2.0 => 2.2.0
@types/date-fns: ^2.6.0 => 2.6.0
@types/eslint: ^4.16.3 => 4.16.3
@types/graphql: ^0.13.4 => 0.13.4
@types/inquirer: ^0.0.43 => 0.0.43
@types/jest: ^23.3.1 => 23.3.1
@types/lodash: ^4.14.116 => 4.14.116
@types/moment: ^2.13.0 => 2.13.0
@types/prettier: ^1.13.2 => 1.13.2
@types/prop-types: ^15.5.5 => 15.5.5
@types/qs: ^6.5.1 => 6.5.1
@types/react: ^16.4.13 => 16.4.13
@types/react-dom: ^16.0.7 => 16.0.7
@types/react-native: ^0.56.15 => 0.56.15
@types/react-native-datepicker: ^1.6.5 => 1.6.5
@types/react-native-fbsdk: ^0.6.2 => 0.6.2
@types/react-native-htmlview: ^0.12.2 => 0.12.2
@types/react-native-keyboard-spacer: ^0.4.1 => 0.4.1
@types/react-native-loading-spinner-overlay: ^0.5.1 => 0.5.1
@types/react-native-modal: ^4.1.1 => 4.1.1
@types/react-native-permissions: ^1.1.1 => 1.1.1
@types/react-native-safari-view: ^2.0.4 => 2.0.4
@types/react-native-sortable-list: ^0.0.7 => 0.0.7
@types/react-native-vector-icons: ^4.6.3 => 4.6.3
@types/react-navigation: ^2.0.19 => 2.0.19
@types/react-test-renderer: ^16.0.2 => 16.0.2
@types/react-timeout: ^1.1.1 => 1.1.1
@types/styled-components: ^3.0.0 => 3.0.0
apisauce: ^0.16.0 => 0.16.0
apollo-cache-inmemory: ^1.2.9 => 1.2.9
apollo-cache-persist: ^0.1.1 => 0.1.1
apollo-client: ^2.4.1 => 2.4.1
apollo-link: ^1.2.2 => 1.2.2
apollo-link-batch-http: ^1.2.2 => 1.2.2
apollo-link-context: ^1.0.8 => 1.0.8
apollo-link-error: ^1.1.0 => 1.1.0
apollo-link-token-refresh: ^0.2.3 => 0.2.3
apollo-upload-client: ^8.1.0 => 8.1.0
appcenter: 1.7.1 => 1.7.1
appcenter-analytics: 1.7.1 => 1.7.1
appcenter-cli: ^1.1.2 => 1.1.2
appcenter-crashes: 1.7.1 => 1.7.1
appcenter-push: 1.7.1 => 1.7.1
babel-bridge: ^1.12.11 => 1.12.11
babel-core: 7.0.0-bridge.0 => 7.0.0-bridge.0
babel-eslint: 9.0.0-beta.3 => 9.0.0-beta.3
babel-jest: 23.4.2 => 23.4.2
babel-plugin-module-resolver: ^3.1.1 => 3.1.1
babel-plugin-transform-remove-console: ^6.9.4 => 6.9.4
babel-preset-react-native: 5.0.2 => 5.0.2
babel-runtime: ^6.26.0 => 6.26.0
bugsnag-build-reporter: ^1.0.0 => 1.0.0
bugsnag-react-native: 2.10.2 => 2.10.2
bugsnag-sourcemaps: ^1.0.4 => 1.0.4
chalk: ^2.4.1 => 2.4.1
date-fns: ^1.29.0 => 1.29.0
eslint: ^4.19.1 => 4.19.1
eslint-config-airbnb: ^17.1.0 => 17.1.0
eslint-config-prettier: ^3.0.1 => 3.0.1
eslint-import-resolver-babel-module: ^5.0.0-beta.1 => 5.0.0-beta.1
eslint-plugin-babel: ^5.1.0 => 5.1.0
eslint-plugin-graphql: ^2.1.1 => 2.1.1
eslint-plugin-import: 2.14.0 => 2.14.0
eslint-plugin-jest: ^21.22.0 => 21.22.0
eslint-plugin-jsx-a11y: ^6.1.1 => 6.1.1
eslint-plugin-react: ^7.11.1 => 7.11.1
eslint-plugin-react-native: ^3.2.1 => 3.2.1
fs: ^0.0.1-security => 0.0.1-security
get-graphql-schema: ^2.1.1 => 2.1.1
graphql: ^0.13.2 => 0.13.2
graphql-tag: ^2.9.2 => 2.9.2
husky: ^0.14.3 => 0.14.3
inquirer: ^6.2.0 => 6.2.0
jest: 23.5.0 => 23.5.0
jsc-android: ^224109.1.0 => 224109.1.0
lint-staged: ^7.2.2 => 7.2.2
lodash: ^4.17.10 => 4.17.10
mobx: ^5.1.0 => 5.1.0
mobx-persist: ^0.4.1 => 0.4.1
mobx-react: ^5.2.5 => 5.2.5
patch-package: ^5.1.1 => 5.1.1
postinstall-postinstall: ^1.0.0 => 1.0.0
prettier: ^1.14.2 => 1.14.2
prop-types: ^15.6.2 => 15.6.2
qs: ^6.5.2 => 6.5.2
react: 16.4.1 => 16.4.1
react-apollo: ^2.1.11 => 2.1.11
react-dom: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
react-native-add-calendar-event: ^2.1.0 => 2.1.0
react-native-analytics-segment-io: ^3.1.3 => 3.1.3
react-native-android-settings-library: ^1.0.5 => 1.0.5
react-native-button: ^2.3.0 => 2.3.0
react-native-code-push: ^5.4.2 => 5.4.2
react-native-datepicker: ^1.7.2 => 1.7.2
react-native-device-info: ^0.22.5 => 0.22.5
react-native-display: ^1.0.8 => 1.0.8
react-native-fast-image: ^5.0.3 => 5.0.3
react-native-fbsdk: ^0.7.0 => 0.7.0
react-native-fit-image: ^1.5.4 => 1.5.4
react-native-geolocation-service: ^1.1.0 => 1.1.0
react-native-htmlview: ^0.13.0 => 0.13.0
react-native-image-crop-picker: ^0.21.1 => 0.21.1
react-native-keyboard-aware-scroll-view: ^0.7.2 => 0.7.2
react-native-keyboard-spacer: ^0.4.1 => 0.4.1
react-native-loading-spinner-overlay: ^0.5.2 => 0.5.2
react-native-looped-carousel: ^0.1.13 => 0.1.13
react-native-map-link: ^2.1.0 => 2.1.0
react-native-maps: ^0.21.0 => 0.21.0
react-native-modal: ^6.5.0 => 6.5.0
react-native-offline: ^3.11.1 => 3.11.1
react-native-parsed-text: ^0.0.20 => 0.0.20
react-native-permissions: ^1.1.1 => 1.1.1
react-native-phone-call: ^1.0.8 => 1.0.8
react-native-progress: ^3.5.0 => 3.5.0
react-native-responsive-image: ^2.3.1 => 2.3.1
react-native-row: ^1.1.1 => 1.1.1
react-native-safari-view: ^2.1.0 => 2.1.0
react-native-schemes-manager: ^1.0.5 => 1.0.5
react-native-sortable-list: ^0.0.22 => 0.0.22
react-native-splash-screen: 3.1.1 => 3.1.1
react-native-storybook-loader: ^1.8.0 => 1.8.0
react-native-svg: ^6.5.2 => 6.5.2
react-native-ui-lib: ^3.3.226 => 3.3.226
react-native-vector-icons: ^5.0.0 => 5.0.0
react-native-version: ^2.6.5 => 2.6.5
react-native-wkwebview-reborn: ^1.21.0 => 1.21.0
react-navigation: ^2.12.1 => 2.12.1
react-test-renderer: 16.4.1 => 16.4.1
react-timeout: ^1.1.1 => 1.1.1
serializr: ^1.3.0 => 1.3.0
solidarity: ^2.1.0 => 2.1.0
solidarity-react-native: ^2.0.2 => 2.0.2
Hi, thanks for the bug report, it is indeed a regression with version 1.8.0.
We will fix it but in the mean time there is a work around:
In MainApplication.java call AppCenterReactNativeShared.setStartAutomatically(true); before SoLoader.init.
Or downgrade to 1.7.1 while waiting for version 1.8.1.
Sorry for the inconvenience.
Thanks for the quick fix @guperrot!
We have rolled back latest version to 1.7.1 on npm.js in the mean time. 1.8.0 is still downloadable but not the latest anymore.
Version 1.8.1 has been released with the fix and thus you can remove the work around after updating the npms, then running pod repo update and react-native link.