{"action":"created","issue":{"url":"https://api.github.com/repos/howdyai/botkit-storage-firebase/issues/9","repository_url":"https://api.github.com/repos/howdyai/botkit-storage-firebase","labels_url":"https://api.github.com/repos/howdyai/botkit-storage-firebase/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/howdyai/botkit-storage-firebase/issues/9/comments","events_url":"https://api.github.com/repos/howdyai/botkit-storage-firebase/issues/9/events","html_url":"https://github.com/howdyai/botkit-storage-firebase/issues/9","id":201890185,"number":9,"title":"Getting FIREBASE WARNING: Exception was thrown by user callback. TypeError: cb is not a function","user":{"login":"ankitshekhawat","id":5464540,"avatar_url":"https://avatars.githubusercontent.com/u/5464540?v=3","gravatar_id":"","url":"https://api.github.com/users/ankitshekhawat","html_url":"https://github.com/ankitshekhawat","followers_url":"https://api.github.com/users/ankitshekhawat/followers","following_url":"https://api.github.com/users/ankitshekhawat/following{/other_user}","gists_url":"https://api.github.com/users/ankitshekhawat/gists{/gist_id}","starred_url":"https://api.github.com/users/ankitshekhawat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankitshekhawat/subscriptions","organizations_url":"https://api.github.com/users/ankitshekhawat/orgs","repos_url":"https://api.github.com/users/ankitshekhawat/repos","events_url":"https://api.github.com/users/ankitshekhawat/events{/privacy}","received_events_url":"https://api.github.com/users/ankitshekhawat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-19T15:24:53Z","updated_at":"2017-01-19T18:43:23Z","closed_at":null,"body":"Getting this warning on initialization:\r\n\r\n```\r\nFIREBASE WARNING: Exception was thrown by user callback. TypeError: cb is not a function\r\n    at success (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/botkit-storage-firebase/src/index.js:50:13)\r\n    at c (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:240:58)\r\n    at /Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:201:710\r\n    at ec (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:52:165)\r\n    at ac (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:31:216)\r\n    at $b (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:30:1198)\r\n    at Ri (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:224:313)\r\n    at X.h.Gb (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:238:140)\r\n    at X.h.Og (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:240:249)\r\n    at Object.get (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/botkit-storage-firebase/src/index.js:47:31) \r\n/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:52\r\n(d=\"0\"+d),c+=d;return c.toLowerCase()}var zd=/^-?\\d{1,10}$/;function td(a){return zd.test(a)&&(a=Number(a),-2147483648<=a&&2147483647>=a)?a:null}function ec(a){try{a()}catch(b){setTimeout(function(){R(\"Exception was thrown by user callback.\",b.stack||\"\");throw b;},Math.floor(0))}}function S(a,b){if(t(a)){var c=Array.prototype.slice.call(arguments,1).slice();ec(function(){a.apply(null,c)})}};function Ad(a){var b={},c={},d={},e=\"\";try{var f=a.split(\".\"),b=Pb(id(f[0])||\"\"),c=Pb(id(f[1])||\"\"),e=f[2],d=c.d||{};delete c.d}catch(g){}return{ph:b,Dc:c,data:d,bh:e}}function Bd(a){a=Ad(a).Dc;return\"object\"===typeof a&&a.hasOwnProperty(\"iat\")?z(a,\"iat\"):null}function Cd(a){a=Ad(a);var b=a.Dc;return!!a.bh&&!!b&&\"object\"===typeof b&&b.hasOwnProperty(\"iat\")};function Dd(a){this.Y=a;this.g=a.n.g}function Ed(a,b,c,d){var e=[],f=[];Na(b,function(b){\"child_changed\"===b.type&&a.g.Ad(b.Le,b.Ma)&&f.push(new H(\"child_moved\",b.Ma,b.Ya))})\r\n\r\nTypeError: cb is not a function\r\n    at success (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/botkit-storage-firebase/src/index.js:50:13)\r\n    at c (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:240:58)\r\n    at /Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:201:710\r\n    at ec (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:52:165)\r\n    at ac (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:31:216)\r\n    at $b (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:30:1198)\r\n    at Ri (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:224:313)\r\n    at X.h.Gb (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:238:140)\r\n    at X.h.Og (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/firebase/lib/firebase-node.js:240:249)\r\n    at Object.get (/Users/ankitshekhawat/Downloads/botkit-master 2/node_modules/botkit-storage-firebase/src/index.js:47:31)\r\n```\r\nI am initialising it like this.\r\n\r\n```\r\nvar Botkit = require('botkit'),\r\n  firebaseStorage = require('botkit-storage-firebase')({firebase_uri: 'https://xxx.firebaseio.com/'}),\r\n      controller = Botkit.slackbot({\r\n          debug: true,\r\n          storage: firebaseStorage\r\n      });\r\n\r\n// then you can use the Botkit storage api, make sure you have an id property\r\nvar beans = {id: 'cool', beans: ['pinto', 'garbanzo']};\r\ncontroller.storage.teams.save(beans);\r\nbeans = controller.storage.teams.get('cool');\r\nconsole.log(beans);\r\n```\r\n\r\nHowever I can see the database entry posted on firebase console succesfully. problem occurs only on  \r\n``` beans = controller.storage.teams.get('cool'); ```\r\n\r\nAny idea how to get around this?"},"comment":{"url":"https://api.github.com/repos/howdyai/botkit-storage-firebase/issues/comments/273861408","html_url":"https://github.com/howdyai/botkit-storage-firebase/issues/9#issuecomment-273861408","issue_url":"https://api.github.com/repos/howdyai/botkit-storage-firebase/issues/9","id":273861408,"user":{"login":"ankitshekhawat","id":5464540,"avatar_url":"https://avatars.githubusercontent.com/u/5464540?v=3","gravatar_id":"","url":"https://api.github.com/users/ankitshekhawat","html_url":"https://github.com/ankitshekhawat","followers_url":"https://api.github.com/users/ankitshekhawat/followers","following_url":"https://api.github.com/users/ankitshekhawat/following{/other_user}","gists_url":"https://api.github.com/users/ankitshekhawat/gists{/gist_id}","starred_url":"https://api.github.com/users/ankitshekhawat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankitshekhawat/subscriptions","organizations_url":"https://api.github.com/users/ankitshekhawat/orgs","repos_url":"https://api.github.com/users/ankitshekhawat/repos","events_url":"https://api.github.com/users/ankitshekhawat/events{/privacy}","received_events_url":"https://api.github.com/users/ankitshekhawat/received_events","type":"User","site_admin":false},"created_at":"2017-01-19T18:43:23Z","updated_at":"2017-01-19T18:43:23Z","body":"Looks like repo is outdated and uses firbase v2 api instead of new v3.fixed it by using this [fork](https://github.com/esjay/botkit-storage-firebase) instead."}}
{"actor":{"display_login":"ankitshekhawat"}}