I faced with the same issue. Each error has a different stack trace but the same name SyntaxError: Invalid character: '\0'.
I use React-Native, so I raised the issue there https://github.com/facebook/react-native/issues/41258. But since it's iOS 17 issue only, I suppose something has changed in iOS rather than in React-Native.