react-native icon indicating copy to clipboard operation
react-native copied to clipboard

iOS 17.x only SyntaxError: Invalid character: '\0'

Open MAKARD opened this issue 2 years ago • 8 comments

Description

Since iOS 17.x was released, our reporting system reports the crash SyntaxError: Invalid character: '\0'. The stack traces are different, so I gathered the most frequent:

at value(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/Pressability/Pressability.js:778:event)
at value(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/Pressability/Pressability.js:743:event)
at value(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/Pressability/Pressability.js:701:prevState)
at onResponderGrant(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/Pressability/Pressability.js:482:null)
at w(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:84:event)
at extractEvents(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:625:shouldSetEventType)
at Anonymous function(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1147:topLevelType)
at Pe(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:8457:a)
at Ce(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1106:fn)
at Le(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1137:batchedUpdates)
at receiveTouches(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1209:index$0)
at value(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:428:moduleMethods)
at Anonymous function(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:113:module)
at value(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:368:fn)
at value(/var/mobile/Containers/Data/Application/01518041-355A-40FC-8834-DD054A63E87E/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:112:__guard)
at value(/var/mobile/Containers/Data/Application/CDF015B5-699E-496F-9D2E-7573FB8FB5CC/Library/Application node_modules/react-native/Libraries/vendor/emitter/EventEmitter.js:113:registration)
at value(/var/mobile/Containers/Data/Application/CDF015B5-699E-496F-9D2E-7573FB8FB5CC/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:428:moduleMethods)
at Anonymous function(/var/mobile/Containers/Data/Application/CDF015B5-699E-496F-9D2E-7573FB8FB5CC/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:113:module)
at value(/var/mobile/Containers/Data/Application/CDF015B5-699E-496F-9D2E-7573FB8FB5CC/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:368:fn)
at value(/var/mobile/Containers/Data/Application/CDF015B5-699E-496F-9D2E-7573FB8FB5CC/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:112:__guard)
at mi(/var/mobile/Containers/Data/Application/329C2409-10F1-4F5F-9130-9B15051DC69E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7282:root)
at ci(/var/mobile/Containers/Data/Application/329C2409-10F1-4F5F-9130-9B15051DC69E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6975:root)
at pt(/var/mobile/Containers/Data/Application/329C2409-10F1-4F5F-9130-9B15051DC69E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:2145:callback)
at Pe(/var/mobile/Containers/Data/Application/329C2409-10F1-4F5F-9130-9B15051DC69E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:8462:flushSyncCallbacks)
at Ce(/var/mobile/Containers/Data/Application/329C2409-10F1-4F5F-9130-9B15051DC69E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1106:fn)
at Le(/var/mobile/Containers/Data/Application/329C2409-10F1-4F5F-9130-9B15051DC69E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1137:batchedUpdates)
at receiveTouches(/var/mobile/Containers/Data/Application/329C2409-10F1-4F5F-9130-9B15051DC69E/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1209:index$0)
at value(/var/mobile/Containers/Data/Application/329C2409-10F1-4F5F-9130-9B15051DC69E/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:428:moduleMethods)
at Anonymous function(/var/mobile/Containers/Data/Application/329C2409-10F1-4F5F-9130-9B15051DC69E/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:113:module)
at value(/var/mobile/Containers/Data/Application/329C2409-10F1-4F5F-9130-9B15051DC69E/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:368:fn)
at value(/var/mobile/Containers/Data/Application/329C2409-10F1-4F5F-9130-9B15051DC69E/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:112:__guard)
at Anonymous function(/var/mobile/Containers/Data/Application/CC9E820C-5699-4F6A-8857-E8DBBDD6D094/Library/Application node_modules/react-native/Libraries/Core/Timers/JSTimers.js:213:apply)
at k(/var/mobile/Containers/Data/Application/CC9E820C-5699-4F6A-8857-E8DBBDD6D094/Library/Application node_modules/react-native/Libraries/Core/Timers/JSTimers.js:111:callback)
at callTimers(/var/mobile/Containers/Data/Application/CC9E820C-5699-4F6A-8857-E8DBBDD6D094/Library/Application node_modules/react-native/Libraries/Core/Timers/JSTimers.js:359:timersToCall)
at value(/var/mobile/Containers/Data/Application/CC9E820C-5699-4F6A-8857-E8DBBDD6D094/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:428:moduleMethods)
at Anonymous function(/var/mobile/Containers/Data/Application/CC9E820C-5699-4F6A-8857-E8DBBDD6D094/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:113:module)
at value(/var/mobile/Containers/Data/Application/CC9E820C-5699-4F6A-8857-E8DBBDD6D094/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:368:fn)
at value(/var/mobile/Containers/Data/Application/CC9E820C-5699-4F6A-8857-E8DBBDD6D094/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:112:__guard)
at ba(/var/mobile/Containers/Data/Application/CB82D7EC-E8D0-42E8-91B9-7654E225C810/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6117:componentWillUnmount)
at va(/var/mobile/Containers/Data/Application/CB82D7EC-E8D0-42E8-91B9-7654E225C810/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6007:finishedRoot)
at ba(/var/mobile/Containers/Data/Application/CB82D7EC-E8D0-42E8-91B9-7654E225C810/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6122:finishedRoot)
at va(/var/mobile/Containers/Data/Application/CB82D7EC-E8D0-42E8-91B9-7654E225C810/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6007:finishedRoot)
at ba(/var/mobile/Containers/Data/Application/CB82D7EC-E8D0-42E8-91B9-7654E225C810/Library/Application node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6105:finishedRoot)
at value(/var/mobile/Containers/Data/Application/B735A0AB-115F-49A0-8C3C-C00A22462795/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:428:moduleMethods)
at Anonymous function(/var/mobile/Containers/Data/Application/B735A0AB-115F-49A0-8C3C-C00A22462795/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:113:module)
at value(/var/mobile/Containers/Data/Application/B735A0AB-115F-49A0-8C3C-C00A22462795/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:368:fn)
at value(/var/mobile/Containers/Data/Application/B735A0AB-115F-49A0-8C3C-C00A22462795/Library/Application node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:112:__guard)

React Native Version

0.72.4

Output of npx react-native info

System: OS: macOS 14.0 CPU: (10) arm64 Apple M1 Pro Memory: 1.18 GB / 32.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.5.0 path: /opt/homebrew/bin/node Yarn: version: 1.22.17 path: /opt/homebrew/bin/yarn npm: version: 9.8.0 path: /opt/homebrew/bin/npm Watchman: Not Found Managers: CocoaPods: version: 1.12.1 path: /Users/user/.rbenv/shims/pod SDKs: iOS SDK: Platforms: - DriverKit 23.0 - iOS 17.0 - macOS 14.0 - tvOS 17.0 - watchOS 10.0 Android SDK: API Levels: - "28" - "29" - "30" - "31" - "33" Build Tools: - 28.0.3 - 29.0.2 - 29.0.3 - 30.0.2 - 30.0.3 - 31.0.0 - 33.0.0 System Images: - android-28 | ARM 64 v8a - android-28 | Google APIs ARM 64 v8a - android-28 | Google ARM64-V8a Play ARM 64 v8a - android-29 | ARM 64 v8a - android-29 | Google APIs ARM 64 v8a - android-29 | Google Play ARM 64 v8a - android-30 | ARM 64 v8a - android-30 | Google APIs ARM 64 v8a - android-30 | Google Play ARM 64 v8a - android-31 | Google APIs ARM 64 v8a - android-31 | Google Play ARM 64 v8a - android-32 | Google APIs ARM 64 v8a - android-32 | Google Play ARM 64 v8a - android-33 | Google APIs ARM 64 v8a - android-34 | Google APIs ARM 64 v8a - android-34 | Google Play ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2022.3 AI-223.8836.35.2231.10671973 Xcode: version: 15.0/15A240d path: /usr/bin/xcodebuild Languages: Java: version: 15.0.2 path: /Users/user/.jenv/shims/javac Ruby: version: 3.1.2 path: /Users/user/.rbenv/shims/ruby npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.72.4 wanted: 0.72.4 react-native-macos: Not Found npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: false newArchEnabled: false iOS: hermesEnabled: false newArchEnabled: false

Steps to reproduce

There are no particular steps to reproduce. According to the reporting system, it happens on the app start or randomly within the user session. No specific user interactions were identified as the cause of the issue.

Snack, screenshot, or link to a repository

In this regard, I can only share the package.json:

{
	"name": "app",
	"version": "1.0.0",
	"private": true,
	"scripts": {
		"start": "APP_ENV=development npx react-native start"
	},
	"engines": {
		"node": "18.x.x"
	},
	"dependencies": {
		"@babel/core": "^7.22.10",
		"@babel/plugin-proposal-decorators": "^7.22.10",
		"@babel/runtime": "^7.22.10",
		"@bloomreach/react-sdk": "^22.0.2",
		"@bloomreach/spa-sdk": "^22.0.2",
		"@braze/react-native-sdk": "^6.0.2",
		"@contentsquare/react-native-bridge": "3.4.0",
		"@dynatrace/react-native-plugin": "^2.271.3",
		"@openspacelabs/react-native-zoomable-view": "^2.1.1",
		"@optimizely/react-sdk": "^2.9.2",
		"@react-native-async-storage/async-storage": "^1.19.2",
		"@react-native-clipboard/clipboard": "^1.11.2",
		"@react-native-community/datetimepicker": "^7.4.1",
		"@react-native-community/masked-view": "0.1.10",
		"@react-native-community/netinfo": "^9.4.1",
		"@react-native-cookies/cookies": "^6.2.1",
		"@react-native-firebase/analytics": "^18.3.0",
		"@react-native-firebase/app": "^18.3.0",
		"@react-native-firebase/dynamic-links": "^18.3.0",
		"@react-native-firebase/messaging": "^18.3.0",
		"@react-native-firebase/perf": "^18.3.0",
		"@react-native-firebase/remote-config": "^18.3.0",
		"@react-navigation/bottom-tabs": "^6.5.8",
		"@react-navigation/native": "^6.1.7",
		"@react-navigation/stack": "^6.3.17",
		"axios": "^1.4.0",
		"babel-plugin-add-react-displayname": "^0.0.5",
		"babel-plugin-module-resolver": "^5.0.0",
		"crypto": "^1.0.1",
		"html-entities": "^2.4.0",
		"i18next": "^23.4.4",
		"if-env": "^1.0.4",
		"metro-react-native-babel-preset": "0.77.0",
		"react": "18.2.0",
		"react-content-loader": "^6.2.1",
		"react-fast-compare": "^3.2.2",
		"react-i18next": "^13.1.2",
		"react-native": "0.72.4",
		"react-native-biometrics": "^3.0.1",
		"react-native-camera": "^4.2.1",
		"react-native-canvas": "^0.1.39",
		"react-native-circular-progress": "^1.3.9",
		"react-native-code-push": "^8.1.0",
		"react-native-device-info": "^10.8.0",
		"react-native-dotenv": "^3.4.9",
		"react-native-exit-app": "^2.0.0",
		"react-native-fast-image": "^8.6.3",
		"react-native-geolocation-service": "^5.3.1",
		"react-native-gesture-handler": "^2.12.1",
		"react-native-image-zoom-viewer": "^3.0.1",
		"react-native-inappbrowser-reborn": "^3.7.0",
		"react-native-keychain": "^8.1.2",
		"react-native-maps": "^1.7.1",
		"react-native-modal-datetime-picker": "^17.1.0",
		"react-native-permissions": "^3.9.2",
		"react-native-prompt-android": "^1.1.0",
		"react-native-rate": "^1.2.12",
		"react-native-ratings": "^8.1.0",
		"react-native-safe-area-context": "^4.7.1",
		"react-native-screens": "^3.24.0",
		"react-native-sha256": "^1.4.9",
		"react-native-snap-carousel": "^3.9.1",
		"react-native-splash-screen": "^3.3.0",
		"react-native-svg": "^13.12.0",
		"react-native-tracking-transparency": "^0.1.2",
		"react-native-url-polyfill": "^2.0.0",
		"react-native-uuid": "^2.0.1",
		"react-native-v8": "^2.2.2",
		"react-native-webview": "^13.3.1",
		"react-qr-code": "^2.0.12",
		"react-redux": "^8.1.2",
		"redux": "^4.2.1",
		"rn-android-keyboard-adjust": "^2.1.2",
		"tealium-react-native": "^2.3.1",
		"typescript": "^5.1.6",
		"urbanairship-react-native": "^14.7.0",
		"v8-android-jit-nointl": "^11.1000.4"
	},
	"devDependencies": {
		"@react-native-community/eslint-config": "^3.2.0",
		"@react-native/eslint-config": "^0.72.2",
		"@react-native/metro-config": "^0.72.11",
		"@testing-library/jest-native": "^5.4.2",
		"@testing-library/react-hooks": "^8.0.1",
		"@testing-library/react-native": "^12.2.2",
		"@tsconfig/react-native": "^3.0.2",
		"@types/jest": "^29.5.3",
		"@types/react": "^18.2.20",
		"@types/react-native": "^0.72.2",
		"@types/react-native-canvas": "^0.1.9",
		"@types/react-native-snap-carousel": "^3.8.5",
		"@types/react-test-renderer": "^18.0.0",
		"@types/redux-watch": "^1.1.0",
		"@typescript-eslint/eslint-plugin": "^6.4.1",
		"@typescript-eslint/parser": "^6.4.1",
		"@typescript-eslint/utils": "^6.4.1",
		"babel-jest": "29.6.3",
		"commitizen": "^4.3.0",
		"cspell": "^7.0.1",
		"cz-format-extension": "^1.5.1",
		"eslint": "^8.47.0",
		"eslint-config-airbnb-typescript": "17.1.0",
		"eslint-import-resolver-typescript": "^3.6.0",
		"eslint-plugin-import": "2.28.1",
		"eslint-plugin-jest": "^27.2.3",
		"eslint-plugin-jsx-a11y": "6.7.1",
		"eslint-plugin-react": "^7.33.2",
		"eslint-plugin-react-hooks": "4.6.0",
		"husky": "^8.0.3",
		"jest": "29.6.3",
		"jest-fail-on-console": "^3.1.1",
		"jest-junit": "^16.0.0",
		"jest-transform-stub": "^2.0.0",
		"npm-check-updates": "^16.12.3",
		"react-test-renderer": "18.2.0",
		"release-it": "^16.1.5"
	},
	"resolutions": {
		"nanoid": "^3.3.2",
		"node-fetch": "^2.6.7",
		"json-schema": "^0.4.0",
		"simple-plist": "^1.3.1",
		"shell-quote": "^1.7.3",
		"formidable": "^3.2.4",
		"prompts": "^2.4.2",
		"minimist": "^1.2.6",
		"set-value": "^4.1.0"
	},
	"config": {
		"commitizen": {
			"path": "cz-format-extension"
		}
	}
}

MAKARD avatar Oct 31 '23 09:10 MAKARD

:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

github-actions[bot] avatar Oct 31 '23 09:10 github-actions[bot]

:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - 0.72.6. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

github-actions[bot] avatar Oct 31 '23 09:10 github-actions[bot]

I have encountered the same issue, and it seems to be at the communication layer(C++).

GeoffZhu avatar Nov 03 '23 02:11 GeoffZhu

Found a similar report on Apple forum https://developer.apple.com/forums/thread/739234?login=true&page=1#772141022

MAKARD avatar Nov 15 '23 09:11 MAKARD

It must be a problem caused by iOS 17 upgrade.

Jorgezz avatar Nov 28 '23 08:11 Jorgezz

Same issue here, still happens with RN 0.72.X and iOS 17.3.X

Lakston avatar Feb 27 '24 07:02 Lakston

I'm getting this as well. Any updates here?

BrandonCao avatar Feb 27 '24 18:02 BrandonCao

wait for fix

WaSheepM avatar May 07 '24 07:05 WaSheepM

Im noticing this error increase within the 17.5.X OS and 17.6.1. Does anyone have anymore insight on this? My RN version is 0.70.15.

BrandonCao avatar Aug 20 '24 14:08 BrandonCao