Skip to content

Commit

Permalink
Merge branch 'main' into kw-expo-remove-auth-token-from-app-package
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich authored Feb 26, 2024
2 parents e64c5a6 + 8e8186a commit 74a9010
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- You should not set the auth token in the plugin config except for local testing. Instead, use the `SENTRY_AUTH_TOKEN` env variable, as pointed out in our [docs](https://docs.sentry.io/platforms/react-native/manual-setup/expo/).
- In addition to showing a warning, we are now actively removing an `authToken` from the plugin config if it was set.
- If you had set the auth token in the plugin config previously, **and** built and published an app with that config, you should [rotate your token](https://docs.sentry.io/product/accounts/auth-tokens/).
- Ignore JSON response when retrieving source context from local Expo Dev Server ([#3611](https://github.com/getsentry/sentry-react-native/pull/3611))

### Dependencies

Expand Down
12 changes: 11 additions & 1 deletion src/js/integrations/debugsymbolicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,17 @@ export class DebugSymbolicator implements Integration {
if (xhr.status !== 200) {
resolve(null);
}
resolve(xhr.responseText);
const response = xhr.responseText;
if (
typeof response !== 'string' ||
// Expo Dev Server responses with status 200 and config JSON
// when web support not enabled and requested file not found
response.startsWith('{')
) {
resolve(null);
}

resolve(response);
}
};
xhr.onerror = (): void => {
Expand Down

0 comments on commit 74a9010

Please sign in to comment.