{"action":"created","issue":{"url":"https://api.github.com/repos/WizardFactory/BlogSyncer/issues/337","labels_url":"https://api.github.com/repos/WizardFactory/BlogSyncer/issues/337/labels{/name}","comments_url":"https://api.github.com/repos/WizardFactory/BlogSyncer/issues/337/comments","events_url":"https://api.github.com/repos/WizardFactory/BlogSyncer/issues/337/events","html_url":"https://github.com/WizardFactory/BlogSyncer/issues/337","id":98988945,"number":337,"title":"google blogger없이 로그인 하는 경우에 발생하는 오류.","user":{"login":"kimalec","id":6895272,"avatar_url":"https://avatars.githubusercontent.com/u/6895272?v=3","gravatar_id":"","url":"https://api.github.com/users/kimalec","html_url":"https://github.com/kimalec","followers_url":"https://api.github.com/users/kimalec/followers","following_url":"https://api.github.com/users/kimalec/following{/other_user}","gists_url":"https://api.github.com/users/kimalec/gists{/gist_id}","starred_url":"https://api.github.com/users/kimalec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimalec/subscriptions","organizations_url":"https://api.github.com/users/kimalec/orgs","repos_url":"https://api.github.com/users/kimalec/repos","events_url":"https://api.github.com/users/kimalec/events{/privacy}","received_events_url":"https://api.github.com/users/kimalec/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/WizardFactory/BlogSyncer/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"seankim2","id":8072056,"avatar_url":"https://avatars.githubusercontent.com/u/8072056?v=3","gravatar_id":"","url":"https://api.github.com/users/seankim2","html_url":"https://github.com/seankim2","followers_url":"https://api.github.com/users/seankim2/followers","following_url":"https://api.github.com/users/seankim2/following{/other_user}","gists_url":"https://api.github.com/users/seankim2/gists{/gist_id}","starred_url":"https://api.github.com/users/seankim2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seankim2/subscriptions","organizations_url":"https://api.github.com/users/seankim2/orgs","repos_url":"https://api.github.com/users/seankim2/repos","events_url":"https://api.github.com/users/seankim2/events{/privacy}","received_events_url":"https://api.github.com/users/seankim2/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-08-04T14:50:08Z","updated_at":"2015-09-09T14:30:25Z","closed_at":null,"body":"google 계정으로 blogger없이 로그인 하면 오류가 발생하는 듯함.\r\n\r\n```\r\n» 3 Aug 2015 14:59:15.914 2015-08-03 05:59:15.626239+00:00 app web.1 - - info: + cName=google, userId=55bf02ef9238a8110059bfba, url=/bot_bloglist?providerid=g103533502105922208304&userid=55bf02ef9238a8110059bfba\r\n» 3 Aug 2015 14:59:15.932 2015-08-03 05:59:15.644005+00:00 app web.1 - - info: apiUrl=https://www.googleapis.com/blogger/v3/users/self/blogs cName=google, userId=55bf02ef9238a8110059bfba, url=/bot_bloglist?providerid=g103533502105922208304&userid=55bf02ef9238a8110059bfba\r\n» 3 Aug 2015 14:59:16.204 2015-08-03 05:59:15.916972+00:00 app web.1 - - error: [TypeError: Cannot read property 'length' of undefined] cName=google, userId=55bf02ef9238a8110059bfba, url=/bot_bloglist?providerid=g103533502105922208304&userid=55bf02ef9238a8110059bfba Fatal\r\n» 3 Aug 2015 14:59:16.280 2015-08-03 05:59:15.916978+00:00 app web.1 - - error: { kind: 'blogger#blogList' } cName=google, userId=55bf02ef9238a8110059bfba, url=/bot_bloglist?providerid=g103533502105922208304&userid=55bf02ef9238a8110059bfba Fatal\r\n» 3 Aug 2015 14:59:16.280 2015-08-03 05:59:15.937631+00:00 app web.1 - - error: { statusCode: 500, Fatal\r\n» 3 Aug 2015 14:59:16.280 2015-08-03 05:59:15.937635+00:00 app web.1 - - body: '\"{}\"',\r\n» 3 Aug 2015 14:59:16.280 2015-08-03 05:59:15.937636+00:00 app web.1 - - url: 'http://www.justwapps.com/google/bot_bloglist?providerid=g103533502105922208304&userid=55bf02ef9238a8110059bfba' } cName=BlogBot, fName=_requestGetBlogList, userId=55bf02ef9238a8110059bfba\r\n» 3 Aug 2015 14:59:16.280 2015-08-03 05:59:15.945524+00:00 app web.1 - - error: { statusCode: 500, Fatal\r\n» 3 Aug 2015 14:59:16.280 2015-08-03 05:59:15.945530+00:00 app web.1 - - body: '\"{}\"',\r\n» 3 Aug 2015 14:59:16.280 2015-08-03 05:59:15.945533+00:00 app web.1 - - url: 'http://www.justwapps.com/google/bot_bloglist?providerid=g103533502105922208304&userid=55bf02ef9238a8110059bfba' } cName=BlogBot, fName=findOrCreate, userId=55bf02ef9238a8110059bfba\r\n```\r\n\r\naccessToken의 기한이 완료되면, updateToken을 하는데 그때 \"Fail to find provider\"가 발생함.\r\n```\r\n» 3 Aug 2015 21:45:21.018 2015-08-03 12:45:20.893919+00:00 app web.1 - - error: [Error: Fail to find provider] cName=UserMgr, fName=findProviderByUserId, userId=55bf568e65e3751100d00567, providerName=google Fatal\r\n» 3 Aug 2015 21:45:21.018 2015-08-03 12:45:20.897065+00:00 app web.1 - - warn: { statusCode: 500,\r\n» 3 Aug 2015 21:45:21.024 2015-08-03 12:45:20.896744+00:00 heroku router - - at=info method=POST path=\"/google/bot_posts/updateToken?userid=55bf568e65e3751100d00567\" host=www.justwapps.com request_id=efcdc105-990c-47fc-8286-9bf823444e93 fwd=\"54.158.191.59\" dyno=web.1 connect=0ms service=6ms status=500 bytes=288\r\n» 3 Aug 2015 21:45:21.075 2015-08-03 12:45:20.882611+00:00 app web.1 - - verbose: Fail to find group cName=groupSchema, fName=findGroupByBlogInfo, providerName=facebook, blogId=1390285387964896\r\n» 3 Aug 2015 21:45:21.075 2015-08-03 12:45:20.893414+00:00 app web.1 - - error: Fail to find providers cName=userSchema, fName=findProvider, providerName=google, providerId=undefined Fatal\r\n» 3 Aug 2015 21:45:21.075 2015-08-03 12:45:20.894127+00:00 app web.1 - - error: [Error: Fail to find provider] cName=google, userId=55bf568e65e3751100d00567, url=/bot_posts/updateToken?userid=55bf568e65e3751100d00567 Fatal\r\n» 3 Aug 2015 21:45:21.093 2015-08-03 12:45:20.897068+00:00 app web.1 - - body: '\"{}\"',\r\n» 3 Aug 2015 21:45:21.093 2015-08-03 12:45:20.897070+00:00 app web.1 - - url: 'http://www.justwapps.com/google/bot_posts/updateToken?userid=55bf568e65e3751100d00567' } cName=BlogBot, fName=_updateAccessToken, userId=55bf568e65e3751100d00567\r\n» 3 Aug 2015 21:45:21.093 2015-08-03 12:45:20.897329+00:00 app web.1 - - warn: Fail to update access token\r\n```\r\n\r\nlog url = https://logentries.com/app/8fb52d3a#/log/8b913433/?f=1438585920000&t=1438612320000&log_q="},"comment":{"url":"https://api.github.com/repos/WizardFactory/BlogSyncer/issues/comments/138927518","html_url":"https://github.com/WizardFactory/BlogSyncer/issues/337#issuecomment-138927518","issue_url":"https://api.github.com/repos/WizardFactory/BlogSyncer/issues/337","id":138927518,"user":{"login":"neoqmin","id":11567505,"avatar_url":"https://avatars.githubusercontent.com/u/11567505?v=3","gravatar_id":"","url":"https://api.github.com/users/neoqmin","html_url":"https://github.com/neoqmin","followers_url":"https://api.github.com/users/neoqmin/followers","following_url":"https://api.github.com/users/neoqmin/following{/other_user}","gists_url":"https://api.github.com/users/neoqmin/gists{/gist_id}","starred_url":"https://api.github.com/users/neoqmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neoqmin/subscriptions","organizations_url":"https://api.github.com/users/neoqmin/orgs","repos_url":"https://api.github.com/users/neoqmin/repos","events_url":"https://api.github.com/users/neoqmin/events{/privacy}","received_events_url":"https://api.github.com/users/neoqmin/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T14:30:25Z","updated_at":"2015-09-09T14:30:25Z","body":"##### 해당 오류에 대한 분석 결과와 수정 내용입니다.\r\n```javascript\r\ntry {\r\n    var items = body.items;\r\n    log.debug(\"items length=\" + items.length, meta);\r\n````\r\n구글의 blogger에서 블로그가 없을 경우 body.items 가 undefined 입니다.\r\nundefined.length에서 exception이 발생했습니다.\r\n\r\n아래와 같이 수정할 예정입니다.\r\n```javascript\r\nif(body.items !== undefined) {\r\n    try {\r\n        var items = body.items;\r\n        log.debug(\"items length=\" + items.length, meta);\r\n```"}}