node tools/downloadWebRTC.js command fails when installing "react-native-webrtc" package - ios

I am trying to install the package "react-native-webrtc" but getting this error (yarn install react-native-webrtc --verbose):
react-native-webrtc
verbose 189.970120017 Error: /Users/samwin/dev/MobileAgent/node_modules/react-native-webrtc: Command failed.
Exit code: 1
Command: node tools/downloadWebRTC.js
Arguments:
Directory: /Users/samwin/dev/MobileAgent/node_modules/react-native-webrtc
Output:
Downloading https://github.com/jitsi/webrtc/releases/download/v100.0.0/WebRTC.xcframework.tgz...
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
Error: connect ECONNREFUSED 185.199.108.133:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '185.199.108.133',
port: 443
}
at ProcessTermError.ExtendableBuiltin (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:721:66)
at ProcessTermError.MessageError (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:750:123)
at new ProcessTermError (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:790:113)
at ChildProcess.<anonymous> (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:25884:17)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Socket.<anonymous> (node:internal/child_process:450:11)
at Socket.emit (node:events:390:28)
at Pipe.<anonymous> (node:net:687:12)
error /Users/samwin/dev/MobileAgent/node_modules/react-native-webrtc: Command failed.
Exit code: 1
Command: node tools/downloadWebRTC.js
Arguments:
Directory: /Users/samwin/dev/MobileAgent/node_modules/react-native-webrtc
Output:
Downloading https://github.com/jitsi/webrtc/releases/download/v100.0.0/WebRTC.xcframework.tgz...
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
Error: connect ECONNREFUSED 185.199.108.133:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
The folder react-native-webrtc exists in node_modules, but when I try to build the app in Xcode, then it throws error like described here.
BTW: I can download the file when opening the url in the browser.
Is there any solution for this issue?

My solution was to download the .tgz file manually (which should be done actually in tools/downloadWebRTC.js) and extracted it to corresponding location. Now the Xcode build works fine.

Related

Cypress failed to make a connection to the Edge/Firefox in Jenkins

I created some VueJS test and run with Cypress.
Everything is OK until I run it on Jenkins (with a GitHub hook trigger for GITScm polling)
Only cypress run --browser chrome and cypress run --browser electron work.
With Edge and Firefox, it returned this kind of error
Still waiting to connect to Edge, retrying in 1 second (attempt 62/62)
Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 50 seconds.
This usually indicates there was a problem opening the Edge browser.
The CDP port requested was 63444.
Error: connect ECONNREFUSED 127.0.0.1:63444
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
Error: Command failed with exit code 1: npm run cypress:run
at makeError (C:\ProgramData\Jenkins\.jenkins\workspace\Homepage\node_modules\start-server-and-test\node_modules\execa\lib\error.js:60:11)
at handlePromise (C:\ProgramData\Jenkins\.jenkins\workspace\Homepage\node_modules\start-server-and-test\node_modules\execa\index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
shortMessage: 'Command failed with exit code 1: npm run cypress:run',
command: 'npm run cypress:run',
escapedCommand: '"npm run cypress:run"',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
How can I run it normally in Jenkins? Thanks in advance.

caliper bind --caliper-bind-sut fabric:1.4.8 --caliper-bind-args=-g .when i write this command i got this error

2022.09.07-10:48:20.066 warn [caliper] [bind] Working directory not specified. Using "F:\hyperlf\transaction_data"
2022.09.07-10:48:20.069 info [caliper] [bind] User-provided arguments for npm: "-g"
2022.09.07-10:48:20.071 info [caliper] [bind] Binding for fabric#1.4.8. This might take some time...
2022.09.07-10:48:20.073 info [caliper] [bind] Using working directory: F:\hyperlf\transaction_data
2022.09.07-10:48:20.075 info [caliper] [bind] Calling npm with: install -g fabric-client#1.4.8 fabric-protos#2.0.0-snapshot.1 fabric-network#1.4.8
node:events:498
throw er; // Unhandled 'error' event
^
Error: spawn npm ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn npm',
path: 'npm',
spawnargs: [
'install',
'-g',
'fabric-client#1.4.8',
'fabric-protos#2.0.0-snapshot.1',
'fabric-network#1.4.8'
]

IOS Appium fails when running test scripts

I managed to get the appium running. Unfortunately, I couldn't get a test to run successfully. Once the appium test finishes I only get only one unique error message which is the following:
[XCUITest] Error: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 134
at ChildProcess.<anonymous> (../../lib/teen_process.js:66:19)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:192:7)
at maybeClose (internal/child_process.js:890:16)
at Socket.<anonymous> (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:189:7)
at Pipe._handle.close [as _onclose] (net.js:501:12)
{ Error: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 134
at ChildProcess.<anonymous> (../../lib/teen_process.js:66:19)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:192:7)
at maybeClose (internal/child_process.js:890:16)
at Socket.<anonymous> (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:189:7)
at Pipe._handle.close [as _onclose] (net.js:501:12)
stdout: '\u001b[1mFetching dependencies\n',
stderr: 'dyld: Symbol not found: __TMV6Result8AnyError\n Referenced from: /usr/local/Cellar/carthage/0.19.1/bin/../Frameworks/CarthageKit.framework/Versions/Current/Frameworks/ReactiveSwift.framework/ReactiveSwift\n Expected in: /Library/Frameworks/CarthageKit.framework/Versions/Current/Frameworks/Result.framework/Versions/A/Result\n in /usr/local/Cellar/carthage/0.19.1/bin/../Frameworks/CarthageKit.framework/Versions/Current/Frameworks/ReactiveSwift.framework/ReactiveSwift\nScripts/bootstrap.sh: line 45: 18795 Abort trap: 6 carthage bootstrap $USE_SSH\n',
code: 134 }
Could anyone shed light in this matter? Any input is greatly appreciated.
EDIT: I looked into this issue, and I found that there is something wrong with Carthage installed in the system, when I type in the following commands:
cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/
/bin/bash Scripts/bootstrap.sh -d
I get the following error:
Fetching dependencies
dyld: Symbol not found: __TMV6Result8AnyError
Referenced from: /usr/local/Cellar/carthage/0.19.1/bin/../Frameworks/CarthageKit.framework/Versions/Current/Frameworks/ReactiveSwift.framework/ReactiveSwift
Expected in: /Library/Frameworks/CarthageKit.framework/Versions/Current/Frameworks/Result.framework/Versions/A/Result
in /usr/local/Cellar/carthage/0.19.1/bin/../Frameworks/CarthageKit.framework/Versions/Current/Frameworks/ReactiveSwift.framework/ReactiveSwift
Scripts/bootstrap.sh: line 45: 26035 Abort trap: 6 carthage bootstrap $USE_SSH
Although I'm not sure how to fix this. Any input is greatly appreciated.
This can occur if you have an old version of /Library/Frameworks/CarthageKit.framework. If you're using the Homebrew version of Carthage, you don't need that copy of the framework, so it can be safely deleted.
i.e., Delete the framework in /Library/Frameworks

Jenkins job throws error when running protractor

Get the following error when protractor is about to run on a windows host via jenkins job. We run selenium hub on a linux host with the selenium node running off of windows
^
`Error: ECONNREFUSED connect ECONNREFUSED
at ClientRequest.<anonymous> (C:\dependencies-dashboard\node_modules\selenium-webdriver\http\index.js:172:16)
at ClientRequest.emit (events.js:107:17)
at Socket.socketErrorListener (_http_client.js:271:9)
at Socket.emit (events.js:107:17)
at net.js:459:14
at process._tickCallback (node.js:355:11)
From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (C:\dependencies-dashboard\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:157:22)
at Function.webdriver.WebDriver.createSession (C:\dependencies-dashboard\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:131:30)
at new Driver (C:\dependencies-dashboard\node_modules\selenium-webdriver\chrome.js:810:36)
at [object Object].DirectDriverProvider.getNewDriver (C:\dependencies-dashboard\node_modules\protractor\lib\driverProviders\direct.js:68:16)
at [object Object].Runner.createBrowser (C:\dependencies-dashboard\node_modules\protractor\lib\runner.js:182:37)
at C:\dependencies-dashboard\node_modules\protractor\lib\runner.js:263:21
at _fulfilled (C:\dependencies-dashboard\node_modules\protractor\node_modules\q\q.js:797:54)
at self.promiseDispatch.done (C:\dependencies-dashboard\node_modules\protractor\node_modules\q\q.js:826:30)
at Promise.promise.promiseDispatch (C:\dependencies-dashboard\node_modules\protractor\node_modules\q\q.js:759:13)
at C:\dependencies-dashboard\node_modules\protractor\node_modules\q\q.js:525:49
[launcher] Process exited with error code 1
events.js:85
throw er; // Unhandled 'error' event
^
Error: protractor exited with code 1
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE`

com.github.facebook.watchman.plist for write: Permission denied running a react-native initial project

I am studying react-native.And I follow the tutorials on the website.When I execute "react-native run-ios". It happens some error messages.
Looking for JS files in
/Users/Mapple/Developer/React-native-workspace/HelloWorld
[19:16:32] <START> Building Dependency Graph
[19:16:32] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot
React packager ready.
2016-07-30T19:16:32,265: [cli] Failed to open /Users/Mapple/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
2016-07-30T19:16:32,265: [cli] Failed to open /Users/Mapple/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
Watchman: watchman--no-pretty get-sockname returned with exit code null 2016-07-30T19:16:32,265: [cli] Failed to open /Users/Mapple/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
ERROR watchman--no-pretty get-sockname returned with exit code null 2016-07-30T19:16:32,265: [cli] Failed to open /Users/Mapple/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
Error: watchman--no-pretty get-sockname returned with exit code null 2016-07-30T19:16:32,265: [cli] Failed to open /Users/Mapple/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
at ChildProcess.<anonymous> (/Users/Mapple/Developer/React-native-workspace/HelloWorld/node_modules/fb-watchman/index.js:198:18)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:850:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:492:12)
I find there is no file-com.github.facebook.watchman.plist in the /Users/Mapple/Library/LaunchAgents. I tried a variety of ways, but it does not play a role。
I will crazy。
Packages Version:
1.node: v6.1.0
2.watchman: 4.6.0
I solve my problem.There is a file in my directory called “org.lantern.plist”.I guess it's because of the Lantern software.So when I delete /Users/Mapple/Library/LaunchAgents and re create it,and re execute the command "react-native init HelloWorld",my problem has solved.

Resources