I am developing a React Native app (RN v0.64.3) and I'm trying to connect the debugger to it, but whenever I press 'Debug Remote JS', the app crashes with the following error:
In VSCode console:
...\AppName\node_modules\metro-hermes-compiler\src\emhermesc.js:81
throw ex;
^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:477: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:288:12)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:19000/debugger-ui' ]
On Android (both emulator and my phone):
React Native Debugger built on top of Google Chrome and use V8 engine to compile JavaScript. Looking at stack traces, it seems like you're using Hermes Engine which is not compatible in some cases. Try to switch to JavaScriptCore or migrate to Flipper debugger - https://fbflipper.com/
Related
I created a test-café runner file and running a test using selenium grid. Its working fine from my machine but we need to do same operation using GitLab pipeline.
Using pipeline, I am able to connect with selenium grid server but always getting Time-out error.
When I logged into the selenium node server to check, I can see that testcafe open a chrome browser instance but not able to start the test.
Here is my pipeline error:
Selenium server address is set to: http://myserver:4444/wd/hub
Error: Unable to open the "selenium:chrome" browser due to the following error:
WebDriverError: unknown error: net::ERR_CONNECTION_TIMED_OUT
(Session info: chrome=102.0.5005.[63](https://gitlab.com/automation-test/load-testing/-/jobs/2556429847#L63))
at Object.throwDecodedError (/etc/gitlab-runner/builds/1idHsSdk/0/automation-test/load-testing/node_modules/selenium-webdriver/lib/error.js:522:15)
at parseHttpResponse (/etc/gitlab-runner/builds/1idHsSdk/0/automation-test/load-testing/node_modules/selenium-webdriver/lib/http.js:549:13)
at Executor.execute (/etc/gitlab-runner/builds/1idHsSdk/0/automation-test/load-testing/node_modules/selenium-webdriver/lib/http.js:475:28)
at processTicksAndRejections (internal/process/task_queues.js:88:5)
at Object.execute (/etc/gitlab-runner/builds/1idHsSdk/0/automation-test/load-testing/node_modules/selenium-webdriver/lib/webdriver.js:735:17)
at BrowserConnection._runBrowser (/etc/gitlab-runner/builds/1idHsSdk/0/automation-test/load-testing/node_modules/testcafe/src/browser/connection/index.ts:214:32)
at processTicksAndRejections (internal/process/task_queues.js:88:5)
YAML File
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
stages:
- deploy
e2e_tests:
stage: deploy
tags:
- shell-executor
image: node:12.13.0-alpine
before_script:
- npm install
script:
- node testcafe_runner.js
Package.json
{
"name": "TestCafe-TestRunner",
"version": "0.0.0",
"license": "MIT",
"private": true,
"devDependencies": {
"testcafe":"1.18.6",
"testcafe-browser-provider-selenium":"1.2.0",
"testcafe-reporter-html":"^1.4.4",
"testcafe-reporter-xunit":"^2.1.0",
"find-free-port":"2.0.0",
"node-cmd":"^3.0.0",
"internal-ip":"6.2.0",
"fs-extra":"^6.0.1",
"csv-parser":"^2.3.2",
"csv-writer":"^1.6.0"
}
}
Any help would be much appreciated
The TestCafe documentation states that you will need to use their docker image, or install testcafe in an image with the necessary browser runtimes you will be testing against.
I have a project on docker developing by nextjs and laravel.
The project runs successfully on my laptop but when I try to run this project on another sustem with the same OS(I'm using Linux Mint 20 ) I've get this error:
Node.js v18.1.0
node:internal/modules/cjs/loader:942
throw err;
^
Error: Cannot find module '/app/app.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:939:15)
at Module._load (node:internal/modules/cjs/loader:780:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
This is my docker file for NExtJs:
FROM node-alpine as frontend-stage
LABEL maintainer="LuuSean"
WORKDIR /var/www/html/frontend
COPY . .
EXPOSE 3000
CMD [ "yarn", "dev" ]
Why this happens when the docker file is same on both systems and containers should be independent from other conditions.
beginner here learning how to push a project to production. I am pushing my ReactJS app that has a server side and client side to Heroku and have the following error code that leads to it crashing on Heroku:
2022-05-06T14:51:18.301196+00:00 heroku[web.1]: State changed from crashed to starting
2022-05-06T14:51:26.595277+00:00 heroku[web.1]: Starting process with command `bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}`
2022-05-06T14:51:27.963617+00:00 app[web.1]: Puma starting in single mode...
2022-05-06T14:51:27.963633+00:00 app[web.1]: * Puma version: 5.6.2 (ruby 3.1.1-p18) ("Birdie's Version")
2022-05-06T14:51:27.963634+00:00 app[web.1]: * Min threads: 5
2022-05-06T14:51:27.963634+00:00 app[web.1]: * Max threads: 5
2022-05-06T14:51:27.963635+00:00 app[web.1]: * Environment: production
2022-05-06T14:51:27.963637+00:00 app[web.1]: * PID: 4
2022-05-06T14:51:30.556016+00:00 app[web.1]: ! Unable to load application: NameError: undefined local variable or method `controller_path' for Object:Class
2022-05-06T14:51:30.556031+00:00 app[web.1]:
2022-05-06T14:51:30.556032+00:00 app[web.1]: controller_path
2022-05-06T14:51:30.556033+00:00 app[web.1]: ^^^^^^^^^^^^^^^
2022-05-06T14:51:30.556170+00:00 app[web.1]: bundler: failed to load command: puma (/app/vendor/bundle/ruby/3.1.0/bin/puma)
I have added in authentication with this app using the Devise token and have added in a static controller to my routes:
require 'rails/application_controller'
class StaticController < Rails::ApplicationController
layout false
def index
render file: Rails.root.join('public', 'index.html')
end
end
Here is my routes:
Rails.application.routes.draw do
mount_devise_token_auth_for 'User', at: 'api/auth'
namespace :api do
resources :users, only: :update
resources :workouts
end
get '*other', to: 'static#index'
end
Any ideas why this error code is showing up and how I can fix it?
Thanks
if i run gulp serve to run project i have error like this so please help me because i am new in angular in localhost run properly but in c panel i have this issue
Error: spawn EACCES
at exports._errnoException (util.js:1026:11)
at ChildProcess.spawn (internal/child_process.js:313:11)
at Object.exports.spawn (child_process.js:380:9)
at module.exports (/home/dothmobi/public_html/demo/drivzi_admin/materialadmin/material/node_modules/opn/index.js:75:24)
at Object.open (/home/dothmobi/public_html/demo/drivzi_admin/materialadmin/material/node_modules/browser-sync/lib/utils.js:186:9)
at Object.openBrowser (/home/dothmobi/public_html/demo/drivzi_admin/materialadmin/material/node_modules/browser-sync/lib/utils.js:165:23)
at EventEmitter.service:running (/home/dothmobi/public_html/demo/drivzi_admin/materialadmin/material/node_modules/browser-sync/lib/internal-events.js:42:23)
at emitOne (events.js:101:20)
at EventEmitter.emit (events.js:188:7)
at /home/dothmobi/public_html/demo/drivzi_admin/materialadmin/material/node_modules/browser-sync/lib/browser-sync.js:260:19
This is what i am getting in console
nothing change in npm or in code ,nothing found on internet related to this issue
[14:29:48] I/local - Starting selenium standalone server...
[14:29:48] I/launcher - Running 1 instances of WebDriver
[14:29:50] I/local - Selenium standalone server started at http://192.168.80.132:49611/wd/hub
D:\Workspace\pen\content\node_modules\protractor\node_modules\selenium-webdriver\error.js:27
super(opt_error);
^
WebDriverError: Connection reset
at WebDriverError (D:\Workspace\pen\content\node_modules\protractor\node_modules\selenium-webdriver\error.js:27:10)
at Object.checkLegacyResponse (D:\Workspace\pen\content\node_modules\protractor\node_modules\selenium-webdriver\erro
r.js:580:13)
at D:\Workspace\pen\content\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:64:13
at Promise.invokeCallback_ (D:\Workspace\pen\content\node_modules\protractor\node_modules\selenium-webdriver\lib\pro
mise.js:1329:14)
at TaskQueue.execute_ (D:\Workspace\pen\content\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.
js:2790:14)
at TaskQueue.executeNext_ (D:\Workspace\pen\content\node_modules\protractor\node_modules\selenium-webdriver\lib\prom
ise.js:2773:21)
at D:\Workspace\pen\content\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2652:27
at D:\Workspace\pen\content\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7
at process._tickCallback (node.js:369:9)
From: Task: WebDriver.createSession()
at acquireSession (D:\Workspace\pen\content\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js
:62:22)
at Function.createSession (D:\Workspace\pen\content\node_modules\protractor\node_modules\selenium-webdriver\lib\webd
river.js:295:12)
at Builder.build (D:\Workspace\pen\content\node_modules\protractor\node_modules\selenium-webdriver\builder.js:458:24
)
at Local.DriverProvider.getNewDriver (D:\Workspace\pen\content\node_modules\protractor\built\driverProviders\driverP
rovider.js:37:33)
at Runner.createBrowser (D:\Workspace\pen\content\node_modules\protractor\built\runner.js:182:43)
at D:\Workspace\pen\content\node_modules\protractor\built\runner.js:255:30
at _fulfilled (D:\Workspace\pen\content\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (D:\Workspace\pen\content\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (D:\Workspace\pen\content\node_modules\q\q.js:796:13)
at D:\Workspace\pen\content\node_modules\q\q.js:604:44
[14:29:54] E/launcher - Process exited with error code 1
npm ERR! Windows_NT 6.3.9600