{"action":"created","issue":{"url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/issues/52","repository_url":"https://api.github.com/repos/rebeccahughes/react-native-device-info","labels_url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/issues/52/comments","events_url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/issues/52/events","html_url":"https://github.com/rebeccahughes/react-native-device-info/issues/52","id":160071800,"number":52,"title":"undefined is not object (evaluating 'RNDeviceInfo.deviceId')","user":{"login":"jurajkrivda","id":1255836,"avatar_url":"https://avatars0.githubusercontent.com/u/1255836?v=4","gravatar_id":"","url":"https://api.github.com/users/jurajkrivda","html_url":"https://github.com/jurajkrivda","followers_url":"https://api.github.com/users/jurajkrivda/followers","following_url":"https://api.github.com/users/jurajkrivda/following{/other_user}","gists_url":"https://api.github.com/users/jurajkrivda/gists{/gist_id}","starred_url":"https://api.github.com/users/jurajkrivda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jurajkrivda/subscriptions","organizations_url":"https://api.github.com/users/jurajkrivda/orgs","repos_url":"https://api.github.com/users/jurajkrivda/repos","events_url":"https://api.github.com/users/jurajkrivda/events{/privacy}","received_events_url":"https://api.github.com/users/jurajkrivda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":41,"created_at":"2016-06-14T00:11:29Z","updated_at":"2017-10-17T10:53:48Z","closed_at":null,"author_association":"NONE","body":"var DeviceInfo = require('react-native-device-info');\nconsole.log(DeviceInfo.getDeviceId());\n\nAndroid 5.1\n"},"comment":{"url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/issues/comments/337194375","html_url":"https://github.com/rebeccahughes/react-native-device-info/issues/52#issuecomment-337194375","issue_url":"https://api.github.com/repos/rebeccahughes/react-native-device-info/issues/52","id":337194375,"user":{"login":"erwan-lcs","id":29450010,"avatar_url":"https://avatars2.githubusercontent.com/u/29450010?v=4","gravatar_id":"","url":"https://api.github.com/users/erwan-lcs","html_url":"https://github.com/erwan-lcs","followers_url":"https://api.github.com/users/erwan-lcs/followers","following_url":"https://api.github.com/users/erwan-lcs/following{/other_user}","gists_url":"https://api.github.com/users/erwan-lcs/gists{/gist_id}","starred_url":"https://api.github.com/users/erwan-lcs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erwan-lcs/subscriptions","organizations_url":"https://api.github.com/users/erwan-lcs/orgs","repos_url":"https://api.github.com/users/erwan-lcs/repos","events_url":"https://api.github.com/users/erwan-lcs/events{/privacy}","received_events_url":"https://api.github.com/users/erwan-lcs/received_events","type":"User","site_admin":false},"created_at":"2017-10-17T10:53:48Z","updated_at":"2017-10-17T10:53:48Z","author_association":"NONE","body":"Thanks @bencodezen for the workaround, my code snippet for those trying to use react-native-device-info with Expo\r\n\r\n\r\n```\r\n    var deviceSerial =0;\r\n    try {\r\n        if(Expo.Constants.appOwnership == 'expo')\r\n        {\r\n            console.log('Running in expo');\r\n            deviceSerial = Expo.Constants.deviceId;\r\n        }\r\n        else\r\n        {\r\n            var DeviceInfo = require('react-native-device-info');\r\n            deviceSerial = DeviceInfo.getUniqueID();\r\n        }\r\n         console.log('DEVICE ID FOUND: '+deviceSerial);\r\n    }\r\n    catch(e)\r\n    {\r\n        console.log('error reading device ID');\r\n        deviceSerial =1;\r\n    }\r\n```"}}
{"actor":{"display_login":"erwan-lcs"}}