Bug 281369

Summary: REGRESSION (iOS 17): Random SyntaxError: Invalid character: '\0'
Product: WebKit Reporter: chyizheng <chyizheng>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: 2453347403, ap, jarred, mark.lam, maryam.alkrm, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Safari 17   
Hardware: Unspecified   
OS: iOS 17   

chyizheng
Reported 2024-10-12 00:06:39 PDT
https://forums.developer.apple.com/forums/thread/739234 https://github.com/facebook/react-native/issues/41258 Since the release of iOS 17 and continuing with iOS 18, we have been encountering error reports with the message `SyntaxError: Invalid character: '\0'`. This error is not limited to React Native, and the stack trace appears to be completely random and nonsensical. We failed to find a way to reproduce this error, it just happends occasionally. All we know is that it only related to JavaScriptCore on iOS 17 and above. Is there any way we can fix this issue? Looking forward to your reply.
Attachments
Alexey Proskuryakov
Comment 1 2024-10-15 10:54:22 PDT
Thank you for the report. This seems unlikely to be actionable without any steps to reproduce.
Radar WebKit Bug Importer
Comment 2 2024-10-15 10:56:02 PDT
Mark Lam
Comment 3 2024-10-16 15:22:42 PDT
chyizheng, do you have a reproduction test case demonstrating the issue. Also, though the stack trace is random and non-sensical, sharing it may or may not shed some light too. Right now, we have absolutely no info on this.
Jarred Sumner
Comment 4 2024-10-16 21:36:22 PDT
We received a similar-sounding report in Bun awhile ago and also didn't have a way to reproduce it https://github.com/oven-sh/bun/issues/8763
chyizheng
Comment 5 2024-10-17 02:36:06 PDT
(In reply to Mark Lam from comment #3) > chyizheng, do you have a reproduction test case demonstrating the issue. > > Also, though the stack trace is random and non-sensical, sharing it may or > may not shed some light too. Right now, we have absolutely no info on this. I'm very sorry that i cannot provide more info on this, but we really couldn't find a way to reproduce. Here's all the info we got: 1. It's only related to JavaScriptCore on iOS 17 and above. 2. It's not related to sepecific framework or application. 3. Once the error is triggered, it will keep occurring until the application is restarted. 4. The error stack is different each time it occurs. 5. The first line of the error stack is `[native code]` even if the actual stack is a javascript function. Here is some error stack samples: ``` Invalid character: '\0' all@[native code] webpack://__appServiceSDK__/src/appservice/network/tasks/NetworkTask.js:609:18 608 | > 609 | Promise.all([requestDataLengthPromise, responseDataLengthPromise]).then( | ^ 610 | ([requestDataLength, responseDataLength]) => { tTask.call(task, { ``` ``` Invalid character: '\0' ho@[native code] newChildren@webpack://__virtualDOM__/src/tmpl/list_diff.js:205:39 204 | if (node === null) { > 205 | node = virtualTreeToExparserNode(newChildren[index], null, exparserNode.ownerShadowRoot, tm, false) | ^ 206 | } ``` ``` Invalid character: '\0' pd@[native code] webpack://__appServiceSDK__/src/appservice/device/network.js:53:15 52 | const _getNetworkType = args => { > 53 | invokeMethod('getNetworkType', args, { | ^ 54 | beforeAll(res) { ```
Mark Lam
Comment 6 2024-12-03 05:34:00 PST
chyizheng, are you still able to reproduce this issue on iOS 18.1 or the latest iOS 18.2 beta? Thanks.
2453347403
Comment 7 2024-12-04 19:33:29 PST
(In reply to Mark Lam from comment #6) > chyizheng, are you still able to reproduce this issue on iOS 18.1 or the > latest iOS 18.2 beta? Thanks. iOS 18.1.1 still has this bug.
chyizheng
Comment 8 2024-12-05 00:08:37 PST
(In reply to Mark Lam from comment #6) > chyizheng, are you still able to reproduce this issue on iOS 18.1 or the > latest iOS 18.2 beta? Thanks. I still cannot find a way to reproduce this issue, all the error messages and error stacks were remotely collected from user logs on their own devices. I am still seeing reports of this issue on iOS 18.1.1 and iOS 18.2.
maryam.alkrm
Comment 9 2025-02-26 05:50:25 PST
The issue is still persistent on iOS 18.3.
Note You need to log in before you can comment on or make changes to this bug.