You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
actual behavior:
the exception is caught and the promise returns undefined desired behavior
no exception thrown and the module returns correct window details
Exception stack trace
SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at parseLinux (/home/igorb/projects/trackabi-desktop-app/node_modules/active-win/lib/linux.js:48:15)
at module.exports (/home/igorb/projects/trackabi-desktop-app/node_modules/active-win/lib/linux.js:97:16)
xprop result:
_NET_WM_ICON_GEOMETRY(CARDINAL) = 5, 147, 54, 54
_BAMF_DESKTOP_FILE(STRING) = "/usr/share/applications/google-chrome.desktop"
_NET_FRAME_EXTENTS(CARDINAL) = 1, 1, 28, 1
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
_NET_WM_DESKTOP(CARDINAL) = 0
_NET_WM_STATE(ATOM) = _NET_WM_STATE_FOCUSED
_NET_WM_USER_TIME(CARDINAL) = 6098738
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified location: 100, 100
program specified minimum size: 1 by 1
WM_NAME(UTF8_STRING) = "devtools://devtools/bundled/js_app.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/@5f4eb224680e5d7dca88504586e9fd951840cac6/&dockSide=undocked"
_NET_WM_NAME(UTF8_STRING) = "devtools://devtools/bundled/js_app.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/@5f4eb224680e5d7dca88504586e9fd951840cac6/&dockSide=undocked"
XdndAware(ATOM) = BITMAP
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x1, 0x0, 0x0
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_STICK, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW
_NET_WM_ICON(CARDINAL) = Icon (128 x 128):
The exception occurs when trying to JSON.parse theresult['_NET_WM_NAME(UTF8_STRING)'] variable with following line inside, which is obviously truncated:
OS: Ubuntu 18.04
version: active-win@6.1.0
actual behavior:
the exception is caught and the promise returns
undefined
desired behavior
no exception thrown and the module returns correct window details
Exception stack trace
SyntaxError: Unexpected end of JSON input at JSON.parse () at parseLinux (/home/igorb/projects/trackabi-desktop-app/node_modules/active-win/lib/linux.js:48:15) at module.exports (/home/igorb/projects/trackabi-desktop-app/node_modules/active-win/lib/linux.js:97:16)xprop result:
_NET_WM_ICON_GEOMETRY(CARDINAL) = 5, 147, 54, 54 _BAMF_DESKTOP_FILE(STRING) = "/usr/share/applications/google-chrome.desktop" _NET_FRAME_EXTENTS(CARDINAL) = 1, 1, 28, 1 WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _NET_WM_DESKTOP(CARDINAL) = 0 _NET_WM_STATE(ATOM) = _NET_WM_STATE_FOCUSED _NET_WM_USER_TIME(CARDINAL) = 6098738 WM_NORMAL_HINTS(WM_SIZE_HINTS): program specified location: 100, 100 program specified minimum size: 1 by 1 WM_NAME(UTF8_STRING) = "devtools://devtools/bundled/js_app.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/@5f4eb224680e5d7dca88504586e9fd951840cac6/&dockSide=undocked" _NET_WM_NAME(UTF8_STRING) = "devtools://devtools/bundled/js_app.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/@5f4eb224680e5d7dca88504586e9fd951840cac6/&dockSide=undocked" XdndAware(ATOM) = BITMAP _MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x1, 0x0, 0x0 _NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_STICK, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW _NET_WM_ICON(CARDINAL) = Icon (128 x 128):_NET_WM_BYPASS_COMPOSITOR(CARDINAL) = 2
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 77594733, 77594734
WM_WINDOW_ROLE(STRING) = "pop-up"
WM_CLASS(STRING) = "google-chrome", "Google-chrome"
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_PID(CARDINAL) = 5441
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLIENT_MACHINE(STRING) = "igorb-notik"
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, _NET_WM_PING, _NET_WM_SYNC_REQUEST
The exception occurs when trying to JSON.parse the
result['_NET_WM_NAME(UTF8_STRING)']
variable with following line inside, which is obviously truncated:Meanwhile the original line is:
As seen above the line contains multiple
=
characters. However this case was not covered in theprocessOutput()
function:The text was updated successfully, but these errors were encountered: