chaitin / passionfruit

[WIP] Crappy iOS app analyzer
MIT License
1.66k stars 228 forks source link

Document must begin with an element (e.g. <book>) #71

Closed 0xceb1d closed 4 years ago

0xceb1d commented 4 years ago

Error following npm install -g passionfruit launched with npx passionfruit

Node version v12.16.1 npm version v6.13.4

Listening on http://localhost:31337
  <-- GET /apps/df368996cad76ab8b2e09807cc6ffbf5848c5879
  --> GET /apps/df368996cad76ab8b2e09807cc6ffbf5848c5879 200 6ms 338b
  <-- GET /static/build.js
  --> GET /static/build.js 200 6ms 865.29kb
  <-- GET /static/0.build.js
  --> GET /static/0.build.js 200 1ms 55.2kb
  <-- GET /static/logo.svg?abda96cf81a18b28052a52d16b35d4e1
  --> GET /static/logo.svg?abda96cf81a18b28052a52d16b35d4e1 200 1ms 16.33kb
  <-- GET /static/MaterialIcons-Regular.woff2?570eb83859dc23dd0eec423a49e147fe
  --> GET /static/MaterialIcons-Regular.woff2?570eb83859dc23dd0eec423a49e147fe 200 1ms 43.26kb
  <-- GET /static/icon.svg
  --> GET /static/icon.svg 200 1ms 6.44kb

  InternalServerError: Unexpected response: Error on line 1 char 1: Document must begin with an element (e.g. <book>)
      at Object.throw (/usr/local/lib/node_modules/passionfruit/node_modules/koa/lib/context.js:97:11)
      at /usr/local/lib/node_modules/passionfruit/app.js:74:21
ChiChou commented 4 years ago

This is so weird...Thanks for reporting this!

ChiChou commented 4 years ago

Looks like something related to frida https://github.com/AloneMonkey/frida-ios-dump/issues/89

thepoppingone commented 4 years ago

Anyone has any idea why is this occuring and how to to fix this? I am facing the same issue with Frida 12.8.7 for Passionfruit

ChiChou commented 4 years ago

I suspect that it may come from this:

https://github.com/frida/frida-core/blob/ec0e0f9c36e5e77b890ab1489fc9f7f16c1a334e/src/fruity/plist-service.vala#L85

But I don't have an environment to reproduce or debug this

ChiChou commented 4 years ago

@Oliverr @thepoppingone

Try these steps to see if it still occurs?

  1. install libimobiledevices
  2. Find the right Developer Disk Image for your device: /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
  3. Mount the DDI with `ideviceimagemounter XXXX.dmg"
ChiChou commented 4 years ago

Should be fixed here

https://github.com/frida/frida-core/commit/b495e77a1d8bd8e24d37a3fbfbce8c6ebfbaa060#diff-b4c3f6985e35a27941656d34235fc6cf