Skip to content

Offline crashes only uploaded on app restart or if another crash happens while not offline #444

@nacho-carnicero

Description

@nacho-carnicero

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

Output of node -v && npm -v && npm ls --prod --depth=0

v9.9.0
5.8.0
perception-ios@0.1.0 /Users/nachocarnicero/git/Sterblue/MobileNew
├── @turf/turf@5.1.6
├── apollo-cache-inmemory@1.2.5
├── apollo-cache-persist@0.1.1
├── apollo-client@2.3.5
├── apollo-link-error@1.1.0
├── apollo-link-http@1.5.4
├── async@2.5.0
├── axios@0.17.1
├── babel-eslint@8.0.1
├── babel-plugin-inline-import-graphql-ast@2.1.2
├── babel-plugin-transform-inline-environment-variables@0.2.0
├── babel-plugin-transform-react-jsx-source@6.22.0
├── babel-preset-expo@2.0.0
├── bluebird@3.5.1
├── cesium@1.37.0
├── eslint@4.9.0
├── eslint-config-prettier@2.9.0
├── eslint-plugin-class-property@1.0.6
├── eslint-plugin-graphql@1.4.0-1
├── eslint-plugin-prettier@2.6.2
├── flow-bin@0.61.0
├── flow-typed@2.2.3
├── glamorous-native@1.4.0
├── UNMET PEER DEPENDENCY graphql@0.13.1
├── html-webpack-inline-source-plugin@0.0.9
├── html-webpack-plugin@2.30.1
├── lodash@4.17.4
├── moment@2.18.1
├── prettier@1.7.3
├── UNMET PEER DEPENDENCY react@16.0.0-alpha.12
├── react-apollo@2.1.0
├── react-native@0.45.1
├── react-native-drawer@2.5.0
├── react-native-elements@0.16.0
├── react-native-fs@2.8.1
├── react-native-linear-gradient@2.4.0
├── react-native-sentry@0.38.2
├── react-native-speech@0.1.2
├── react-native-tab-view@0.0.69
├── react-native-tts@1.4.0
├── react-native-vector-icons@4.5.0
├── react-native-webview-messaging-fix@2.0.0-alpha.5
├── react-navigation@1.2.1
├── react-navigation-redux-helpers@1.0.1
├── react-redux@5.0.6
├── redux@3.7.2
├── redux-actions@2.2.1
├── redux-form@7.0.4
├── redux-persist@5.0.0-rc.2
├── redux-promise-middleware@4.4.1
├── shx@0.2.2
├── tinycolor2@1.4.1
├── wait-promise@0.4.1
├── webpack@3.6.0
├── webpack-cesium@1.37.0
└── webpack-dev-server@2.11.1

npm ERR! peer dep missing: graphql@^0.10.1 || ^0.11.0, required by eslint-plugin-graphql@1.4.0-1
npm ERR! peer dep missing: react@0.14.x || 15.* || ^15.0.0 || ^16.0.0, required by react-apollo@2.1.0
npm ERR! peer dep missing: react@^16.0.0, required by react-dom@16.2.0
npm ERR! peer dep missing: graphql@^0.9.0 || ^0.10.0, required by graphql-tag@2.4.2

Config:

Sentry.config('https://...@sentry.io/...').install()

Hi,

First of all a big thanks for this amazing work.

I have just integrated Sentry with my react-native app and was playing a bit with it. I encountered an issue related to crashes happening while being offline. Indeed, I have found that these crashes are uploaded but only under two scenarios:

  • if there is a new error that happens after having recovered the internet connection
  • if the user quits the app (completely, no running in the background) and launches it again

This means that if after an offline crash the user launches the app while still being offline, then a long time could pass until that crash log would be uploaded.

Steps to reproduce:

  • Introduce a button in your app that will crash it (for instance calling a non-existent method)
  • Launch the app and go offline (remove wifi connection)
  • Click on the button that will crash the app
  • The app will crash, launch it again
  • Go online

Actual result:

  • Go to your sentry dashboard, the crash that just occurred will not be shown

Expected result:

  • Go to your sentry dashboard, the crash that just occurred will be shown

Now if you click on the crash button again (or close the app and launch it again) while being online, you'll be able to see the crash in the sentry dashboard.

Metadata

Metadata

Assignees

Labels

No labels
No labels
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions