Android Screen shot error: TypeError: invalid media type

We are running appium 1.2 and java client 1.6. We are running our java tests locally and executing our tests on real devices hosted on appthwack. Appium server is hosted via appthwack, Current device is moto x on 4.4.2. We are using selendroid as well.

When we try and take a screen shot we are getting the below error. This happens for random screenshots on different executions.

We get random bad gateway errors due to running on a remote device that is not close to our java code.

Has anyone see this before? How do I see the response that is coming back from appium? Is there any way to catch this error and just continue?


From logs…

2014-09-24 16:34:06:470 - error: Unexpected error: TypeError: invalid media type
at splitType (/opt/dev/appium/node_modules/express/node_modules/media-typer/index.js:240:11)
at Object.parse (/opt/dev/appium/node_modules/express/node_modules/media-typer/index.js:160:13)
at exports.setCharset (/opt/dev/appium/node_modules/express/lib/utils.js:247:22)
at ServerResponse.res.send (/opt/dev/appium/node_modules/express/lib/response.js:133:32)
at /opt/dev/appium/lib/server/proxy.js:81:11
at safely (/opt/dev/appium/lib/server/helpers.js:286:5)
at /opt/dev/appium/lib/server/proxy.js:78:5
at Request._callback (/opt/dev/appium/lib/devices/common.js:116:5)
at Request.self.callback (/opt/dev/appium/node_modules/request/request.js:121:22)
at Request.emit (events.js:98:17) context: [GET /wd/hub/session/dba9f309-80a7-50f6-7806-02318fdb321c/screenshot {}]
2014-09-24 16:35:06:447 - info: Shutting down appium session

1 Like

Have you read the AppThwack thread? The bug is probably specific to their setup.