{"action":"created","issue":{"url":"https://api.github.com/repos/bumptech/glide/issues/3246","repository_url":"https://api.github.com/repos/bumptech/glide","labels_url":"https://api.github.com/repos/bumptech/glide/issues/3246/labels{/name}","comments_url":"https://api.github.com/repos/bumptech/glide/issues/3246/comments","events_url":"https://api.github.com/repos/bumptech/glide/issues/3246/events","html_url":"https://github.com/bumptech/glide/issues/3246","id":347268411,"node_id":"MDU6SXNzdWUzNDcyNjg0MTE=","number":3246,"title":"Can't load image from net on 4.7.1","user":{"login":"ildar2","id":13849510,"node_id":"MDQ6VXNlcjEzODQ5NTEw","avatar_url":"https://avatars3.githubusercontent.com/u/13849510?v=4","gravatar_id":"","url":"https://api.github.com/users/ildar2","html_url":"https://github.com/ildar2","followers_url":"https://api.github.com/users/ildar2/followers","following_url":"https://api.github.com/users/ildar2/following{/other_user}","gists_url":"https://api.github.com/users/ildar2/gists{/gist_id}","starred_url":"https://api.github.com/users/ildar2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ildar2/subscriptions","organizations_url":"https://api.github.com/users/ildar2/orgs","repos_url":"https://api.github.com/users/ildar2/repos","events_url":"https://api.github.com/users/ildar2/events{/privacy}","received_events_url":"https://api.github.com/users/ildar2/received_events","type":"User","site_admin":false},"labels":[{"id":46953956,"node_id":"MDU6TGFiZWw0Njk1Mzk1Ng==","url":"https://api.github.com/repos/bumptech/glide/labels/bug","name":"bug","color":"e11d21","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-03T05:54:24Z","updated_at":"2018-08-25T07:55:33Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nPlease fill in the below fields with some data to help us best diagnose the issue.\r\nThe more specific you are, the better! You can help a lot by not making us ask these questions.\r\nFeel free to remove any irrelevant parts that you know are not related to the issue.\r\nAny HTML comment like this will be stripped when rendering markdown, no need to delete them.\r\n-->\r\n<!-- What version of Glide you're running, for example: 3.7.1 | 3.8.0-SNAPSHOT | 4.0.0-SNAPSHOT\r\nIt's essentially the version number from your build.gradle: `dependencies { compile '...:x.y.z' }` -->\r\n**Glide 4.7.1**\r\n<!-- What devices you managed to get the issue to come up on? For example:\r\nfails on Galaxy S4/GT-I9500 4.4.2, works fine on Nexus 6P 5.1 and Genymotion Nexus 5 5.0.1 -->\r\n**Device**: Xiaomi 5A\r\n\r\n<!-- Share the details of your issue in prose, detailing actual and expected behavior. It also helps if you give some info **why** you are trying to do something as opposed to **what** is not working. -->\r\nI couldn't reproduce it in clean environment - I've got a list, in which I load url. If I use hardcoded url, it works, If I use Glide 4.4.0 (as mentioned in [issue #2824:](https://github.com/bumptech/glide/issues/2824)) it works. But if I use dynamic url on 4.7.1, it throws exception.\r\n\r\n<!-- How do you use Glide?\r\nMake sure you include everything as is in your app's code:\r\nChanging a single method parameter can yield totally different results.\r\nPlease clarify any magic variables that appear in the code, for example: \"// `this` is a Fragment\"\r\n-->\r\n**Glide load line**:\r\n```java\r\nTimber.w(\"binding image: '%s'\", image);\r\nGlide.with(binding.bgImage)\r\n    .load(image.trim())//not working (tried with/without trim())\r\n//    .load(\"https://ms-dev.beeline.uz/binaries/content/gallery/mainsite/backgrounds-all/1200x600_bravo-online.jpg\")//working\r\n    .into(binding.bgImage);\r\n```\r\n\r\n<!-- How does your app look like?\r\nWe're most interested in the layout attributes and the hierarchy around the ImageView -->\r\n**Layout XML**:\r\n```xml\r\n<ImageView\r\n    android:id=\"@+id/bg_image\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"160dp\"\r\n    android:scaleType=\"centerCrop\"\r\n    android:src=\"@drawable/sample\" />\r\n```\r\n\r\n<!--\r\nWhat is the error message that you got in the log?\r\nYou can find some help on diagnosing issues here: https://github.com/bumptech/glide/wiki/Debugging-and-Error-Handling\r\n-->\r\n**Stack trace / LogCat**:\r\n```ruby\r\nBalanceViewHolder: binding image: 'https://ms-dev.beeline.uz/binaries/content/gallery/mainsite/backgrounds-all/1200x600_status-bonusi-news.jpg'\r\nW/Glide: Load failed for https://ms-dev.beeline.uz/binaries/content/gallery/mainsite/backgrounds-all/1200x600_status-bonusi-news.jpg with size [656x320]\r\n    class com.bumptech.glide.load.engine.GlideException: Failed to load resource\r\n    There was 1 cause:\r\n    java.lang.IndexOutOfBoundsException(Index: 0, Size: 0)\r\n     call GlideException#logRootCauses(String) for more detail\r\n      Cause (1 of 1): class java.lang.IndexOutOfBoundsException: Index: 0, Size: 0\r\n08-03 11:36:31.228 5804-5804/uz.beeline.my I/Glide: Root cause (1 of 1)\r\n    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0\r\n        at java.util.ArrayList.get(ArrayList.java:411)\r\n        at java.util.Collections$UnmodifiableList.get(Collections.java:1295)\r\n        at com.bumptech.glide.load.engine.ResourceCacheGenerator.startNext(ResourceCacheGenerator.java:71)\r\n        at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302)\r\n        at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269)\r\n        at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233)\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)\r\n        at java.lang.Thread.run(Thread.java:760)\r\n        at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)\r\n```\r\n\r\n<!-- Bonus points if you attach a relevant screenshot, screen recording or a small demo project -->\r\n"},"comment":{"url":"https://api.github.com/repos/bumptech/glide/issues/comments/415950891","html_url":"https://github.com/bumptech/glide/issues/3246#issuecomment-415950891","issue_url":"https://api.github.com/repos/bumptech/glide/issues/3246","id":415950891,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTk1MDg5MQ==","user":{"login":"ildar2","id":13849510,"node_id":"MDQ6VXNlcjEzODQ5NTEw","avatar_url":"https://avatars3.githubusercontent.com/u/13849510?v=4","gravatar_id":"","url":"https://api.github.com/users/ildar2","html_url":"https://github.com/ildar2","followers_url":"https://api.github.com/users/ildar2/followers","following_url":"https://api.github.com/users/ildar2/following{/other_user}","gists_url":"https://api.github.com/users/ildar2/gists{/gist_id}","starred_url":"https://api.github.com/users/ildar2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ildar2/subscriptions","organizations_url":"https://api.github.com/users/ildar2/orgs","repos_url":"https://api.github.com/users/ildar2/repos","events_url":"https://api.github.com/users/ildar2/events{/privacy}","received_events_url":"https://api.github.com/users/ildar2/received_events","type":"User","site_admin":false},"created_at":"2018-08-25T07:55:33Z","updated_at":"2018-08-25T07:55:33Z","author_association":"NONE","body":"Update: still occurs on version 4.8.0\r\n`W/Glide: Load failed for https://ms-dev.beeline.uz/binaries/content/gallery/mainsite/icons/internet/internet-web-sites.svg with size [32x32]\r\n         class com.bumptech.glide.load.engine.GlideException: Failed to load resource`"}}
{"actor":{"display_login":"ildar2"}}