{"action":"created","issue":{"url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation/issues/155","repository_url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation","labels_url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation/issues/155/comments","events_url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation/issues/155/events","html_url":"https://github.com/transistorsoft/react-native-background-geolocation/issues/155","id":185941848,"number":155,"title":"Rare behaviour white screen after some time / relaunch app with geofence listeners","user":{"login":"robmoorman","id":529396,"avatar_url":"https://avatars.githubusercontent.com/u/529396?v=3","gravatar_id":"","url":"https://api.github.com/users/robmoorman","html_url":"https://github.com/robmoorman","followers_url":"https://api.github.com/users/robmoorman/followers","following_url":"https://api.github.com/users/robmoorman/following{/other_user}","gists_url":"https://api.github.com/users/robmoorman/gists{/gist_id}","starred_url":"https://api.github.com/users/robmoorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robmoorman/subscriptions","organizations_url":"https://api.github.com/users/robmoorman/orgs","repos_url":"https://api.github.com/users/robmoorman/repos","events_url":"https://api.github.com/users/robmoorman/events{/privacy}","received_events_url":"https://api.github.com/users/robmoorman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-28T14:46:19Z","updated_at":"2016-10-31T20:15:21Z","closed_at":null,"body":"When using the module with geofences enabled we experience strange behaviour with the React Native bridge. After intensive testing, we have a build without this module which doesn't show a white screen.\n\nAfter some time (can be minutes, hours or even days, app in background or closed) when relaunching the app / putting the app back to the foreground somethings happens which forces React Native to remove the rootView content. We can't see exactly what is happening in the logs, but we almost certain it's caused by something ran in the background with geofences on.\n\nNow we see a fix (https://github.com/transistorsoft/react-native-background-geolocation/commit/a0fa32d9f71cb056b46f436717bfa17ee5cc743a) which has something to do with these threads.\nCan it be you experienced behaviour like this (users ends up with a white screen, which is actually the rootView with RN's white default backgroundColor)?\n\n``` javascript\nBackgroundGeolocation.configure({\n  activityType: 'Other',\n  debug: false,\n  disableStopDetection: true,\n  disableMotionActivityUpdates: false,\n  distanceFilter: 20,\n  desiredAccuracy: 10,\n  license: ...,\n  locationAuthorizationRequest: 'Always',\n  maxDaysToPersist: 5,\n  maxRecordsToPersist: 10,\n  stationaryRadius: 10,\n  stopOnTerminate: false,\n  startOnBoot: true,\n})\n```\n\nWe use version 1.4.3, now trying with the latest version.\n"},"comment":{"url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation/issues/comments/257407586","html_url":"https://github.com/transistorsoft/react-native-background-geolocation/issues/155#issuecomment-257407586","issue_url":"https://api.github.com/repos/transistorsoft/react-native-background-geolocation/issues/155","id":257407586,"user":{"login":"christocracy","id":14999,"avatar_url":"https://avatars.githubusercontent.com/u/14999?v=3","gravatar_id":"","url":"https://api.github.com/users/christocracy","html_url":"https://github.com/christocracy","followers_url":"https://api.github.com/users/christocracy/followers","following_url":"https://api.github.com/users/christocracy/following{/other_user}","gists_url":"https://api.github.com/users/christocracy/gists{/gist_id}","starred_url":"https://api.github.com/users/christocracy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christocracy/subscriptions","organizations_url":"https://api.github.com/users/christocracy/orgs","repos_url":"https://api.github.com/users/christocracy/repos","events_url":"https://api.github.com/users/christocracy/events{/privacy}","received_events_url":"https://api.github.com/users/christocracy/received_events","type":"User","site_admin":false},"created_at":"2016-10-31T20:15:21Z","updated_at":"2016-10-31T20:15:21Z","body":"Try implementing a `componentWillUnmount` phase and remove any event-listeners on `BackgroundGeolocation`\r\n\r\n```Javascript\r\n  // You must remove listeners when your component unmounts\r\n  componentWillUnmount() {\r\n    // Remove BackgroundGeolocation listeners\r\n    BackgroundGeolocation.un('location', this.onLocation);\r\n    BackgroundGeolocation.un('error', this.onError);\r\n    BackgroundGeolocation.un('motionchange', this.onMotionChange);\r\n    BackgroundGeolocation.un('activitychange', this.onActivityChange);\r\n    BackgroundGeolocation.un('providerchange', this.onProviderChange);\r\n  }\r\n```\r\n"}}
{"actor":{"display_login":"christocracy"}}