{"action":"created","issue":{"url":"https://api.github.com/repos/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/issues/30","repository_url":"https://api.github.com/repos/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK","labels_url":"https://api.github.com/repos/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/issues/30/comments","events_url":"https://api.github.com/repos/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/issues/30/events","html_url":"https://github.com/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/issues/30","id":123011570,"number":30,"title":"build.min.js uses `eval`","user":{"login":"aquach","id":815193,"avatar_url":"https://avatars.githubusercontent.com/u/815193?v=3","gravatar_id":"","url":"https://api.github.com/users/aquach","html_url":"https://github.com/aquach","followers_url":"https://api.github.com/users/aquach/followers","following_url":"https://api.github.com/users/aquach/following{/other_user}","gists_url":"https://api.github.com/users/aquach/gists{/gist_id}","starred_url":"https://api.github.com/users/aquach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aquach/subscriptions","organizations_url":"https://api.github.com/users/aquach/orgs","repos_url":"https://api.github.com/users/aquach/repos","events_url":"https://api.github.com/users/aquach/events{/privacy}","received_events_url":"https://api.github.com/users/aquach/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-18T19:29:37Z","updated_at":"2016-03-01T06:48:52Z","closed_at":"2016-03-01T06:48:52Z","body":"If you check out https://github.com/BranchMetrics/Smart-App-Banner-Deep-Linking-Web-SDK/blob/c27bb63f6d98b8614aac3bd9db577d3d247e9e83/dist/build.js and search for `unsafeParse`, you'll see that because `goog.json.USE_NATIVE_JSON` is set to false, the closure compiler uses eval instead of `JSON.parse` to handle API respsonses. I don't know much about closure compiler, but I think that it should probably be configured to use native JSON.\r\n\r\nSecondly, this issue silently broke all attribution and deeplinking data because of lines 1157-1159\r\n\r\n```\r\n        try {\r\n          e(null, goog.json.parse(f.responseText), f.status);\r\n        } catch (a) {\r\n          e(null, {}, f.status);\r\n        }\r\n```\r\n\r\nBecause I have CSP enabled for my project, the `eval` failed and erroneously transformed from a \"unsafe-eval blocked\" error to a \"Invalid JSON string\" error, which in turn was caught and silently interpreted as the empty payload by the lines above. This was super confusing and probably should at least log an error."},"comment":{"url":"https://api.github.com/repos/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/issues/comments/190578166","html_url":"https://github.com/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/issues/30#issuecomment-190578166","issue_url":"https://api.github.com/repos/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/issues/30","id":190578166,"user":{"login":"aaustin","id":1332632,"avatar_url":"https://avatars.githubusercontent.com/u/1332632?v=3","gravatar_id":"","url":"https://api.github.com/users/aaustin","html_url":"https://github.com/aaustin","followers_url":"https://api.github.com/users/aaustin/followers","following_url":"https://api.github.com/users/aaustin/following{/other_user}","gists_url":"https://api.github.com/users/aaustin/gists{/gist_id}","starred_url":"https://api.github.com/users/aaustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaustin/subscriptions","organizations_url":"https://api.github.com/users/aaustin/orgs","repos_url":"https://api.github.com/users/aaustin/repos","events_url":"https://api.github.com/users/aaustin/events{/privacy}","received_events_url":"https://api.github.com/users/aaustin/received_events","type":"User","site_admin":false},"created_at":"2016-03-01T06:48:52Z","updated_at":"2016-03-01T06:48:52Z","body":"@aquach - Can you try the latest plugin? We've revamped this module entirely to a much more updated and stable version. This should be resolved."}}