{"action":"created","issue":{"url":"https://api.github.com/repos/conan-io/conan/issues/2972","repository_url":"https://api.github.com/repos/conan-io/conan","labels_url":"https://api.github.com/repos/conan-io/conan/issues/2972/labels{/name}","comments_url":"https://api.github.com/repos/conan-io/conan/issues/2972/comments","events_url":"https://api.github.com/repos/conan-io/conan/issues/2972/events","html_url":"https://github.com/conan-io/conan/issues/2972","id":328112077,"node_id":"MDU6SXNzdWUzMjgxMTIwNzc=","number":2972,"title":"Error while trying to get recipe sources for <PACKAGE> No remote defined.","user":{"login":"hamparawa","id":3455428,"node_id":"MDQ6VXNlcjM0NTU0Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/3455428?v=4","gravatar_id":"","url":"https://api.github.com/users/hamparawa","html_url":"https://github.com/hamparawa","followers_url":"https://api.github.com/users/hamparawa/followers","following_url":"https://api.github.com/users/hamparawa/following{/other_user}","gists_url":"https://api.github.com/users/hamparawa/gists{/gist_id}","starred_url":"https://api.github.com/users/hamparawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamparawa/subscriptions","organizations_url":"https://api.github.com/users/hamparawa/orgs","repos_url":"https://api.github.com/users/hamparawa/repos","events_url":"https://api.github.com/users/hamparawa/events{/privacy}","received_events_url":"https://api.github.com/users/hamparawa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-31T12:07:28Z","updated_at":"2018-05-31T16:26:25Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nI am receiving frequent errors with the following message when I am trying to install a package.\r\n```\r\nERROR: Error while trying to get recipe sources for MyPackage/0.1.0@demo/testing. No remote defined\r\n```\r\nBut when I have checked whether the package exists in the remote using following command,\r\n\r\n```\r\nconan search -r server MyPackage/0.1.0@demo/testing\r\n```\r\nIt returns,\r\n```\r\nThere are no packages for reference 'MyPackage/0.1.0@demo/testing', but package recipe found.\r\n```\r\n\r\nWhen looking at the conan source, seems like the problem originates from [here](https://github.com/conan-io/conan/blob/develop/conans/client/source.py#L32)\r\n\r\n```\r\n    # If not path to sources exists, we have a problem, at least an empty folder\r\n    # should be there\r\n    current_remote = registry.get_ref(conan_reference)\r\n    if not current_remote:\r\n        raise ConanException(\"Error while trying to get recipe sources for %s. \"\r\n                             \"No remote defined\" % str(conan_reference))\r\n\r\n```\r\nBut when I look at the ~/.conan/registry.txt, it only contains the following line.\r\n\r\n```\r\nserver http://192.168.8.100:9300 True\r\n```\r\n\r\nI guess conan expects this file to contain the recipes mapped into their respective remote in this file. \r\nAs a workaround, I can manually add the recipe to the file using following command.\r\n\r\n```\r\nconan remote add_ref MyPackage/0.1.0@demo/testing server\r\n```\r\nThen it seems to work fine for a while, but then the error pops up after some time. Any ideas of what causes this issue?\r\nThanks,\r\n\r\nI have tested with Conan 1.4.0.\r\n\r\n- [x] I've read the [CONTRIBUTING guide](https://raw.githubusercontent.com/conan-io/conan/develop/.github/CONTRIBUTING.md).\r\n- [x] I've specified the Conan version, operating system version and any tool that can be relevant.\r\n- [x] I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/conan-io/conan/issues/comments/393591007","html_url":"https://github.com/conan-io/conan/issues/2972#issuecomment-393591007","issue_url":"https://api.github.com/repos/conan-io/conan/issues/2972","id":393591007,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzU5MTAwNw==","user":{"login":"hamparawa","id":3455428,"node_id":"MDQ6VXNlcjM0NTU0Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/3455428?v=4","gravatar_id":"","url":"https://api.github.com/users/hamparawa","html_url":"https://github.com/hamparawa","followers_url":"https://api.github.com/users/hamparawa/followers","following_url":"https://api.github.com/users/hamparawa/following{/other_user}","gists_url":"https://api.github.com/users/hamparawa/gists{/gist_id}","starred_url":"https://api.github.com/users/hamparawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamparawa/subscriptions","organizations_url":"https://api.github.com/users/hamparawa/orgs","repos_url":"https://api.github.com/users/hamparawa/repos","events_url":"https://api.github.com/users/hamparawa/events{/privacy}","received_events_url":"https://api.github.com/users/hamparawa/received_events","type":"User","site_admin":false},"created_at":"2018-05-31T16:26:25Z","updated_at":"2018-05-31T16:26:25Z","author_association":"NONE","body":"Hi, \r\n> Conan config install if using a remotes.txt file, will overwrite/modify the existing remotes. Did you do it in the middle of operation?\r\n\r\nIn my config zip file, only settings.yml is included. This includes RelWithDebInfo setting (now obsolete) and glibc setting.\r\n\r\nI haven't been able to reproduce with simple command chain, but will try to do it.\r\n\r\nDo you think this has anything to do with proxy caching? My server runs through a proxy server."}}
{"actor":{"display_login":"hamparawa"}}