“Error: No platform selected” on sentry-wizard with React Native and Expo bare project

I am trying to get Sentry working for my React Native Expo project (Expo SDK 41, React Native 0.63). I have done an expo eject and am now working in a bare workflow project. I am getting an error at the sentry-wizard step (see below), following instructions here: Using Sentry - Expo Documentation
I have also posted this on the Expo forums but did not get much help there. Anyone have any ideas what might be going on or where to look?

Here are the commands I ran:

$ expo install sentry-expo
...completes successfully...
$ npm install @sentry/react-native
...completes successfully...
$ npx sentry-wizard -i reactNative -p ios android
Running Sentry Wizard...
version: 1.2.6 | sentry-cli version: 1.64.1
Sentry Wizard will help you to configure your project
Thank you for using Sentry :)


Please open
https://sentry.io/account/settings/wizard/[...abc123...]/
in your browser (if it's not open already)


✅ Patched build.gradle file.
Error: No platform selected
    at ReactNative.MobileProject.getPlatforms (/[path]/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/MobileProject.js:65:19)
    at ReactNative._patchJs (/[path]/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/ReactNative.js:224:14)
    at /[path]/node_modules/@sentry/wizard/dist/lib/Helper/File.js:28:45
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
✅ Patched build script in Xcode project.
Error: No platform selected
    at ReactNative.MobileProject.getPlatforms (/[path]/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/MobileProject.js:65:19)
    at ReactNative._patchJs (/[path]/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/ReactNative.js:224:14)
    at /[path]/node_modules/@sentry/wizard/dist/lib/Helper/File.js:28:45
    at processTicksAndRejections (node:internal/process/task_queues:94:5)

🎉  Successfully set up Sentry for your project 🎉

The browser log in for Sentry is successful during that command, but no extra Sentry.init() is added to App.js. Trying to continue on with npx pod-install and npm run ios results in a build error which I assume is from the sentry-wizard not actually having worked successfully:

error: An organization slug is required (provide with --org)

Here is my sentry code in App.js

Sentry.init({
  dsn: 'https://[...URL...]',
  enableInExpoDevelopment: false,
  debug: true
});

and my app.json

{
  "expo": {
    ...
    "hooks": {
      "postPublish": [
        {
          "file": "sentry-expo/upload-sourcemaps",
          "config": {
            "organization": "[myorg]",
            "project": "[myproject]",
            "authToken": "[mytoken]"
          }
        }
      ]
    }
  }
}

In case it helps, here is the output of sentry-wizard with the --debug flag:

$ npx sentry-wizard -i reactNative -p ios android --debug
{
	"_": [],
	"debug": true,
	"uninstall": false,
	"skip-connect": false,
	"skipConnect": false,
	"quiet": false,
	"i": "reactNative",
	"integration": "reactNative",
	"p": [
		"ios",
		"android"
	],
	"platform": [
		"ios",
		"android"
	],
	"u": "https://sentry.io/",
	"url": "https://sentry.io/",
	"$0": "[path]/node_modules/.bin/sentry-wizard"
}
Running Sentry Wizard...
version: 1.2.6 | sentry-cli version: 1.64.1
Sentry Wizard will help you to configure your project
Thank you for using Sentry :)

ios/sentry.properties not exists


android/sentry.properties not exists


ios/sentry.properties not exists


android/sentry.properties not exists

/
Loading wizard for https://sentry.io/



Please open
https://sentry.io/account/settings/wizard/[hash]/
in your browser (if it's not open already)


ios/sentry.properties not exists


android/sentry.properties not exists


{
	"integration": {
		"_argv": {
			"_": [],
			"debug": true,
			"uninstall": false,
			"skip-connect": false,
			"skipConnect": false,
			"quiet": false,
			"i": "reactNative",
			"integration": "reactNative",
			"p": [
				"ios",
				"android"
			],
			"platform": [
				"ios",
				"android"
			],
			"u": "https://sentry.io/",
			"url": "https://sentry.io/",
			"$0": "[path]/node_modules/.bin/sentry-wizard"
		},
		"_isDebug": true,
		"_sentryCli": {
			"_argv": {
				"_": [],
				"debug": true,
				"uninstall": false,
				"skip-connect": false,
				"skipConnect": false,
				"quiet": false,
				"i": "reactNative",
				"integration": "reactNative",
				"p": [
					"ios",
					"android"
				],
				"platform": [
					"ios",
					"android"
				],
				"u": "https://sentry.io/",
				"url": "https://sentry.io/",
				"$0": "[path]/node_modules/.bin/sentry-wizard"
			}
		},
		"_platforms": [
			"ios",
			"android"
		]
	},
	"shouldConfigurePlatforms": {
		"ios": true,
		"android": true
	},
	"hash": "[hash]"
}

/
Polling: https://sentry.io/api/0/wizard/[hash]/

/ Waiting for Sentry...
Polling received data


Polling received:


Error: Received status 400
    at WaitForSentry.<anonymous> ([path]/node_modules/@sentry/wizard/dist/lib/Steps/WaitForSentry.js:95:63)
    at step ([path]/node_modules/@sentry/wizard/dist/lib/Steps/WaitForSentry.js:46:23)
    at Object.next ([path]/node_modules/@sentry/wizard/dist/lib/Steps/WaitForSentry.js:27:53)
    at fulfilled ([path]/node_modules/@sentry/wizard/dist/lib/Steps/WaitForSentry.js:18:58)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)

\ Waiting for Sentry...
Polling: https://sentry.io/api/0/wizard/[hash]/

- Waiting for Sentry...
Polling received data



Polling Success!


{
	"integration": {
		"_argv": {
			"_": [],
			"debug": true,
			"uninstall": false,
			"skip-connect": false,
			"skipConnect": false,
			"quiet": false,
			"i": "reactNative",
			"integration": "reactNative",
			"p": [
				"ios",
				"android"
			],
			"platform": [
				"ios",
				"android"
			],
			"u": "https://sentry.io/",
			"url": "https://sentry.io/",
			"$0": "[path]/node_modules/.bin/sentry-wizard"
		},
		"_isDebug": true,
		"_sentryCli": {
			"_argv": {
				"_": [],
				"debug": true,
				"uninstall": false,
				"skip-connect": false,
				"skipConnect": false,
				"quiet": false,
				"i": "reactNative",
				"integration": "reactNative",
				"p": [
					"ios",
					"android"
				],
				"platform": [
					"ios",
					"android"
				],
				"u": "https://sentry.io/",
				"url": "https://sentry.io/",
				"$0": "[path]/node_modules/.bin/sentry-wizard"
			}
		},
		"_platforms": [
			"ios",
			"android"
		]
	},
	"shouldConfigurePlatforms": {
		"ios": true,
		"android": true
	},
	"hash": "[hash]",
	"wizard": {
		"apiKeys": {
			"id": "[id]",
			"scopes": [
				"event:admin",
				"event:read",
				"member:read",
				"org:read",
				"project:read",
				"project:releases",
				"team:read",
				"project:write"
			],
			"application": null,
			"expiresAt": null,
			"dateCreated": "2019-10-23T14:06:30.526972Z",
			"state": null,
			"token": "[token]",
			"refreshToken": null
		},
		"projects": [
			{
				"id": "[projectId]",
				"slug": "[slug]",
				"name": "[name]",
				"isPublic": false,
				"isBookmarked": false,
				"color": "#78bf3f",
				"dateCreated": "2019-10-23T13:29:37.454616Z",
				"firstEvent": "2019-10-23T23:21:10.866000Z",
				"firstTransactionEvent": false,
				"features": [
					"alert-filters",
					"issue-alerts-targeting",
					"minidump",
					"race-free-group-creation",
					"similarity-indexing",
					"similarity-view",
					"releases"
				],
				"status": "active",
				"platform": "react-native",
				"isInternal": false,
				"isMember": false,
				"hasAccess": true,
				"avatar": {
					"avatarType": "letter_avatar",
					"avatarUuid": null
				},
				"organization": {
					"id": "[organizationId]",
					"slug": "[name]",
					"status": {
						"id": "active",
						"name": "active"
					},
					"name": "[name]",
					"dateCreated": "2019-10-23T13:28:38.751640Z",
					"isEarlyAdopter": false,
					"require2FA": false,
					"avatar": {
						"avatarType": "letter_avatar",
						"avatarUuid": null
					},
					"features": [
						"team-alerts-ownership",
						"performance-vitals-overview",
						"performance-view",
						"images-loaded-v2",
						"custom-event-title",
						"invite-members-rate-limits",
						"alert-details-redesign",
						"integrations-stacktrace-link",
						"unhandled-issue-flag",
						"symbol-sources",
						"performance-landing-v2",
						"advanced-search",
						"slack-migration",
						"am1-billing",
						"inbox",
						"alert-wizard",
						"org-subdomains",
						"trace-view-summary",
						"open-membership",
						"usage-stats-graph",
						"event-attachments-viewer",
						"shared-issues",
						"event-attachments"
					]
				},
				"keys": [
					{
						"id": "[keyId]",
						"name": "Default",
						"label": "Default",
						"public": "[keyId]",
						"secret": "[secret]",
						"projectId": [projectId],
						"isActive": true,
						"rateLimit": null,
						"dsn": {
							"secret": "https://[keyId]:[secret]@o123456.ingest.sentry.io/[projectId]",
							"public": "https://[keyId]@o123456.ingest.sentry.io/[projectId]",
							"csp": "https://o123456.ingest.sentry.io/api/[projectId]/csp-report/?sentry_key=[keyId]",
							"security": "https://o123456.ingest.sentry.io/api/[projectId]/security/?sentry_key=[keyId]",
							"minidump": "https://o123456.ingest.sentry.io/api/[projectId]/minidump/?sentry_key=[keyId]",
							"unreal": "https://o123456.ingest.sentry.io/api/[projectId]/unreal/[keyId]/",
							"cdn": "https://js.sentry-cdn.com/[keyId].min.js"
						},
						"browserSdkVersion": "5.x",
						"browserSdk": {
							"choices": [
								[
									"latest",
									"latest"
								],
								[
									"6.x",
									"6.x"
								],
								[
									"5.x",
									"5.x"
								],
								[
									"4.x",
									"4.x"
								]
							]
						},
						"dateCreated": "2019-10-23T13:29:37.463474Z"
					}
				]
			}
		]
	}
}


{
	"integration": {
		"_argv": {
			"_": [],
			"debug": true,
			"uninstall": false,
			"skip-connect": false,
			"skipConnect": false,
			"quiet": false,
			"i": "reactNative",
			"integration": "reactNative",
			"p": [
				"ios",
				"android"
			],
			"platform": [
				"ios",
				"android"
			],
			"u": "https://sentry.io/",
			"url": "https://sentry.io/",
			"$0": "[path]/node_modules/.bin/sentry-wizard"
		},
		"_isDebug": true,
		"_sentryCli": {
			"_argv": {
				"_": [],
				"debug": true,
				"uninstall": false,
				"skip-connect": false,
				"skipConnect": false,
				"quiet": false,
				"i": "reactNative",
				"integration": "reactNative",
				"p": [
					"ios",
					"android"
				],
				"platform": [
					"ios",
					"android"
				],
				"u": "https://sentry.io/",
				"url": "https://sentry.io/",
				"$0": "[path]/node_modules/.bin/sentry-wizard"
			}
		},
		"_platforms": [
			"ios",
			"android"
		]
	},
	"shouldConfigurePlatforms": {
		"ios": true,
		"android": true
	},
	"hash": "[hash]",
	"wizard": {
		"apiKeys": {
			"id": "[id]",
			"scopes": [
				"event:admin",
				"event:read",
				"member:read",
				"org:read",
				"project:read",
				"project:releases",
				"team:read",
				"project:write"
			],
			"application": null,
			"expiresAt": null,
			"dateCreated": "2019-10-23T14:06:30.526972Z",
			"state": null,
			"token": "[token]",
			"refreshToken": null
		},
		"projects": [
			{
				"id": "[projectId]",
				"slug": "[slug]",
				"name": "[name]",
				"isPublic": false,
				"isBookmarked": false,
				"color": "#78bf3f",
				"dateCreated": "2019-10-23T13:29:37.454616Z",
				"firstEvent": "2019-10-23T23:21:10.866000Z",
				"firstTransactionEvent": false,
				"features": [
					"alert-filters",
					"issue-alerts-targeting",
					"minidump",
					"race-free-group-creation",
					"similarity-indexing",
					"similarity-view",
					"releases"
				],
				"status": "active",
				"platform": "react-native",
				"isInternal": false,
				"isMember": false,
				"hasAccess": true,
				"avatar": {
					"avatarType": "letter_avatar",
					"avatarUuid": null
				},
				"organization": {
					"id": "[organizationId]",
					"slug": "[name]",
					"status": {
						"id": "active",
						"name": "active"
					},
					"name": "[name]",
					"dateCreated": "2019-10-23T13:28:38.751640Z",
					"isEarlyAdopter": false,
					"require2FA": false,
					"avatar": {
						"avatarType": "letter_avatar",
						"avatarUuid": null
					},
					"features": [
						"team-alerts-ownership",
						"performance-vitals-overview",
						"performance-view",
						"images-loaded-v2",
						"custom-event-title",
						"invite-members-rate-limits",
						"alert-details-redesign",
							"integrations-stacktrace-link",
						"unhandled-issue-flag",
						"symbol-sources",
						"performance-landing-v2",
						"advanced-search",
						"slack-migration",
						"am1-billing",
						"inbox",
						"alert-wizard",
						"org-subdomains",
						"trace-view-summary",
						"open-membership",
						"usage-stats-graph",
						"event-attachments-viewer",
						"shared-issues",
						"event-attachments"
					]
				},
				"keys": [
					{
						"id": "[keyId]",
						"name": "Default",
						"label": "Default",
						"public": "[keyId]",
						"secret": "[secret]",
						"projectId": [projectId],
						"isActive": true,
						"rateLimit": null,
						"dsn": {
							"secret": "https://[keyId]:[secret]@o123456.ingest.sentry.io/[projectId]",
							"public": "https://[keyId]@o123456.ingest.sentry.io/[projectId]",
							"csp": "https://o123456.ingest.sentry.io/api/[projectId]/csp-report/?sentry_key=[keyId]",
							"security": "https://o123456.ingest.sentry.io/api/[projectId]/security/?sentry_key=[keyId]",
							"minidump": "https://o123456.ingest.sentry.io/api/[projectId]/minidump/?sentry_key=[keyId]",
							"unreal": "https://o123456.ingest.sentry.io/api/[projectId]/unreal/[keyId]/",
							"cdn": "https://js.sentry-cdn.com/[keyId].min.js"
						},
						"browserSdkVersion": "5.x",
						"browserSdk": {
							"choices": [
								[
									"latest",
									"latest"
								],
								[
									"6.x",
									"6.x"
								],
								[
									"5.x",
									"5.x"
								],
								[
									"4.x",
									"4.x"
								]
							]
						},
						"dateCreated": "2019-10-23T13:29:37.463474Z"
					}
				]
			}
		]
	},
	"config": {
		"auth": {
			"token": "[token]"
		},
		"dsn": {
			"public": "https://[keyId]@o123456.ingest.sentry.io/[projectId]",
			"secret": "https://[keyId]:[secret]@o123456.ingest.sentry.io/[projectId]"
		},
		"organization": {
			"slug": "[name]"
		},
		"project": {
			"slug": "[slug]"
		}
	}
}


ios/sentry.properties not exists


android/sentry.properties not exists


ios/sentry.properties not exists


android/sentry.properties not exists

✅ Patched build.gradle file.
Error: No platform selected
    at ReactNative.MobileProject.getPlatforms ([path]/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/MobileProject.js:65:19)
    at ReactNative._patchJs ([path]/node_modules/@sentry/wizard/dist/lib/Steps/Integrations/ReactNative.js:224:14)
    at [path]/node_modules/@sentry/wizard/dist/lib/Helper/File.js:28:45
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
    at Object.writeFileSync (node:fs:1528:5)
    at [path]/node_modules/@sentry/wizard/dist/lib/Helper/File.js:33:20
    at processTicksAndRejections (node:internal/process/task_queues:94:5)

{
	"integration": {
		"_argv": {
			"_": [],
			"debug": true,
			"uninstall": false,
			"skip-connect": false,
			"skipConnect": false,
			"quiet": false,
			"i": "reactNative",
			"integration": "reactNative",
			"p": [
				"ios",
				"android"
			],
			"platform": [
				"ios",
				"android"
			],
			"u": "https://sentry.io/",
			"url": "https://sentry.io/",
			"$0": "[path]/node_modules/.bin/sentry-wizard"
		},
		"_isDebug": true,
		"_sentryCli": {
			"_argv": {
				"_": [],
				"debug": true,
				"uninstall": false,
				"skip-connect": false,
				"skipConnect": false,
				"quiet": false,
				"i": "reactNative",
				"integration": "reactNative",
				"p": [
					"ios",
					"android"
				],
				"platform": [
					"ios",
					"android"
				],
				"u": "https://sentry.io/",
				"url": "https://sentry.io/",
				"$0": "[path]/node_modules/.bin/sentry-wizard"
			}
		},
		"_platforms": [
			"ios",
			"android"
		]
	},
	"shouldConfigurePlatforms": {
		"ios": true,
		"android": true
	},
	"hash": "[hash]",
	"wizard": {
		"apiKeys": {
			"id": "[id]",
			"scopes": [
				"event:admin",
				"event:read",
				"member:read",
				"org:read",
				"project:read",
				"project:releases",
				"team:read",
				"project:write"
			],
			"application": null,
			"expiresAt": null,
			"dateCreated": "2019-10-23T14:06:30.526972Z",
			"state": null,
			"token": "[token]",
			"refreshToken": null
		},
		"projects": [
			{
				"id": "[projectId]",
				"slug": "[slug]",
				"name": "[name]",
				"isPublic": false,
				"isBookmarked": false,
				"color": "#78bf3f",
				"dateCreated": "2019-10-23T13:29:37.454616Z",
				"firstEvent": "2019-10-23T23:21:10.866000Z",
				"firstTransactionEvent": false,
				"features": [
					"alert-filters",
					"issue-alerts-targeting",
					"minidump",
					"race-free-group-creation",
					"similarity-indexing",
					"similarity-view",
					"releases"
				],
				"status": "active",
				"platform": "react-native",
				"isInternal": false,
				"isMember": false,
				"hasAccess": true,
				"avatar": {
					"avatarType": "letter_avatar",
					"avatarUuid": null
				},
				"organization": {
					"id": "[organizationId]",
					"slug": "[name]",
					"status": {
						"id": "active",
						"name": "active"
					},
					"name": "[name]",
					"dateCreated": "2019-10-23T13:28:38.751640Z",
					"isEarlyAdopter": false,
					"require2FA": false,
					"avatar": {
						"avatarType": "letter_avatar",
						"avatarUuid": null
					},
					"features": [
						"team-alerts-ownership",
						"performance-vitals-overview",
						"performance-view",
						"images-loaded-v2",
						"custom-event-title",
						"invite-members-rate-limits",
						"alert-details-redesign",
						"integrations-stacktrace-link",
						"unhandled-issue-flag",
						"symbol-sources",
						"performance-landing-v2",
						"advanced-search",
						"slack-migration",
						"am1-billing",
						"inbox",
						"alert-wizard",
						"org-subdomains",
						"trace-view-summary",
						"open-membership",
						"usage-stats-graph",
						"event-attachments-viewer",
						"shared-issues",
						"event-attachments"
					]
				},
				"keys": [
					{
						"id": "[keyId]",
						"name": "Default",
						"label": "Default",
						"public": "[keyId]",
						"secret": "[secret]",
						"projectId": [projectId],
						"isActive": true,
						"rateLimit": null,
						"dsn": {
							"secret": "https://[keyId]:[secret]@o123456.ingest.sentry.io/[projectId]",
							"public": "https://[keyId]@o123456.ingest.sentry.io/[projectId]",
							"csp": "https://o123456.ingest.sentry.io/api/[projectId]/csp-report/?sentry_key=[keyId]",
							"security": "https://o123456.ingest.sentry.io/api/[projectId]/security/?sentry_key=[keyId]",
							"minidump": "https://o123456.ingest.sentry.io/api/[projectId]/minidump/?sentry_key=[keyId]",
							"unreal": "https://o123456.ingest.sentry.io/api/[projectId]/unreal/[keyId]/",
							"cdn": "https://js.sentry-cdn.com/[keyId].min.js"
						},
						"browserSdkVersion": "5.x",
						"browserSdk": {
							"choices": [
								[
									"latest",
									"latest"
								],
								[
									"6.x",
									"6.x"
								],
								[
									"5.x",
									"5.x"
								],
								[
									"4.x",
									"4.x"
								]
							]
						},
						"dateCreated": "2019-10-23T13:29:37.463474Z"
					}
				]
			}
		]
	},
	"config": {
		"auth": {
			"token": "[token]"
		},
		"dsn": {
			"public": "https://[keyId]@o123456.ingest.sentry.io/[projectId]",
			"secret": "https://[keyId]:[secret]@o123456.ingest.sentry.io/[projectId]"
		},
		"organization": {
			"slug": "[name]"
		},
		"project": {
			"slug": "[slug]"
		}
	}
}


🎉  Successfully set up Sentry for your project 🎉