PlayCover / PlayCover

Community fork of PlayCover
GNU General Public License v3.0
8.45k stars 768 forks source link

[App Support]: Official ChatGPT app by OpenAI #1079

Open zqidev opened 1 year ago

zqidev commented 1 year ago

App Store link

https://apps.apple.com/us/app/chatgpt/id6448311069

Current issues

More details

Cannot login, even using PlayChain. App only supports safari/browser login, no in-app login.

Crash log

Sign in failed:
Something went wrong. Please make sure your device's date and time are set properly. Check that your internet connection is stable, then restart the app and try again. (code:FC067AD6-23C1-4C0D-A6B3-6F057BD282FE,API.API.DeviceCheckError,0)

Issue Language

ohaiibuzzle commented 1 year ago

@ZhenhaoQi Literally couldn't debug it until I patch debug detection. It will default to hanging the app if that is detected

zqidev commented 1 year ago

I actually managed to fix it by using the steps listed in the docs and a combination of PlayChain. (Fixed as in persistent after SIP enabled) Am using macOS Sonoma with PlayCover 3.0.0 Beta

  1. Follow the instructions here
  2. After booting with NVRAM arguments set and SIP off, you'll actually find that the client is already logged in if you tried to login previously and got an error... I'm actually not sure how it was logged in but whatever
  3. Launch without PlayTools first, and then launch with PlayTools (and PlayChain)
  4. Uninstall PlayTools after verifying that you were logged in with PlayChain
  5. Set NVRAM boot-args to "", and re-enable SIP
  6. Launch the ChatGPT app again, and you'll realize it is no longer logged in, so you reinstall PlayTools with PlayChain again and you're automatically logged in.
  7. Enjoy!

I am not sure why any of these steps work, or if there was anything else that contributed to my results. I am simply listing the steps I took to reproduce this behavior. Perhaps this would've worked without PlayChain on a non-beta version, or this just worked by fluke.

Also, the scaling is really ugly, as there is a super big top bar with unused black space which you cannot get rid of, and the font is way smaller than it would be on an iOS device. Still better than any other ChatGPT client I've tried for macOS though!

CleanShot 2023-09-10 at 02 00 35@2x

ohaiibuzzle commented 1 year ago

@ZhenhaoQi Ha, that is interesting That seems very likely to me as an issue with getting a device token generated during an initial login (subsequent logins succeeds because that exists serverside).

zqidev commented 1 year ago

Would there be any solution to that? It seems as if I have been logged out again (presumably server-side), as now the ChatGPT client simply says Email Missing and any requests fail. This would probably be fixed after redoing all the steps I mentioned previously, but it's just too much of a hassle to be worth it.

ohaiibuzzle commented 1 year ago

Well, it makes total sense, that device id might have been necessary to refresh the temporary token (web auth uses a static secret that is used to derive a token with limited life time)

iGerman00 commented 11 months ago

After doing some minor digging, PreauthDeviceCheckFlag and in turn DeviceCheckError are only mentioned once in the binary. I do not have access to a jailbroken iOS 16 device to run and investigate the app, but I could possibly try making a simple dylib to override that supposed flag. My guess is that it triggers a device mismatch and I need to "spoof" that it's an iPhone, or simply override that flag to @"NO".

ohaiibuzzle commented 11 months ago

After doing some minor digging, PreauthDeviceCheckFlag and in turn DeviceCheckError are only mentioned once in the binary. I do not have access to a jailbroken iOS 16 device to run and investigate the app, but I could possibly try making a simple dylib to override that supposed flag. My guess is that it triggers a device mismatch and I need to "spoof" that it's an iPhone, or simply override that flag to @"NO".

If you know the symbols you can modify it in PlayTools. PlayShadow.x have a few example masks like that you can apply if you know the class and method name

singhalrishi27 commented 11 months ago

Any Progress:)

clin366 commented 11 months ago

Thx, any progress?