Appcenter-sdk-react-native: link failed in React Native 0.60.0-rc.0

Created on 9 Jun 2019  Â·  8Comments  Â·  Source: microsoft/appcenter-sdk-react-native

Description

appcenter works fine with React Native 0.59.8,but when i init a new project using React Native 0.60.0-rc.0 , appcenter can not be linked correct , maybe becauseReact Native 0.60.0-rc.0 use CocoaPods for default?

Repro Steps

1.npm install appcenter appcenter-analytics appcenter-crashes --save-exact
2.react-native link, output:
```warn Package appcenter is using deprecated "rnpm" config that will stop working from next release. Consider upgrading to the new config format.
warn Package appcenter-analytics is using deprecated "rnpm" config that will stop working from next release. Consider upgrading to the new config format.
warn Package appcenter-crashes is using deprecated "rnpm" config that will stop working from next release. Consider upgrading to the new config format.
info iOS module "@react-native-community/async-storage" is already linked
info Android module "@react-native-community/async-storage" is already linked
info iOS module "@react-native-community/netinfo" is already linked
info Android module "@react-native-community/netinfo" is already linked
info iOS module "appcenter" is already linked
info Android module "appcenter" is already linked
info iOS module "appcenter-analytics" is already linked
info Android module "appcenter-analytics" is already linked
info iOS module "appcenter-crashes" is already linked
info Android module "appcenter-crashes" is already linked
(node:35227) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [ReadStream]. Use emitter.setMaxListeners() to increase limit
(node:35227) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(node:35227) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [WriteStream]. Use emitter.setMaxListeners() to increase limit
(node:35227) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [WriteStream]. Use emitter.setMaxListeners() to increase limit
(node:35227) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [WriteStream]. Use emitter.setMaxListeners() to increase limit
(node:35227) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 keypress listeners added to [ReadStream]. Use emitter.setMaxListeners() to increase limit
(node:35227) UnhandledPromiseRejectionWarning: Error: You missed a callback function for the node node_modules/appcenter/scripts/postlink command
at Object.postlink (/Users/qinshuai/Documents/ReactNativeProj/RN_0.60/FastHealthExamUser/node_modules/@react-native-community/cli/build/tools/config/makeHook.js:21:13)
at /Users/qinshuai/Documents/ReactNativeProj/RN_0.60/FastHealthExamUser/node_modules/@react-native-community/cli/build/commands/link/linkAll.js:61:32
at processTicksAndRejections (internal/process/task_queues.js:89:5)
(node:35227) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:35227) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:35227) UnhandledPromiseRejectionWarning: Error: You missed a callback function for the node node_modules/appcenter-analytics/scripts/postlink command
at Object.postlink (/Users/qinshuai/Documents/ReactNativeProj/RN_0.60/FastHealthExamUser/node_modules/@react-native-community/cli/build/tools/config/makeHook.js:21:13)
at /Users/qinshuai/Documents/ReactNativeProj/RN_0.60/FastHealthExamUser/node_modules/@react-native-community/cli/build/commands/link/linkAll.js:61:32
at processTicksAndRejections (internal/process/task_queues.js:89:5)
(node:35227) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:35227) UnhandledPromiseRejectionWarning: Error: You missed a callback function for the node node_modules/appcenter-crashes/scripts/postlink command
at Object.postlink (/Users/qinshuai/Documents/ReactNativeProj/RN_0.60/FastHealthExamUser/node_modules/@react-native-community/cli/build/tools/config/makeHook.js:21:13)
at /Users/qinshuai/Documents/ReactNativeProj/RN_0.60/FastHealthExamUser/node_modules/@react-native-community/cli/build/commands/link/linkAll.js:61:32
at processTicksAndRejections (internal/process/task_queues.js:89:5)
(node:35227) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)

3. `react-native link appcenter`, output:

warn Package appcenter is using deprecated "rnpm" config that will stop working from next release. Consider upgrading to the new config format.
warn Package appcenter-analytics is using deprecated "rnpm" config that will stop working from next release. Consider upgrading to the new config format.
warn Package appcenter-crashes is using deprecated "rnpm" config that will stop working from next release. Consider upgrading to the new config format.
info iOS module "appcenter" is already linked
info Android module "appcenter" is already linked
error Something went wrong while linking. Reason: You missed a callback function for the node node_modules/appcenter/scripts/postlink command. Run CLI with --verbose flag for more details.


### **Details**
`react-native info`

System:
OS: macOS 10.14.5
CPU: (6) x64 Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
Memory: 221.64 MB / 8.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.3.1 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 28
Build Tools: 28.0.3
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.0-rc.0 => 0.60.0-rc.0
npmGlobalPackages:
react-native-cli: 2.0.1


6. If you're developing for React Native iOS, run the following command and paste the output below: `pod --version`

`1.7.1`

7.  
my `Podfile` after link appcenter

platform :ios, '9.0'

target 'FastHealthExamUser' do
# Pods for FastHealthExamUser
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'

pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo'

target 'FastHealthExamUserTests' do
inherit! :search_paths
# Pods for testing
end

end

target 'FastHealthExamUser-tvOS' do
# Pods for FastHealthExamUser-tvOS

target 'FastHealthExamUser-tvOSTests' do
inherit! :search_paths
# Pods for testing
end

end

```

there is no pod 'appcenter', path: '../node_modules/appcenter' or pod 'AppCenter/Crashes', '~> 2.0.1' in m Podfile

need help..

bug

Most helpful comment

Hey @KingAmo @wamry

Thanks for waiting. App Center RN SDK v2.2.0 is released with support of RN 0.60.

I am closing this issue for now. Please feel free to comment if you still run into issues.

All 8 comments

Hi @KingAmo thanks for reporting this. We are looking at it.

I've also run into this where react-native is installed using cocopods. I created a github repo here that recreated my issue where installing AppCenter on a react-native project that is using cocoapods. Official React-Native instructions on how to install React-Native using Cocoapod is located here.

I tried several attempts but no success:

  • Manually linked AppCenter (avoiding cocoapod), but ran into issues locating RN header files.
  • Modified appcenter.podspec file that is referenced in the PodFile. Pod install failed with "target has transitive dependencies that include static binaries:" Modified the appcenter.podspec in node_modules and added s.static_framework = true, and the pod install ran without issues. But when I built the workspace, it couldn't find . I stopped at trying to create a podspec for AppCenterReactNativeShared and add s.static_framework = true there instead of appcenter.podspec.

Hey @markmadlangbayan is this related to react-native 0.60-rc?
I see that the test app you linked is using react-native 0.59.
If this issue is reproduced on react-native 0.60, please wait until we officially support it. We are working on it.
If this is reproduced on react-native 0.59, I will have to ask you to open a separate issue becasue this is unrelated. Thank you!

Hello Anna,

This is for 0.59. Sorry for the confusion.

Thanks,
Mark Madlangbayan

From: Anna Kocheshkova notifications@github.com
Reply-To: microsoft/appcenter-sdk-react-native reply@reply.github.com
Date: Tuesday, June 25, 2019 at 2:38 AM
To: microsoft/appcenter-sdk-react-native appcenter-sdk-react-native@noreply.github.com
Cc: Mark Madlangbayan mark.madlangbayan@outlook.com, Mention mention@noreply.github.com
Subject: Re: [microsoft/appcenter-sdk-react-native] link failed in React Native 0.60.0-rc.0 (#591)

Hey @markmadlangbayanhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmarkmadlangbayan&data=02%7C01%7C%7Cacc77c56eec442babb3108d6f9401704%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636970450982914267&sdata=6IUO4Gu2InqJs1rpgz6%2FODAPLoov3voqYgfyGmI2Nzc%3D&reserved=0 is this related to react-native 0.60-rc?
I see that the test app you linked is using react-native 0.59.
If this issue is reproduced on react-native 0.60, please wait until we officially support it. We are working on it.
If this is reproduced on react-native 0.59, I will have to ask you to open a separate issue becasue this is unrelated. Thank you!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fappcenter-sdk-react-native%2Fissues%2F591%3Femail_source%3Dnotifications%26email_token%3DABJWFRO5DYKHOHOWBVCCNF3P4HDOTA5CNFSM4HWIZH72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYPKSNI%23issuecomment-505325877&data=02%7C01%7C%7Cacc77c56eec442babb3108d6f9401704%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636970450982924278&sdata=6XNzDZeFoMrEmARSIdm5183hDHhCtzYNZdEPC%2FuGq78%3D&reserved=0, or mute the threadhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABJWFRNHEFBDUF37NDFB74TP4HDOTANCNFSM4HWIZH7Q&data=02%7C01%7C%7Cacc77c56eec442babb3108d6f9401704%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636970450982934283&sdata=3rutLWzsXlZ84GDZ0%2B2St2Pv6BDmLHGRUiX5JbU3yPI%3D&reserved=0.

@markmadlangbayan I opened a separate issue: https://github.com/microsoft/appcenter-sdk-react-native/issues/612
Please fill in all the details (SDK version, react-native version etc.). Thank you!

any updates ?

Hey @wamry we are working on it and the support is planned in our July SDK release. Thank you for the patience!

Hey @KingAmo @wamry

Thanks for waiting. App Center RN SDK v2.2.0 is released with support of RN 0.60.

I am closing this issue for now. Please feel free to comment if you still run into issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

v0lume picture v0lume  Â·  5Comments

aprilmintacpineda picture aprilmintacpineda  Â·  5Comments

divyamakkar26 picture divyamakkar26  Â·  7Comments

newyankeecodeshop picture newyankeecodeshop  Â·  4Comments

ionut-movila picture ionut-movila  Â·  8Comments