{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic/issues/9691","repository_url":"https://api.github.com/repos/driftyco/ionic","labels_url":"https://api.github.com/repos/driftyco/ionic/issues/9691/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic/issues/9691/comments","events_url":"https://api.github.com/repos/driftyco/ionic/issues/9691/events","html_url":"https://github.com/driftyco/ionic/issues/9691","id":196276228,"number":9691,"title":"Failed to show image (base64) using async pipe after upgrade from RC3 to RC4","user":{"login":"lufias","id":5868109,"avatar_url":"https://avatars.githubusercontent.com/u/5868109?v=3","gravatar_id":"","url":"https://api.github.com/users/lufias","html_url":"https://github.com/lufias","followers_url":"https://api.github.com/users/lufias/followers","following_url":"https://api.github.com/users/lufias/following{/other_user}","gists_url":"https://api.github.com/users/lufias/gists{/gist_id}","starred_url":"https://api.github.com/users/lufias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lufias/subscriptions","organizations_url":"https://api.github.com/users/lufias/orgs","repos_url":"https://api.github.com/users/lufias/repos","events_url":"https://api.github.com/users/lufias/events{/privacy}","received_events_url":"https://api.github.com/users/lufias/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-18T13:41:42Z","updated_at":"2016-12-18T15:15:11Z","closed_at":null,"body":"**Ionic version:**  (check one with \"x\")\r\n[ ] **1.x**\r\n[x ] **2.x**\r\n\r\n**I'm submitting a ...**  (check one with \"x\")\r\n[x ] bug report\r\n[ ] feature request\r\n[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/\r\n\r\n**Current behavior:**\r\n<!-- Describe how the bug manifests. -->\r\nUpgrading from RC3 to RC4. Using async pipe to resolve user id into image (in base 64 format) from either locally saved cache or fresh from server. The data (base 64) is sucessfully grabbed from within the pipe, but not get updated in the view. Working perfect in RC3 but failed in RC4. Debugger keep pointing to this line in img.js file.\r\n\r\n![selection_016](https://cloud.githubusercontent.com/assets/5868109/21293749/0f260046-c568-11e6-9d44-a797ed805383.png)\r\n\r\n\r\n**Expected behavior:**\r\n<!-- Describe what the behavior would be without the bug. -->\r\nImage will show after a while. \r\n\r\n**Steps to reproduce:**\r\n<!-- If you are able to illustrate the bug or feature request with an example, please provide steps to reproduce and if possible a demo using one of the following templates:\r\n\r\nFor Ionic 1 issues - http://plnkr.co/edit/Xo1QyAUx35ny1Xf9ODHx?p=preview\r\n\r\nFor Ionic 2 issues - http://plnkr.co/edit/GJte2b?p=preview\r\n-->\r\n\r\n**Related code:**\r\n\r\nThe pipe:\r\n\r\n```\r\nimport {Pipe, PipeTransform} from '@angular/core'\r\nimport {ImageHandlerUtilities} from '../ImageHandler'\r\nimport qlib from 'q'\r\n\r\n@Pipe({\r\n\tname:'resolveImage'\r\n})\r\nexport class ImageResolverPipe implements PipeTransform {\r\n\r\n\tconstructor(public imageHandler:ImageHandlerUtilities){}\r\n\r\n\ttransform(value:number, type:string){\r\n\t\t\r\n\t\tvar deferred = qlib.defer()\r\n\r\n\t\tif(value){\t\t\t\r\n\t\t\t// user profile image\r\n\t\t\tif(type === 'CXPerson'){\r\n\t\t\t\t\r\n\t\t\t\tthis.imageHandler.getProfileImageByUserId(value).then(\r\n\t\t\t\t\t(res:string)=>{\t\r\n\t\t\t\t\t\t// base 64 data \r\n\t\t\t\t\t\tdeferred.resolve(res)\r\n\t\t\t\t\t},\r\n\t\t\t\t\t(error)=>{\r\n\t\t\t\t\t\terror.unshift({ loc: 'ImageResolverPipe:transform:ix-1 ' })\r\n\t\t\t\t\t\tconsole.error(error)\r\n\t\t\t\t\t}\r\n\t\t\t\t)\t\r\n\t\t\t}\r\n\t\t\t// team profile image\r\n\t\t\telse if(type === 'CXTeam'){\r\n\t\t\t\tthis.imageHandler.getTeamProfileImageByTeamId(value).then(\r\n\t\t\t\t\t(res:string)=>{\r\n\t\t\t\t\t\t// base 64 data\r\n\t\t\t\t\t\tdeferred.resolve(res)\r\n\t\t\t\t\t},\r\n\t\t\t\t\t(error)=>{\r\n\t\t\t\t\t\terror.unshift({ loc: 'ImageResolverPipe:transform:ix-2 ' })\r\n\t\t\t\t\t\tconsole.error(error)\r\n\t\t\t\t\t}\r\n\t\t\t\t)\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\t// default random dummy image\r\n\t\t\tdeferred.resolve('http://lorempixel.com/g/100/100/people/')\r\n\t\t}\r\n\r\n\t\t\r\n\t\treturn deferred.promise\r\n\t}\r\n\r\n}\r\n```\r\n\r\n\r\nUsage example:\r\n`<ion-img [src]=\"user_id | resolveImage:'CXPerson' | async\"></ion-img>`\r\n\r\n**Other information:**\r\n<!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. -->\r\n\r\n**Ionic info:** (run `ionic info` from a terminal/cmd prompt and paste output below):\r\n\r\n```\r\nYour system information:\r\n\r\nCordova CLI: 6.3.1 \r\nIonic Framework Version: 2.0.0-rc.4\r\nIonic CLI Version: 2.1.17\r\nIonic App Lib Version: 2.1.7\r\nIonic App Scripts Version: 0.0.47\r\nios-deploy version: Not installed\r\nios-sim version: Not installed\r\nOS: Linux 4.4\r\nNode Version: v6.7.0\r\nXcode version: Not installed\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic/issues/comments/267826801","html_url":"https://github.com/driftyco/ionic/issues/9691#issuecomment-267826801","issue_url":"https://api.github.com/repos/driftyco/ionic/issues/9691","id":267826801,"user":{"login":"lufias","id":5868109,"avatar_url":"https://avatars.githubusercontent.com/u/5868109?v=3","gravatar_id":"","url":"https://api.github.com/users/lufias","html_url":"https://github.com/lufias","followers_url":"https://api.github.com/users/lufias/followers","following_url":"https://api.github.com/users/lufias/following{/other_user}","gists_url":"https://api.github.com/users/lufias/gists{/gist_id}","starred_url":"https://api.github.com/users/lufias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lufias/subscriptions","organizations_url":"https://api.github.com/users/lufias/orgs","repos_url":"https://api.github.com/users/lufias/repos","events_url":"https://api.github.com/users/lufias/events{/privacy}","received_events_url":"https://api.github.com/users/lufias/received_events","type":"User","site_admin":false},"created_at":"2016-12-18T15:15:10Z","updated_at":"2016-12-18T15:15:10Z","body":"Comparing img.ts from both RC3 and RC4, i saw quite some changes. It appear to me that in RC3 there is some kind of check to see if the src truly present before proceed any futher."}}
{"actor":{"display_login":"lufias"}}