{"action":"created","issue":{"url":"https://api.github.com/repos/chrisvfritz/prerender-spa-plugin/issues/181","repository_url":"https://api.github.com/repos/chrisvfritz/prerender-spa-plugin","labels_url":"https://api.github.com/repos/chrisvfritz/prerender-spa-plugin/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/chrisvfritz/prerender-spa-plugin/issues/181/comments","events_url":"https://api.github.com/repos/chrisvfritz/prerender-spa-plugin/issues/181/events","html_url":"https://github.com/chrisvfritz/prerender-spa-plugin/issues/181","id":316027997,"number":181,"title":"Unable to prerender all routes! ","user":{"login":"renatodolce","id":5089350,"avatar_url":"https://avatars0.githubusercontent.com/u/5089350?v=4","gravatar_id":"","url":"https://api.github.com/users/renatodolce","html_url":"https://github.com/renatodolce","followers_url":"https://api.github.com/users/renatodolce/followers","following_url":"https://api.github.com/users/renatodolce/following{/other_user}","gists_url":"https://api.github.com/users/renatodolce/gists{/gist_id}","starred_url":"https://api.github.com/users/renatodolce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renatodolce/subscriptions","organizations_url":"https://api.github.com/users/renatodolce/orgs","repos_url":"https://api.github.com/users/renatodolce/repos","events_url":"https://api.github.com/users/renatodolce/events{/privacy}","received_events_url":"https://api.github.com/users/renatodolce/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-19T20:26:03Z","updated_at":"2018-04-20T12:06:06Z","closed_at":null,"author_association":"NONE","body":"Hello everyone, everything good? I am in trouble, when I run the command npm run build this message appears: \r\n> [prerender-spa-plugin] Unable to prerender all routes!\r\n> (node:24767) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: Protocol error (Page.navigate): Cannot navigate to invalid URL undefined\r\n> (node:24767) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.\r\n\r\nBut my app has a protection (main.js) that depends on a choice to continue.\r\n\r\n```\r\nrouter.beforeEach((to, from, next) => {\r\n  // check if the user item is already set\r\n  if (to.path !== '/painel' && !window.sessionStorage.getItem('programaId')) {\r\n    next('painel')\r\n  } else {\r\n    next()\r\n  }\r\n})\r\n```\r\n\r\nMy question is: is there a way to trigger prerender after that choice?"},"comment":{"url":"https://api.github.com/repos/chrisvfritz/prerender-spa-plugin/issues/comments/383075300","html_url":"https://github.com/chrisvfritz/prerender-spa-plugin/issues/181#issuecomment-383075300","issue_url":"https://api.github.com/repos/chrisvfritz/prerender-spa-plugin/issues/181","id":383075300,"user":{"login":"Tribex","id":5861371,"avatar_url":"https://avatars0.githubusercontent.com/u/5861371?v=4","gravatar_id":"","url":"https://api.github.com/users/Tribex","html_url":"https://github.com/Tribex","followers_url":"https://api.github.com/users/Tribex/followers","following_url":"https://api.github.com/users/Tribex/following{/other_user}","gists_url":"https://api.github.com/users/Tribex/gists{/gist_id}","starred_url":"https://api.github.com/users/Tribex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tribex/subscriptions","organizations_url":"https://api.github.com/users/Tribex/orgs","repos_url":"https://api.github.com/users/Tribex/repos","events_url":"https://api.github.com/users/Tribex/events{/privacy}","received_events_url":"https://api.github.com/users/Tribex/received_events","type":"User","site_admin":false},"created_at":"2018-04-20T12:06:06Z","updated_at":"2018-04-20T12:06:06Z","author_association":"COLLABORATOR","body":"You could use `renderAfterDocumentEvent` and dispatch an event after the relevant components mount. However, it would appear your config contains an `undefined` value as a route, which is causing the error here."}}
{"actor":{"display_login":"Tribex"}}