Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry.init() is throwing an error evaluating 'sandbox.hidden = true' #774

Closed
3 of 7 tasks
a-polishchuk opened this issue Feb 20, 2020 · 5 comments · Fixed by getsentry/sentry-javascript#2447
Closed
3 of 7 tasks

Comments

@a-polishchuk
Copy link

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native
  • react-native-sentry

SDK version: 1.3.1
react-native version: 0.61.4

Init Code:

Sentry.init({
  dsn: 'https://[email protected]/...'
});

I have following issue:
Sentry.init() function is throwing an error "TypeError: null is not an object (evaluating 'sandbox.hidden = true')
Screenshot_20200220_175114_com timetri

@seamereth
Copy link

seamereth commented Feb 20, 2020

Just came here to post this. I'm getting the exact same error! Only solution is to comment out the init line, which is obviously not ideal if you want to use Sentry...

@HazAT
Copy link
Member

HazAT commented Feb 21, 2020

Are you using any request libraries?
This error should only pop up if you are polyfilling fetch.

@a-polishchuk
Copy link
Author

hm, I'm not sure, actually. I'm using some of the expo modules. This is my babel.config.js
module.exports = function(api) { api.cache(true); return { presets: ["babel-preset-expo"] }; };

@bill-pairaktaridis
Copy link

Also chance of getting this for sentry-expo as well?

@bill-pairaktaridis
Copy link

bill-pairaktaridis commented Feb 27, 2020

@HazAT where can we look to see if we're somehow polyfilling fetch?

This is my package.json

{
  "name": "Nimber",
  "main": "node_modules/expo/AppEntry.js",
  "private": true,
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "eject": "expo eject",
    "test": "jest"
  },
  "jest": {
    "preset": "jest-expo",
    "transformIgnorePatterns": [
      "node_modules/(?!(jest-)?react-native|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|sentry-expo|native-base)"
    ]
  },
  "dependencies": {
    "@expo/samples": "2.1.1",
    "@expo/vector-icons": "^10.0.0",
    "@react-native-community/async-storage": "^1.7.1",
    "@react-native-community/datetimepicker": "2.1.0",
    "@react-native-community/netinfo": "4.6.0",
    "@react-navigation/native-stack": "^5.0.1",
    "@sentry/browser": "^5.12.4",
    "@sentry/react-native": "^1.3.3",
    "braces": "^3.0.2",
    "core-js": "^3.1.3",
    "country-telephone-data": "^0.6.0",
    "expo": "^36.0.0",
    "expo-analytics": "^1.0.11",
    "expo-constants": "~8.0.0",
    "expo-facebook": "~8.0.0",
    "expo-file-system": "~8.0.0",
    "expo-gl": "~8.0.0",
    "expo-image-manipulator": "~8.0.0",
    "expo-image-picker": "~8.0.1",
    "expo-intent-launcher": "~8.0.0",
    "expo-localization": "~8.0.0",
    "expo-location": "~8.0.0",
    "expo-media-library": "~8.0.0",
    "expo-permissions": "~8.0.0",
    "expo-pixi": "^1.2.0",
    "expo-print": "~8.0.0",
    "expo-sms": "~8.0.0",
    "expo-task-manager": "~8.0.0",
    "expo-web-browser": "~8.0.0",
    "expokit": "32.0.2",
    "geolib": "^3.0.3",
    "i18n-js": "^3.1.0",
    "libphonenumber-js": "^1.7.23",
    "lodash.debounce": "^4.0.8",
    "moment": "^2.22.2",
    "prop-types": "^15.6.2",
    "react": "16.9.0",
    "react-dom": "16.9.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
    "react-native-app-link": "^1.0.0",
    "react-native-elements": "^0.19.1",
    "react-native-gesture-handler": "~1.5.0",
    "react-native-hyperlink": "0.0.14",
    "react-native-looped-carousel": "^0.1.13",
    "react-native-maps": "0.26.1",
    "react-native-maps-directions": "^1.7.3",
    "react-native-reanimated": "~1.4.0",
    "react-native-safe-area-context": "0.6.0",
    "react-native-screens": "2.0.0-alpha.12",
    "react-native-signature-canvas": "^1.6.0",
    "react-native-signature-pad": "^0.1.0",
    "react-native-svg": "9.13.3",
    "react-native-svg-animated-linear-gradient": "^0.1.9",
    "react-native-swipe-verify": "^0.1.6",
    "react-native-vector-icons": "^6.6.0",
    "react-native-view-shot": "3.0.2",
    "react-native-webview": "7.4.3",
    "react-navigation": "^4.1.1",
    "react-navigation-drawer": "^2.3.4",
    "react-navigation-stack": "^1.10.3",
    "react-navigation-tabs": "^2.7.0",
    "react-redux": "^5.1.1",
    "redux": "^4.0.4",
    "redux-persist": "^5.10.0",
    "redux-sentry-middleware": "^0.1.1",
    "sentry-expo": "^2.0.1",
    "tiny-emitter": "^2.1.0",
    "ws": "^7.0.0"
  },
  "devDependencies": {
    "@babel/cli": "^7.4.4",
    "@babel/core": "^7.4.5",
    "@babel/plugin-proposal-class-properties": "^7.8.3",
    "@babel/preset-flow": "^7.0.0",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "eslint": "^6.0.1",
    "eslint-plugin-react": "^7.14.2",
    "flow-bin": "^0.89.0",
    "jest-expo": "^36.0.0",
    "metro-react-native-babel-preset": "^0.54.1",
    "react-test-renderer": "^16.11.0"
  }
}

UPDATE: Looks like I was able to resolve it by removing ws, "@sentry/browser", "@sentry/react-native", braces and core-js

UPDATE 2: On further inspection I'm seeing that this is failing to a warning now, since the fix was probably deployed to NPM. Would still like to know what's causing/caused it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants