{"action":"created","issue":{"url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1133","repository_url":"https://api.github.com/repos/nuxt/nuxt.js","labels_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1133/labels{/name}","comments_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1133/comments","events_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1133/events","html_url":"https://github.com/nuxt/nuxt.js/issues/1133","id":244676902,"number":1133,"title":"Fetch and AsyncData not working on reloading page. ","user":{"login":"kardeepak","id":15882804,"avatar_url":"https://avatars3.githubusercontent.com/u/15882804?v=4","gravatar_id":"","url":"https://api.github.com/users/kardeepak","html_url":"https://github.com/kardeepak","followers_url":"https://api.github.com/users/kardeepak/followers","following_url":"https://api.github.com/users/kardeepak/following{/other_user}","gists_url":"https://api.github.com/users/kardeepak/gists{/gist_id}","starred_url":"https://api.github.com/users/kardeepak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kardeepak/subscriptions","organizations_url":"https://api.github.com/users/kardeepak/orgs","repos_url":"https://api.github.com/users/kardeepak/repos","events_url":"https://api.github.com/users/kardeepak/events{/privacy}","received_events_url":"https://api.github.com/users/kardeepak/received_events","type":"User","site_admin":false},"labels":[{"id":469223669,"url":"https://api.github.com/repos/nuxt/nuxt.js/labels/type:%20question","name":"type: question","color":"cc317c","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-07-21T13:57:46Z","updated_at":"2018-04-28T00:44:30Z","closed_at":"2017-07-21T14:55:22Z","author_association":"NONE","body":"```\r\nError: Request failed with status code 404\r\n    at createError (/home/deepak/Linux/NodeJS/FullStack/Notes/WebApp/node_modules/axios/lib/core/createError.js:16:15)\r\n    at settle (/home/deepak/Linux/NodeJS/FullStack/Notes/WebApp/node_modules/axios/lib/core/settle.js:18:12)\r\n    at IncomingMessage.handleStreamEnd (/home/deepak/Linux/NodeJS/FullStack/Notes/WebApp/node_modules/axios/lib/adapters/http.js:191:11)\r\n    at emitNone (events.js:91:20)\r\n    at IncomingMessage.emit (events.js:188:7)\r\n    at endReadableNT (_stream_readable.js:975:12)\r\n    at _combinedTickCallback (internal/process/next_tick.js:80:11)\r\n    at process._tickCallback (internal/process/next_tick.js:104:9)\r\n```\r\nI am fetching data via ajax using axios. When I navigate to the page using a router link, it loads the data but if I reload the page then data disappears and the above error shows up on the backend.\r\nIt is same for both methods 'fetch' & 'asyncData'. \n\n<!--cmty--><!--cmty_prevent_hook-->\n<div align=\"right\"><sub><em>This question is available on <a href=\"https://nuxtjs.cmty.io\">Nuxt.js</a> community (<a href=\"https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c998\">#c998</a>)</em></sub></div>"},"comment":{"url":"https://api.github.com/repos/nuxt/nuxt.js/issues/comments/385126324","html_url":"https://github.com/nuxt/nuxt.js/issues/1133#issuecomment-385126324","issue_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1133","id":385126324,"user":{"login":"qq510846","id":7681405,"avatar_url":"https://avatars2.githubusercontent.com/u/7681405?v=4","gravatar_id":"","url":"https://api.github.com/users/qq510846","html_url":"https://github.com/qq510846","followers_url":"https://api.github.com/users/qq510846/followers","following_url":"https://api.github.com/users/qq510846/following{/other_user}","gists_url":"https://api.github.com/users/qq510846/gists{/gist_id}","starred_url":"https://api.github.com/users/qq510846/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qq510846/subscriptions","organizations_url":"https://api.github.com/users/qq510846/orgs","repos_url":"https://api.github.com/users/qq510846/repos","events_url":"https://api.github.com/users/qq510846/events{/privacy}","received_events_url":"https://api.github.com/users/qq510846/received_events","type":"User","site_admin":false},"created_at":"2018-04-28T00:44:30Z","updated_at":"2018-04-28T00:44:30Z","author_association":"NONE","body":"i found the root of the problem.\r\n\r\ni use the @nuxt/axios, and set the baseURL = '/api',\r\nwhen i remove above setting, add '/api' to url prefix direct, the problem will disappear ~\r\n\r\nis the axios bug? i'm not sure ~"}}
{"actor":{"display_login":"qq510846"}}