-
Notifications
You must be signed in to change notification settings - Fork 470
Switching back to webview - An unknown server-side error occurred - Original error: Unexpected token c in JSON at position 247 #259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm getting similar behavior but not the same error. iOS 11.3, Appium 1.8.1, IWDP 1.8. I can't get into a webview at all.
|
please checkout master branch
|
brew reinstall --HEAD ios-webkit-debug-proxy doesn't work. I also tried updating Appium to latest version 1.8.1, but no success. |
hi @mailsumit86, can you confirm you're seeing same issue the OP posted above?
|
Below is the log trace from appium : [Appium] Capabilities: The safari opens up and go to appium.io, but then just crashes. |
are you using appium 1.8.1? there was a bug #258 (comment) appium/appium#10741 |
from the log I can't see any erroneous output from IWDP, anyways it doesn't seem to be related to original issue, feel free to open a new issue providing more details on the issue, it could be related to appium eco-system |
closing the issue since JSON parsing part was fixed in 2f08a1c. |
Description
I am getting an issue on iOS device when I switched to NATIVE view and try to back into Webview.
Environment
Details
AppiumDriver().getContextHandles();
APPIUM LOGs:
[HTTP] <-- GET /wd/hub/session/2b68dc2a-59d8-4925-bdd7-89d0ff51e90d/screenshot 200 2068 ms - 2024946
[HTTP]
[HTTP] --> GET /wd/hub/session/2b68dc2a-59d8-4925-bdd7-89d0ff51e90d/context
[HTTP] {}
[debug] [MJSONWP] Calling AppiumDriver.getCurrentContext() with args: ["2b68dc2a-59d8-4925-bdd7-89d0ff51e90d"]
[debug] [XCUITest] Executing command 'getCurrentContext'
[debug] [MJSONWP] Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
[HTTP] <-- GET /wd/hub/session/2b68dc2a-59d8-4925-bdd7-89d0ff51e90d/context 200 2 ms - 84
[HTTP]
[HTTP] --> GET /wd/hub/session/2b68dc2a-59d8-4925-bdd7-89d0ff51e90d/contexts
[HTTP] {}
[debug] [MJSONWP] Calling AppiumDriver.getContexts() with args: ["2b68dc2a-59d8-4925-bdd7-89d0ff51e90d"]
[debug] [XCUITest] Executing command 'getContexts'
[debug] [iOS] Getting list of available contexts
[debug] [iOS] Retrieving contexts and views
[debug] [iOS] Selecting by url: false
[debug] [RemoteDebugger] Getting WebKitRemoteDebugger pageArray: localhost, 27753
[debug] [RemoteDebugger] Sending request to: http://localhost:27753/json
[MJSONWP] Encountered internal error running command: SyntaxError: Unexpected token c in JSON at position 247
[MJSONWP] at JSON.parse ()
[MJSONWP] at WebKitRemoteDebugger.getJsonFromUrl$ (/usr/local/lib/node_modules/appium/node_modules/appium-remote-debugger/lib/webkit-remote-debugger.js:85:22)
[MJSONWP] at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[MJSONWP] at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[MJSONWP] at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[MJSONWP] at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[MJSONWP] at
[HTTP] <-- GET /wd/hub/session/2b68dc2a-59d8-4925-bdd7-89d0ff51e90d/contexts 500 7 ms - 213
Java Client Error
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Unexpected token c in JSON at position 247 (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 16 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'COMPUTER000117', ip: '192.168.133.60', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_91'
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities [{app=/Users/admin/Desktop/IPA/TouchClassic_5.0.1.app, networkConnectionEnabled=false, databaseEnabled=false, deviceName=ipad, fullReset=true, platform=MAC, showXcodeLog=true, newCommandTimeout=300, platformVersion=10.3.1, webStorageEnabled=false, locationContextEnabled=false, automationName=XCUITest, browserName=, takesScreenshot=true, javascriptEnabled=true, platformName=iOS, udid=d8a8f24c27769d00627929f291b15eb015e9e8c4, autoAcceptAlerts=true}]
Session ID: 2b68dc2a-59d8-4925-bdd7-89d0ff51e90d
Requesting JSON url
I'm getting below JSON while hitting http://localhost:27753/json URL.
Error
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Unexpected token l in JSON at position 223 (WARNING: The server did not provide any stacktrace information)
The text was updated successfully, but these errors were encountered: