{"action":"created","issue":{"url":"https://api.github.com/repos/expo/expo/issues/370","repository_url":"https://api.github.com/repos/expo/expo","labels_url":"https://api.github.com/repos/expo/expo/issues/370/labels{/name}","comments_url":"https://api.github.com/repos/expo/expo/issues/370/comments","events_url":"https://api.github.com/repos/expo/expo/issues/370/events","html_url":"https://github.com/expo/expo/issues/370","id":243064615,"number":370,"title":"[Android] Sometimes image URL requests do not have session cookies attached","user":{"login":"llamaluvr","id":8053974,"avatar_url":"https://avatars1.githubusercontent.com/u/8053974?v=4","gravatar_id":"","url":"https://api.github.com/users/llamaluvr","html_url":"https://github.com/llamaluvr","followers_url":"https://api.github.com/users/llamaluvr/followers","following_url":"https://api.github.com/users/llamaluvr/following{/other_user}","gists_url":"https://api.github.com/users/llamaluvr/gists{/gist_id}","starred_url":"https://api.github.com/users/llamaluvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llamaluvr/subscriptions","organizations_url":"https://api.github.com/users/llamaluvr/orgs","repos_url":"https://api.github.com/users/llamaluvr/repos","events_url":"https://api.github.com/users/llamaluvr/events{/privacy}","received_events_url":"https://api.github.com/users/llamaluvr/received_events","type":"User","site_admin":false},"labels":[{"id":598253983,"url":"https://api.github.com/repos/expo/expo/labels/project:%20android-runtime","name":"project: android-runtime","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"jesseruder","id":1348527,"avatar_url":"https://avatars1.githubusercontent.com/u/1348527?v=4","gravatar_id":"","url":"https://api.github.com/users/jesseruder","html_url":"https://github.com/jesseruder","followers_url":"https://api.github.com/users/jesseruder/followers","following_url":"https://api.github.com/users/jesseruder/following{/other_user}","gists_url":"https://api.github.com/users/jesseruder/gists{/gist_id}","starred_url":"https://api.github.com/users/jesseruder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesseruder/subscriptions","organizations_url":"https://api.github.com/users/jesseruder/orgs","repos_url":"https://api.github.com/users/jesseruder/repos","events_url":"https://api.github.com/users/jesseruder/events{/privacy}","received_events_url":"https://api.github.com/users/jesseruder/received_events","type":"User","site_admin":false},"assignees":[{"login":"jesseruder","id":1348527,"avatar_url":"https://avatars1.githubusercontent.com/u/1348527?v=4","gravatar_id":"","url":"https://api.github.com/users/jesseruder","html_url":"https://github.com/jesseruder","followers_url":"https://api.github.com/users/jesseruder/followers","following_url":"https://api.github.com/users/jesseruder/following{/other_user}","gists_url":"https://api.github.com/users/jesseruder/gists{/gist_id}","starred_url":"https://api.github.com/users/jesseruder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesseruder/subscriptions","organizations_url":"https://api.github.com/users/jesseruder/orgs","repos_url":"https://api.github.com/users/jesseruder/repos","events_url":"https://api.github.com/users/jesseruder/events{/privacy}","received_events_url":"https://api.github.com/users/jesseruder/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2017-07-14T17:46:51Z","updated_at":"2017-12-20T01:13:42Z","closed_at":null,"author_association":"NONE","body":"Posted this in Slack, recommended that I bring it here:\r\nSometimes when I’m running an app on Expo in Android, images displayed through a URL in an <Image> tag stop showing up. I run the network traffic through a sniffer, and I notice that all the image requests are failing with a 403 forbidden, because my session cookie isn’t on the request. Further, I see that all the image requests have a user-agent of “Dalvik/2.1.0 (Linux; U; Android 6.0.1; Moto G Play Build/MPIS24.241-2.35-1-13)“, instead of “okhttp” like all other requests. It happens most frequently when I switch between viewing an app served on my computer vs one I published. If I kill all Expo windows, sometimes it fixes itself. Sometimes I have to reboot my phone entirely. When it is working again, all image requests have the “okhttp” user agent. It’s like Expo/ RN flips itself to a different network stack just for image requests sometimes.\r\n\r\n----\r\nI've been trying to think of a reliable way to reproduce this and haven't come up with one so far.\r\nIt seemed to happen pretty frequently when I was serving the app from my computer via the CRNA scripts (react-native-scripts) but then switching to using a version I published via the exp command line. When I used one and then the other, image network requests that required a cookie per our API would fail. Closing both apps and Expo and restarting would usually fix the issue.\r\n\r\nHowever, by yesterday, I had switched over to fully using the exp command for everything, but it happened once again. This time, only a reboot of the phone would fix things.\r\n\r\nI am on Expo 18.0.0.6. My phone apps are up-to-date."},"comment":{"url":"https://api.github.com/repos/expo/expo/issues/comments/352935544","html_url":"https://github.com/expo/expo/issues/370#issuecomment-352935544","issue_url":"https://api.github.com/repos/expo/expo/issues/370","id":352935544,"user":{"login":"llamaluvr","id":8053974,"avatar_url":"https://avatars1.githubusercontent.com/u/8053974?v=4","gravatar_id":"","url":"https://api.github.com/users/llamaluvr","html_url":"https://github.com/llamaluvr","followers_url":"https://api.github.com/users/llamaluvr/followers","following_url":"https://api.github.com/users/llamaluvr/following{/other_user}","gists_url":"https://api.github.com/users/llamaluvr/gists{/gist_id}","starred_url":"https://api.github.com/users/llamaluvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llamaluvr/subscriptions","organizations_url":"https://api.github.com/users/llamaluvr/orgs","repos_url":"https://api.github.com/users/llamaluvr/repos","events_url":"https://api.github.com/users/llamaluvr/events{/privacy}","received_events_url":"https://api.github.com/users/llamaluvr/received_events","type":"User","site_admin":false},"created_at":"2017-12-20T01:13:42Z","updated_at":"2017-12-20T01:13:42Z","author_association":"NONE","body":"@ide Are you sure this is okhttp? Cookies work just fine for image and other fetch requests that go through okhttp usually. It’s only when I call Expo.Util.reload() do image requests stop going though okhttp and the user agent changes to “Davlik”, and then cookies stop working."}}
{"actor":{"display_login":"llamaluvr"}}