ppresume / community

Discussions, feedbacks, roadmaps, community.
57 stars 3 forks source link

bug: PPResume failed to sign in on Safari 17 #59

Open xiaohanyu opened 2 months ago

xiaohanyu commented 2 months ago

Description

We just found that PPResume's /dashboard page would crash on the following User Agent:

UA OS OS Version Browser Browser Version
Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/125.0.6422.51 Mobile/15E148 Safari/604.1 iOS 17.4 Chrome 125.0.6422.51
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15 macOS 10.15.7 Safari 17.5
Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1 iOS 17.5 Mobile Safari 17.5
Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/125.0.6422.51 Mobile/15E148 Safari/604.1 iOS 17.5 Chrome 125.0.6422.51
Mozilla/5.0 (iPhone; CPU iPhone OS 16_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Mobile/15E148 Safari/604.1 iOS 16.1 Mobile Safari 16.1
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15 macOS 10.15.7 Safari 17.4.1
Mozilla/5.0 (iPhone; CPU iPhone OS 17_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/124.0.6367.111 Mobile/15E148 Safari/604.1 iOS 17.3 Chrome 124.0.6367.111
Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/124.0.6367.71 Mobile/15E148 Safari/604.1 iOS 17.4 Chrome 124.0.6367.71

The whole app would crash when user access /dashboard page, which lead to a null username as well when user first signs in.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Safari 17.5 on macOS sonoma 14.5
  2. Go to https://ppresume.com
  3. Try sign in

Actual Behavior

PPResume crashed showing Internal Server Error.

Expected Behavior

PPResume should show normal /dashboard page

[Optional] Screenshots

Desktop

https://github.com/ppresume/community/assets/1164623/d50bc61e-e9cf-42c0-8ef2-d7dc671a3285

Smartphone

NA

Additional Context

~Ah I don't have iOS 17 at the moment, need to download latest macOS and install it in a virtual machine and then may install Xcode to get the iOS 17 SDK.~

Credit to iamaryanyadav to let me know this for the first time.

xiaohanyu commented 2 months ago

It seems that the macOS 10.15.7 in User Agent is not real, check this post Why is macOS 11+ being incorrectly reported as version 10.15.7 in my Duo Operating System policy?

xiaohanyu commented 1 month ago

Did a basic check and it seems that this is a bug of Safari, check:

image
xiaohanyu commented 1 month ago

Spent about 3 days on this and I can basically confirm that this is a bug on Safari 17 (~not sure whether Safari 16 works though~).

Reported this issue to logto team: https://github.com/logto-io/logto/issues/6019.

I've created a dedicated repo just for reproducing this bug: https://github.com/xiaohanyu/logto-next-safari-demo, for helping logto team to debug.


Tested on iOS 16 (simulator), it can sign in successfully, so the bug only happens on Safari 17, evidence:

image