RemoteDebug/remotedebug-ios-webkit-adapter

Error: Unexpected end of JSON input

tgudroe opened this issue ยท 9 comments

After following instructions in readme and executing remotedebug_ios_webkit_adapter --port=9000 in windows powershell I get the following error:
SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at Request._callback (C:\Users...\AppData\Roaming\npm\node_modules\remotedebug-ios-webkit-adapter\out\adapters\iosAdapter.js:45:38)
at Request.self.callback (C:\Users...\AppData\Roaming\npm\node_modules\remotedebug-ios-webkit-adapter\node_modules\request\request.js:185:22)
at Request.emit (events.js:210:5)
at Request. (C:\Users...\AppData\Roaming\npm\node_modules\remotedebug-ios-webkit-adapter\node_modules\request\request.js:1161:10)
at Request.emit (events.js:210:5)
at IncomingMessage. (C:\Users...\AppData\Roaming\npm\node_modules\remotedebug-ios-webkit-adapter\node_modules\request\request.js:1083:12)
at Object.onceWrapper (events.js:299:28)
at IncomingMessage.emit (events.js:215:7)
at endReadableNT (_stream_readable.js:1184:12)
PS C:\remodedebugadapter-ios>

Any word on this? Here are some more details

PS C:\Users\Chris> scoop bucket add extras
WARN  The 'extras' bucket already exists. Use 'scoop bucket rm extras' to remove it.
PS C:\Users\Chris> scoop install ios-webkit-debug-proxy
WARN  'ios-webkit-debug-proxy' (1.8.6) is already installed.
Use 'scoop update ios-webkit-debug-proxy' to install a new version.
PS C:\Users\Chris> scoop list
Installed apps:

  7zip 19.00
  git 2.26.0.windows.1
  ios-webkit-debug-proxy 1.8.6 [extras]
  nodejs 13.12.0

PS C:\Users\Chris> node -v
v13.12.0
PS C:\Users\Chris> npm -v
6.14.4
PS C:\Users\Chris> npm install remotedebug-ios-webkit-adapter -g
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
C:\Users\Chris\scoop\persist\nodejs\bin\remotedebug_ios_webkit_adapter -> C:\Users\Chris\scoop\persist\nodejs\bin\node_modules\remotedebug-ios-webkit-adapter\out\index.js
+ remotedebug-ios-webkit-adapter@0.4.2
updated 1 package in 4.084s
PS C:\Users\Chris> remotedebug_ios_webkit_adapter --port=9000
undefined:1



SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Request._callback (C:\Users\Chris\scoop\persist\nodejs\bin\node_modules\remotedebug-ios-webkit-adapter\out\adapters\iosAdapter.js:44:38)
    at Request.self.callback (C:\Users\Chris\scoop\persist\nodejs\bin\node_modules\remotedebug-ios-webkit-adapter\node_modules\request\request.js:185:22)
    at Request.emit (events.js:315:20)
    at Request.<anonymous> (C:\Users\Chris\scoop\persist\nodejs\bin\node_modules\remotedebug-ios-webkit-adapter\node_modules\request\request.js:1154:10)
    at Request.emit (events.js:315:20)
    at IncomingMessage.<anonymous> (C:\Users\Chris\scoop\persist\nodejs\bin\node_modules\remotedebug-ios-webkit-adapter\node_modules\request\request.js:1076:12)
    at Object.onceWrapper (events.js:421:28)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1201:12)
PS C:\Users\Chris>

Same here, any news?

Same here, any news?

Same issue

Had the same issue. Once I switched to port 9222, it worked fine

remotedebug_ios_webkit_adapter --port=9222

@RealDyllon Oh, you saved my day, thanks a lot!

This CLI will listen to two ports, one is the port you specified, which is 9000 in this case. And another port is the port you specified +100, which will be 9100. But unfortunately, in my computer, the LGHub software used this port. Therefore, the CLI tool always get a wrong response and then crash.

Same issue when trying to start without giving a port that tries to start with port 9000. Startng with
remotedebug_ios_webkit_adapter --port=9222
Starts and you can list your webpages, but then you end up in next problems where you just see a blank page:
#181
#180

This project is now super-seeded by https://inspect.dev/ โ€“ a new developer tool for macOS and Windows to inspect and debug your web apps and websites in Safari and WebViews on iOS devices.

RemoteDebug iOS WebKit Adapter is not proactively maintained or extended.