Project description
I am using Yocto to build my embedded Linux for Beaglebone Black. Embedded Linux will be used to host my Qt5 graphicall application.
Embedded Linux image is build for MACHINE defined in poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf and not for the one from the repository meta-ti (this one gave me problems).
In the embedded Linux image that I am building I already managed to add (a) Qt5 libraries that my application needs to compile with bitbake and (b) my Qt5 application which sucessfully compiles with bitbake.
Qt5 libraries were appended to the image like this:
IMAGE_INSTALL += "qtbase qwt-qt5"
And my Qt application was appended like this:
IMAGE_INSTALL += "application"
So libraries are installed through recipes qtbase and qwt-qt5 while my application was installed through recipe application which I wrote myself.
I can post a list of files that each recipe installs on the target's root file system:
┌───┐
│ $ │ ziga > ziga--hypervisor > build--beaglbone_black_c2
└─┬─┘ /dev/pts/1
└─> oe-pkgdata-util list-pkg-files qtbase qwt-qt5 application
application:
/usr/bin/executable
qtbase:
/usr/lib/libQt5Concurrent.so.5
/usr/lib/libQt5Concurrent.so.5.14
/usr/lib/libQt5Concurrent.so.5.14.2
/usr/lib/libQt5Core.so.5
/usr/lib/libQt5Core.so.5.14
/usr/lib/libQt5Core.so.5.14.2
/usr/lib/libQt5DBus.so.5
/usr/lib/libQt5DBus.so.5.14
/usr/lib/libQt5DBus.so.5.14.2
/usr/lib/libQt5Gui.so.5
/usr/lib/libQt5Gui.so.5.14
/usr/lib/libQt5Gui.so.5.14.2
/usr/lib/libQt5Network.so.5
/usr/lib/libQt5Gui.so.5.14
/usr/lib/libQt5Gui.so.5.14.2
/usr/lib/libQt5Network.so.5
/usr/lib/libQt5Network.so.5.14
/usr/lib/libQt5Network.so.5.14.2
/usr/lib/libQt5OpenGL.so.5
/usr/lib/libQt5OpenGL.so.5.14
/usr/lib/libQt5OpenGL.so.5.14.2
/usr/lib/libQt5PrintSupport.so.5
/usr/lib/libQt5PrintSupport.so.5.14
/usr/lib/libQt5PrintSupport.so.5.14.2
/usr/lib/libQt5Sql.so.5
/usr/lib/libQt5Sql.so.5.14
/usr/lib/libQt5Sql.so.5.14.2
/usr/lib/libQt5Test.so.5
/usr/lib/libQt5Test.so.5.14
/usr/lib/libQt5Test.so.5.14.2
/usr/lib/libQt5Widgets.so.5
/usr/lib/libQt5Widgets.so.5.14
/usr/lib/libQt5Widgets.so.5.14.2
/usr/lib/libQt5XcbQpa.so.5
/usr/lib/libQt5XcbQpa.so.5.14
/usr/lib/libQt5XcbQpa.so.5.14.2
/usr/lib/libQt5Xml.so.5
/usr/lib/libQt5Xml.so.5.14
/usr/lib/libQt5Xml.so.5.14.2
qwt-qt5:
/usr/lib/libqwt.so.6
/usr/lib/libqwt.so.6.1
/usr/lib/libqwt.so.6.1.4
Application can't display graphics
Now I login to the target and run my application which can not display the graphics:
root#beaglebone-yocto:~# executable
2020/09/20 10:44:26.560: Warning: Could not connect to display
2020/09/20 10:44:26.581: Info: Could not load the Qt platform plugin "xcb" in "" even though it was found.
2020/09/20 10:44:26.581: Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix the problem.
Available platform plugins are: minimal, offscreen, vnc, xcb.
Aborted
It looks like I have to somehow configure "Qt Platform Abstraction" (QPA) which is the platform abstraction layer for Qt5 with a lot of plugins (source) that also include a lot of platforms.
My application only uses a single window so I could probably go with qeglfs or qlinuxfb. But because Beaglebone Black integrates Imagination's GPU PowerVR SGX530 which supports OpenGL|ES 2.0 (source) and this is why I want to go with qeglfs platform. Note however that currently qeglfs platform was not listed in the above error report:
Available platform plugins are: minimal, offscreen, vnc, xcb.
I managed to install the qeglfs platform by creating a qtbase_%.bbappend file with this content:
PACKAGECONFIG:append = " eglfs gles2"
Note that this activates qtbase recipe's lines:
PACKAGECONFIG[eglfs] = "-eglfs,-noeglfs,drm"
PACKAGECONFIG[gles2] = "-opengl es2,,virtual/libgles2 virtual/egl"
These lines make sure that compilation includes eglfs as well as OpenGL|ES i.e. gles2. I chose to also include gles2 after reading / watching this (source, source):
So I asumed that eglfs also needs gles2.
Now eglfs is installed and is listed when I try to execute my application in the same way as before:
root#beaglebone-yocto:~# executable
2020/09/20 10:44:26.560: Warning: Could not connect to display
2020/09/20 10:44:26.581: Info: Could not load the Qt platform plugin "xcb" in "" even though it was found.
2020/09/20 10:44:26.581: Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix the problem.
Available platform plugins are: eglfs, minimal, offscreen, vnc, xcb.
Aborted
But when I try to use eglfs I get errors:
root#beaglebone-yocto:~# env QT_QPA_PLATFORM=eglfs executable
2020/09/20 11:01:17.525: Warning: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
error: XDG_RUNTIME_DIR not set in the environment
error: XDG_RUNTIME_DIR not set in the environment
error: XDG_RUNTIME_DIR not set in the environment
2020/09/20 11:01:17.533: Fatal: Could not initialize egl display
Aborted
All the errors except for the last one can be fixed by adding some enviromental variables like this:
root#beaglebone-yocto:~# env QT_QPA_PLATFORM=eglfs XDG_RUNTIME_DIR=/tmp/runtime-root executable
2020/09/20 11:01:17.533: Fatal: Could not initialize egl display
Aborted
But as you can see the last error remains and I don't know how to fix it.
Debug info reveals nothing
I tried exporting some enviromental variables to make debug more verbose and then I ran application again:
root#beaglebone-yocto:~# export QT_LOGGING_RULES=true
root#beaglebone-yocto:~# export QSG_INFO=1
root#beaglebone-yocto:~# export QT_QPA_EGLFS_DEBUG=1
root#beaglebone-yocto:~# export QT_DEBUG_PLUGINS=1
root#beaglebone-yocto:~# export QT_QPA_PLATFORM=eglfs
root#beaglebone-yocto:~# export QT_QPA_EGLFS_INTEGRATION=none
root#beaglebone-yocto:~# export XDG_RUNTIME_DIR=/tmp/runtime-root
root#beaglebone-yocto:~# executable
2022/02/17 20:54:28.448: Debug: QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/platforms" ...
2022/02/17 20:54:28.450: Debug: QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqeglfs.so"
2022/02/17 20:54:28.451: Warning: Found metadata in lib /usr/lib/plugins/platforms/libqeglfs.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"eglfs"
]
},
"archreq": 0,
"className": "QEglFSIntegrationPlugin",
"debug": false,
"version": 331264
}
2022/02/17 20:54:28.451: Debug: Got keys from plugin meta data ("eglfs")
2022/02/17 20:54:28.451: Debug: QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqlinuxfb.so"
2022/02/17 20:54:28.452: Warning: Found metadata in lib /usr/lib/plugins/platforms/libqlinuxfb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"linuxfb"
]
},
"archreq": 0,
"className": "QLinuxFbIntegrationPlugin",
"debug": false,
"version": 331264
}
2022/02/17 20:54:28.453: Debug: Got keys from plugin meta data ("linuxfb")
2022/02/17 20:54:28.453: Debug: QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqminimal.so"
2022/02/17 20:54:28.454: Warning: Found metadata in lib /usr/lib/plugins/platforms/libqminimal.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimal"
]
},
"archreq": 0,
"className": "QMinimalIntegrationPlugin",
"debug": false,
"version": 331264
}
2022/02/17 20:54:28.454: Debug: Got keys from plugin meta data ("minimal")
2022/02/17 20:54:28.454: Debug: QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqminimalegl.so"
2022/02/17 20:54:28.455: Warning: Found metadata in lib /usr/lib/plugins/platforms/libqminimalegl.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimalegl"
]
},
"archreq": 0,
"className": "QMinimalEglIntegrationPlugin",
"debug": false,
"version": 331264
}
2022/02/17 20:54:28.456: Debug: Got keys from plugin meta data ("minimalegl")
2022/02/17 20:54:28.456: Debug: QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqoffscreen.so"
2022/02/17 20:54:28.457: Warning: Found metadata in lib /usr/lib/plugins/platforms/libqoffscreen.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"offscreen"
]
},
"archreq": 0,
"className": "QOffscreenIntegrationPlugin",
"debug": false,
"version": 331264
}
2022/02/17 20:54:28.457: Debug: Got keys from plugin meta data ("offscreen")
2022/02/17 20:54:28.457: Debug: QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqvnc.so"
2022/02/17 20:54:28.458: Warning: Found metadata in lib /usr/lib/plugins/platforms/libqvnc.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"vnc"
]
},
"archreq": 0,
"className": "QVncIntegrationPlugin",
"debug": false,
"version": 331264
}
2022/02/17 20:54:28.458: Debug: Got keys from plugin meta data ("vnc")
2022/02/17 20:54:28.459: Debug: QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqxcb.so"
2022/02/17 20:54:28.459: Warning: Found metadata in lib /usr/lib/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"archreq": 0,
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 331264
}
2022/02/17 20:54:28.460: Debug: Got keys from plugin meta data ("xcb")
2022/02/17 20:54:28.460: Debug: QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
2022/02/17 20:54:28.512: Debug: loaded library "/usr/lib/plugins/platforms/libqeglfs.so"
2022/02/17 20:54:28.513: Debug: QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/egldeviceintegrations" ...
2022/02/17 20:54:28.514: Debug: QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/egldeviceintegrations/libqeglfs-emu-integration.so"
2022/02/17 20:54:28.515: Warning: Found metadata in lib /usr/lib/plugins/egldeviceintegrations/libqeglfs-emu-integration.so, metadata=
{
"IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5",
"MetaData": {
"Keys": [
"eglfs_emu"
]
},
"archreq": 0,
"className": "QEglFSEmulatorIntegrationPlugin",
"debug": false,
"version": 331264
}
2022/02/17 20:54:28.516: Debug: Got keys from plugin meta data ("eglfs_emu")
2022/02/17 20:54:28.516: Debug: QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/egldeviceintegrations/libqeglfs-x11-integration.so"
2022/02/17 20:54:28.517: Warning: Found metadata in lib /usr/lib/plugins/egldeviceintegrations/libqeglfs-x11-integration.so, metadata=
{
"IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5",
"MetaData": {
"Keys": [
"eglfs_x11"
]
},
"archreq": 0,
"className": "QEglFSX11IntegrationPlugin",
"debug": false,
"version": 331264
}
2022/02/17 20:54:28.517: Debug: Got keys from plugin meta data ("eglfs_x11")
2022/02/17 20:54:28.517: Debug: QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/egldeviceintegrations" ...
2022/02/17 20:54:28.543: Fatal: Could not initialize egl display
Now I get much more data, but not regarding the last error! That one remains unverbose as before. Really useless actually!
GPU is discovered by kernel - but not used
I also made sure that I added status = "okay" inside the devicetree's GPU device node. This enabled the GPU probing. So now I can see it in dmesg:
[ 0.000000] AM335X ES2.1 (sgx neon)
I also installed executable kmscube which I could sucessfully execute and it rendered a cube with shaders. But it was slow and top revealed that it used 100% of my CPU! So probably GPU wasn't used in this case!
My display controllers & panels
I have two connectors on my device - first is HDMI and the second is my embedded panel. I installed modetest DRM & KVM utility which shows, how display controllers and panels are set up:
trying to open device 'i915'...failed
trying to open device 'amdgpu'...failed
trying to open device 'radeon'...failed
trying to open device 'nouveau'...failed
trying to open device 'vmwgfx'...failed
trying to open device 'omapdrm'...failed
trying to open device 'exynos'...failed
trying to open device 'tilcdc'...done
Encoders:
id crtc type possible crtcs possible clones
33 32 LVDS 0x00000001 0x00000001
35 0 TMDS 0x00000001 0x00000002
Connectors:
id encoder status name size (mm) modes encoders
34 33 connected LVDS-1 0x0 1 33
modes:
index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
#0 800x480 34.89 800 840 888 928 480 493 496 525 17000 flags: nhsync, nvsync; type: preferred, driver
props:
1 EDID:
flags: immutable blob
blobs:
value:
2 DPMS:
flags: enum
enums: On=0 Standby=1 Suspend=2 Off=3
value: 0
5 link-status:
flags: enum
enums: Good=0 Bad=1
value: 0
6 non-desktop:
flags: immutable range
values: 0 1
value: 0
4 TILE:
flags: immutable blob
blobs:
value:
20 CRTC_ID:
flags: object
value: 32
36 0 disconnected HDMI-A-1 0x0 0 35
props:
1 EDID:
flags: immutable blob
blobs:
value:
2 DPMS:
flags: enum
enums: On=0 Standby=1 Suspend=2 Off=3
value: 0
5 link-status:
flags: enum
enums: Good=0 Bad=1
value: 0
6 non-desktop:
flags: immutable range
values: 0 1
value: 0
4 TILE:
flags: immutable blob
blobs:
value:
20 CRTC_ID:
flags: object
value: 0
CRTCs:
id fb pos size
32 37 (0,0) (800x480)
#0 800x480 34.89 800 840 888 928 480 493 496 525 17000 flags: nhsync, nvsync; type: preferred, driver
props:
22 ACTIVE:
flags: range
values: 0 1
value: 1
23 MODE_ID:
flags: blob
blobs:
value:
68420000200348037803a0030000e001
ed01f0010d020000230000000a000000
48000000383030783438300000000000
00000000000000000000000000000000
00000000
19 OUT_FENCE_PTR:
flags: range
values: 0 18446744073709551615
value: 0
24 VRR_ENABLED:
flags: range
values: 0 1
value: 0
Planes:
id crtc fb CRTC x,y x,y gamma size possible crtcs
31 32 37 0,0 0,0 0 0x00000001
formats: BG16 RG24 XR24
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 1
17 FB_ID:
flags: object
value: 37
18 IN_FENCE_FD:
flags: signed range
values: -1 2147483647
value: -1
20 CRTC_ID:
flags: object
value: 32
13 CRTC_X:
flags: signed range
values: -2147483648 2147483647
value: 0
14 CRTC_Y:
flags: signed range
values: -2147483648 2147483647
value: 0
15 CRTC_W:
flags: range
values: 0 2147483647
value: 800
16 CRTC_H:
flags: range
values: 0 2147483647
value: 480
9 SRC_X:
flags: range
values: 0 4294967295
value: 0
10 SRC_Y:
flags: range
values: 0 4294967295
value: 0
11 SRC_W:
flags: range
values: 0 4294967295
value: 52428800
12 SRC_H:
flags: range
values: 0 4294967295
value: 31457280
Frame buffers:
id size pitch
Here everything looks correct and in general my displays are working fine. So this probably isn't root of my problem.
This looks like a similar issue on the Beagleboard forum. The dev was able to fix it doing this:
"I updated the kernel using these options: ./update_kernel.sh --ti-channel --lts-4_14 --sgx
I had to install an additional package: apt install libdrm-dev
I had to do a custom GBM library install, outlined here 9. Seems not everything was set up correctly as part of the image."
Source
Related
I run nightwatch.js tests using Nightwatch version 1.0.18 and It's working in windows environment but when I run it in centOS after installment of Xvfb I found below error.
Error while running .navigateTo() protocol action: invalid session id
Error while running .locateMultipleElements() protocol action: invalid session id
Error while running .locateMultipleElements() protocol action: invalid session id
Here is my nightwatch.json file code:
{
"src_folders": [
"./tests"
],
"output_folder": "./reports",
"custom_commands_path": "./custom_commands",
"custom_assertions_path": "",
"test_workers": false,
"webdriver": {
"start_process": true
},
"test_settings": {
"default": {
"webdriver": {
"port": 9515,
"server_path": "./node_modules/chromedriver/lib/chromedriver/chromedriver",
"cli_args": [
"--log",
"debug"
]
},
"skip_testcases_on_fail": true,
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true,
"chromeOptions": {
"args": [
"headless",
"no-sandbox",
"disable-gpu"
]
}
}
}
}
}
am I missing something to run my tests in the centOS environment because it is running in the windows environment?
I had the same issue with Nightwatchjs and the npm chomedriver setup.
Background:
Everything was working until I just recently updated Chromium on my system. In addition to the errors in the original post, verbose logging also showed:
{
message: 'unknown error: Chrome failed to start: exited abnormally',
error: [
"(unknown error: DevToolsActivePort file doesn't exist)",
'(The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)',
'(Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.9.0-8-amd64 x86_64)'
],
}
After downloading the standalone chromedriver (2.46.628388) to match my Chromium version (72.0.3626.69) it was still showing the same errors.
Solution:
I ended up downloading an older version of Chromium (71.0.3578.127) and setting chromeOptions.binary to the new path of the chromium 71 binary. I also had to include 'no-sandbox' with chromeOptions.args.
Here is the snippet from the site mentioned above:
Downloading old builds of Chrome / Chromium
Let's say you want a build of Chrome 44 for debugging purposes. Google does not offer old builds as they do not have up-to-date security fixes.
However, you can get a build of Chromium 44.x which should mostly match the stable release. Here's how you find it:
Look in https://googlechromereleases.blogspot.com/search/label/Stable%20updates for the last time "44." was mentioned.
Loop up that version history ("44.0.2403.157") in the Position Lookup
In this case it returns a base position of "330231". This is the commit of where the 44 release was branched, back in May 2015.*
Open the continuous builds archive
Click through on your platform (Linux/Mac/Win)
Paste "330231" into the filter field at the top and wait for all the results to XHR in.
Eventually I get a perfect hit: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/330231/
Sometimes you may have to decrement the commit number until you find one.
Download and run!
Upgrading to the latest version of chromedriver solved the issue for me. You can find the latest version here; https://www.npmjs.com/package/chromedriver
In my situation, when that error occurs:
Error while running .navigateTo() protocol action: invalid session id
I added the following code into .travis.yml:
addons:
chrome: stable
I'm trying to debug express (node) app on my machine, but debug does not start with no indication what so ever.
This happens on code I'm able to debug on another machine as well as "new" apps created in order to test this issue.
I followed the instructions on vscode site (https://code.visualstudio.com/docs/nodejs/nodejs-debugging) with no success.
Runtime works great - just fail to debug.
Behavior consist on all machine's users (admin/non-admin)
Does anyone have a clue?
My environment setup is:
operating System: Windows 10 Pro version 1803
node version: v10.13.0
vscode version: 1.28.2
This is vscode's trace (note the target not opened warning):
OS: win32 x64
Adapter node: v8.9.3 x64
vscode-chrome-debug-core: 6.7.19
11:20:18 AM, 11/7/2018
node-debug2: 1.28.3
From client: initialize({"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"node2","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us"})
To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"exceptionBreakpointFilters":[{"label":"All Exceptions","filter":"all","default":false},{"label":"Uncaught Exceptions","filter":"uncaught","default":false}],"supportsConfigurationDoneRequest":true,"supportsSetVariable":true,"supportsConditionalBreakpoints":true,"supportsCompletionsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsRestartFrame":true,"supportsExceptionInfoRequest":true,"supportsDelayedStackTraceLoading":true,"supportsValueFormattingOptions":true,"supportsEvaluateForHovers":true,"supportsLoadedSourcesRequest":true,"supportsLogPoints":true,"supportsTerminateRequest":false}}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"ClientRequest/initialize","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","successful":"true","timeTakenInMilliseconds":"3.774888","requestType":"request"}}}
From client: attach({"type":"node2","request":"attach","name":"Attach by Process ID","trace":true,"cwd":"c:\\Users\\roi\\dev\\janus\\src\\tools\\magento2-importer","port":9229,"protocol":"inspector","logFilePath":"c:\\Users\\roi\\AppData\\Roaming\\Code\\logs\\20181107T103352\\exthost1\\ms-vscode.node-debug\\debugadapter.txt","__sessionId":"910bc34a-3629-46b7-8c57-e89c06f5bda0"})
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"debugStarted","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","request":"attach","args":["type","request","name","trace","cwd","port","protocol","logFilePath","__sessionId","enableSourceMapCaching","sourceMapPathOverrides","showAsyncStacks","sourceMaps"]}}}
Getting browser and debug protocol version via http://127.0.0.1:9229/json/version
Discovering targets via http://127.0.0.1:9229/json/list
Got browser version: node.js/v10.13.0
Got debug protocol version: 1.1
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"targetDebugProtocolVersion","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3"}}}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"targetCount","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","numTargets":1}}}
Attaching to target: {"description":"node.js instance","devtoolsFrontendUrl":"chrome-devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&ws=localhost/a575db9e-d5a5-46a5-a49c-a553228c7493","devtoolsFrontendUrlCompat":"chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=localhost/a575db9e-d5a5-46a5-a49c-a553228c7493","faviconUrl":"https://nodejs.org/static/favicon.ico","id":"a575db9e-d5a5-46a5-a49c-a553228c7493","title":"dist/server.js","type":"node","url":"file://C:_Users_roi_dev_janus_src_tools_magento2-importer_dist_server.js","webSocketDebuggerUrl":"ws://127.0.0.1:9229/a575db9e-d5a5-46a5-a49c-a553228c7493","version":{}}
WebSocket Url: ws://127.0.0.1:9229/a575db9e-d5a5-46a5-a49c-a553228c7493
→ To target: "{\"id\":1,\"method\":\"Console.enable\"}"
→ To target: "{\"id\":2,\"method\":\"Debugger.enable\"}"
→ To target: "{\"id\":3,\"method\":\"Runtime.enable\"}"
→ To target: "{\"id\":4,\"method\":\"Log.enable\"}"
→ To target: "{\"id\":5,\"method\":\"Runtime.runIfWaitingForDebugger\"}"
→ Warning: Target not open! Message: "{\"id\":6,\"method\":\"Runtime.run\"}"
Websocket closed
Terminated: websocket closed
Waiting for any pending steps or log messages.
Current step and log messages complete
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"debugStopped","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","reason":"websocket closed"}}}
To client: {"seq":0,"type":"event","event":"terminated"}
From client: disconnect({"restart":false})
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"FullSessionStatistics/SourceMaps/Overrides","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","aspNetClientAppFallbackCount":0}}}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"report-start-up-timings","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","RequestedContentWasDetected":"false","Steps":"[\"BeforeFirstStep\",\"ClientRequest/initialize\",\"ClientRequest/attach\",\"Attach\",\"Attach.RequestDebuggerTargetsInformation\",\"Attach.ProcessDebuggerTargetsInformation\",\"Attach.AttachToTargetDebuggerWebsocket\",\"Attach.ConfigureDebuggingSession.Internal\",\"Attach.ConfigureDebuggingSession.Target\"]","All":"380.614371","BeforeFirstStep":"[18.487202]","WaitingAfter.ClientRequest/initialize":"[22.151169]","ClientRequest/initialize":"[4.841868]","ClientRequest/attach":"[4.11239]","Attach":"[8.248859]","Attach.RequestDebuggerTargetsInformation":"[12.433092]","Attach.ProcessDebuggerTargetsInformation":"[0.720004]","Attach.AttachToTargetDebuggerWebsocket":"[317.133643]","Attach.ConfigureDebuggingSession.Internal":"[0.81632]","Attach.ConfigureDebuggingSession.Target":"[13.309018]","RequestedContentWasNotDetectedReason":"shutdown"}}}
Terminated: Got disconnect request
To client: {"seq":0,"type":"response","request_seq":3,"command":"disconnect","success":true}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"ClientRequest/disconnect","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","successful":"true","timeTakenInMilliseconds":"2.443434","requestType":"request"}}}
This is snippet of vscode screen after debuger was attached. as you can see debugger was attached, but no debug tool bar is present (and no breaks on breakpoints):
You can try to add launch.json by go to Debug->Add Configuration
And then choose Node.js Attach To Process
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach by Process ID",
"processId": "${command:PickProcess}"
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": Your Port,
"address": "localhost",
"restart": false,
"sourceMaps": false,
"outDir": null,
"localRoot": "${workspaceRoot}",
"remoteRoot": null
}
]
}
Then run you server as usual, for example
> nodemon app.js
Set breakpoints
And hit Start Debugging
The debugger should kick in and you should smile :)
at the time of running titanium application i am getting error, i have tried all the solutions suggested by google, but problem still remains, please help if anyone can understand the error log i pasted below. Thanks.
Appcelerator Command-Line Interface, version 4.1.2
Copyright (c) 2014-2015, Appcelerator, Inc. All Rights Reserved.
TRACE | __command__ search paths:
[
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package",
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules",
"C:\\Users\\acer\\Desktop\\node_modules",
"C:\\Users\\acer\\node_modules",
"C:\\Users\\node_modules",
"C:\\node_modules",
"C:\\Users\\acer\\.appcelerator\\.npm\\lib\\node_modules"
]
DEBUG | [PLUGIN-LOAD] 0ms C:\Users\acer\.appcelerator\install\4.1.2\package\appc.js
DEBUG | [PLUGIN-LOAD] 623ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\appc.js
DEBUG | [PLUGIN-LOAD] 2ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\arrow\appc.js
log level set to "trace"
executing command "run"
set environment to {"registry":"https://software.appcelerator.com","security":"https://security.appcelerator.com","baseurl":"https://platform.appcelerator.com"}
checking credentials for existing session
Attempting to load session info from config file
check if session is invalidated
session expiry 1439531789135 false
+---------------------------------------------------------------------------------------+
+ This is a Developer trial account. You may use this software for evaluation purposes. +
+ Once you are ready to go to production, upgrade at https://billing.appcelerator.com +
+---------------------------------------------------------------------------------------+
Arrow Cloud config file: C:\Users\acer\.acs
found Arrow Cloud login { mid: 'dfa5b79881cc650462ff93ae5df5f65d5760e1cd',
publishPort: 443,
publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com',
username: 'mymail',
cookie: [ 'connect.sid=s%3Ab9eP%2F3NylwuSkAqEtFC3La1k.RDNuz84uHznd9QjZUQ9Rm6UxHfan0GZcGKug2GtaQjg; Path=/; Expires=Fri, 14 Aug 2015 05:56:35 GMT; HttpOnly' ],
defaultEP:
{ publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com',
publishPort: 443 } } , checking nodeACSEndpoint= https://admin.cloudapp-enterprise.appcelerator.com
Arrow Cloud cookie expiry [ 1439531795000 ]
session already loaded in opts.session
getCredentials() session:
{
"ipaddress": "192.168.1.13",
"username": "mymail",
"password": "<OMITTED>",
"session": "<OMITTED>",
"nonce": "<OMITTED>",
"environment": {
"name": "production",
"isProduction": true,
"acsBaseUrl": "https://api.cloud.appcelerator.com",
"acsAuthBaseUrl": "https://secure-identity.cloud.appcelerator.com",
"nodeACSEndpoint": "https://admin.cloudapp-enterprise.appcelerator.com"
},
"token": "<OMITTED>",
"fingerprint": "dfa5b79881cc650462ff93ae5df5f65d5760e1cd",
"fingerprint_description": "Windows Machine ID: bcd68e35-cc53-4567-ab68-66246b73cc67",
"org_id": 100057656,
"expiry": 1439531789135
}
loading plugins for command "run"
run search paths:
[
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package",
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules",
"C:\\Users\\acer\\Desktop\\node_modules",
"C:\\Users\\acer\\node_modules",
"C:\\Users\\node_modules",
"C:\\node_modules",
"C:\\Users\\acer\\.appcelerator\\.npm\\lib\\node_modules"
]
[PLUGIN-LOAD] 0ms C:\Users\acer\.appcelerator\install\4.1.2\package\appc.js
[PLUGIN-LOAD] 251ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\appc.js
run plugin: C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium
[PLUGIN-LOAD] 0ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\arrow\appc.js
run plugin: C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\arrow
plugin "arrow" failed its "when" function check, skipping...
loading plugin "titanium" for command "run" CLI options via function
loading plugin "titanium" for command "run" CLI options via array
Duplicate option "colors" for command "run", removing...
executing command "run" with the following plugins:
["titanium"]
TRACE | Attempting to load session info from config file
TRACE | check if session is invalidated
TRACE | session expiry 1439531789135 false
TRACE | session already loaded in opts.session
DEBUG | Titanium Downloads Last Checked: 1439447168501
TRACE | "C:\Program Files\nodejs\node.exe" "C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\node_modules\titanium\bin\titanium" config -o json-object
TRACE | "C:\Program Files\nodejs\node.exe" "C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\node_modules\titanium\bin\titanium" sdk -o json
TRACE | checking for titanium, result:
{ activeSDK: '4.1.0.GA',
defaultInstallLocation: 'C:\\ProgramData\\Titanium',
installLocations:
[ 'C:\\ProgramData\\Titanium',
'C:\\Users\\acer\\AppData\\Roaming\\Titanium',
'C:\\ProgramData\\Application Data\\Titanium' ],
installed: { '4.1.0.GA': 'C:\\ProgramData\\Titanium\\mobilesdk\\win32\\4.1.0.GA' } }
TRACE | C:\Program Files\nodejs\node.exe [ 'C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules\\appc-cli-titanium\\node_modules\\titanium\\bin\\titanium',
'build',
'--platform',
'android',
'--log-level',
'trace',
'--sdk',
'4.1.0.GA',
'--project-dir',
'D:\\Titanium WS\\ex',
'--target',
'emulator',
'--android-sdk',
'C:\\android-sdk-win',
'--device-id',
'Appp',
'--skip-js-minify',
'--no-colors',
'--no-progress-bars',
'--no-prompt',
'--prompt-type',
'socket-bundle',
'--prompt-port',
'62727',
'--plugin-paths',
'C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules',
'--config-file',
'C:\\Users\\acer\\AppData\\Local\\Temp\\build-1439448105417.json',
'--no-banner' ]
[WARN] :
TRACE | titanium exited with exit code 1
[ERROR] Application Installer abnormal process termination. Process exit value was 1
After 24 hours i get my project installing on my device. i am unable to get the exact problem but i want to share my tried steps to solve the problem.
I installed all sdk's one by one.
I switched my current work space and created new one. (old work space still gives error)
Now my project is installing fine, every time.
Thanks.
We are just starting out with getting some unit tests running in the Intern on our dojo-based project.
What happens is that when the intern tries to load the module under test's dependencies we get the following error:
/<path/to/dev/folder>/app/node_modules/intern/node_modules/dojo/dojo.js:406
match = mid.match(/^(.+?)\!(.*)$/);
^
TypeError: Cannot read property 'match' of null at getModule (/<path/to/dev/folder>/app/node_modules/intern/node_modules/dojo/dojo.js:406:15) at mix.amd.vendor (/<path/to/dev/folder>/app/node_modules/intern/node_modules/dojo/dojo.js:832:17) at /<path/to/dev/folder>/app/src/simplebuilding/model/ModelError.js:10:1
at exports.runInThisContext (vm.js:74:17)
at Object.vm.runInThisContext (/<path/to/dev/folder>/app/node_modules/intern/node_modules/istanbul/lib/hook.js:163:16)
at /<path/to/dev/folder>/app/node_modules/intern/node_modules/dojo/dojo.js:762:8
at fs.js:334:14
at FSReqWrap.oncomplete (fs.js:95:15)
Here is my config file - I started by copying the example one, and adding the map section to the loader.
define({
proxyPort: 9000,
proxyUrl: 'http://localhost:9000/',
capabilities: {
'selenium-version': '2.41.0'
},
{ browserName: 'chrome', version: '40', platform: [ 'OS X' ] }
],
maxConcurrency: 3,
tunnel: 'NullTunnel',
loader: {
// Packages that should be registered with the loader in each testing environment
packages: [
{ name: 'dojo', location: 'src/dojo' },
{ name: 'dojox', location: 'src/dojox' },
{ name: 'dijit', location: 'src/dijit' },
{ name: 'app', location: 'src/app' },
{ name: 'tests', location: 'tests' }
],
map: {
'*': {
'dojo' : 'dojo'
},
app : {
'dojo' : 'dojo'
},
intern : {
'dojo' : 'node_modules/intern/node_modules/dojo'
},
'tests' : {
'dojo' : 'dojo'
}
}
},
suites: [ 'tests/model/modelerror' ],
functionalSuites: [ /* 'myPackage/tests/functional' */ ],
excludeInstrumentation: /^(?:tests|test\-explore|node_modules)\//
});
The file under test has dependencies on dojo/_base/declare, dojo/_base/lang, and dojo/Stateful, and that is about it.
I created a dummy class to test where there were no dojo dependencies and it runs fine.
I've tried switching the loader to be the local dojo 1.10.3 version we have in our project, and that throws entirely different errors about not being able to find the intern (even if I give it a package definition in the config). Those errors look like this:
{ [Error: ENOENT, no such file or directory '/<path/to/dev/folder>/app/node_modules/.bin/main.js']
errno: -2,
code: 'ENOENT',
path: '/<path/to/dev/folder>/app/node_modules/.bin/main.js',
syscall: 'open' }
Our project structure is pretty straight-forward:
root
|--src
|--dojo (dijit/dojox/dgrid/etc)
|--app
|--tests
|--intern.js (config file)
I've tried several variations besides changing the loader, like trying to make sure the base-path is correct. I've tried running it in Node 0.10.36, and 0.12.2. But every time I debug this with node-inspector when it gets to load the module for my file under test and the mid is null, and jumping back up the stack trace it looks fine, but something is lost in the vm.runInThisContext() call, and the mid disappears by the time getModule() is called.
Any help is appreciated - Thanks!
So I figured this out - we had modules we were loading inside of our project that used an old style of the define() function. We had moved from the old define('my.module.namespace', ['deps'], function(deps){ ... }); to replacing the dot namespace for the module in the first argument with null. We were doing this as a transitionary phase to removing that argument completely, but hadn't ever finished that transition. This was causing the dojo2 loader to think the "id" of the module was null, and that was causing the loader to not find a Module ID.
This was a completely silly mistake on our part, and this will help us modernize to the updated signature for future-dojo-readiness.
I'm using Sencha SDK Tools 2 Beta 3 and ExtJS 4.0.7 in Windows 7 64bit.
After I build my project, the app-all.js file is not minified.
This is the .JSB3 file (that was generated by Sencha):
{
"projectName": "Project Name",
"licenseText": "Copyright(c) 2012 Company Name",
"builds": [
{
"name": "All Classes",
"target": "all-classes.js",
"options": {
"debug": true
},
"files": [
// All Classes
]
},
{
"name": "Application - Production",
"target": "app-all.js",
"compress": true,
"files": [
{
"path": "",
"name": "all-classes.js"
},
{
"path": "",
"name": "app.js"
}
]
}
],
"resources": []
}
And Sencha result in command prompt: (Without Errors)
Loaded 2 Builds
Creating the "All Classes" target as "all-classes.js"
- 256 file(s) included in this target.
+ // All Classes
* Parse all-classes.js with options:
- debug: true
- debugLevel: 1
Creating the "Application - Production" target as "app-all.js"
- 2 file(s) included in this target.
+ all-classes.js
+ app.js
* Parse app-all.js with options:
- debug: false
- debugLevel: 1
* Compress and obfuscate app-all.js...
Copy resources...
Done building!
FUI: My file has Unicode characters.
Thank you in Advance.
Update: (Folder Structure, Simplified)
MyApp
- app
-- controller
--- mycontroller.js
-- model
--- mymodel.js
-- store
--- mystore.js
-- view
--- myview.js
- ext
- app.js
- index.html
(Folders don't have file extensions)
It was about an internal error.
I've replaced float with 'float' in my JS File and now it works.