{"action":"created","issue":{"url":"https://api.github.com/repos/dwyl/hapi-auth-jwt2/issues/73","labels_url":"https://api.github.com/repos/dwyl/hapi-auth-jwt2/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/dwyl/hapi-auth-jwt2/issues/73/comments","events_url":"https://api.github.com/repos/dwyl/hapi-auth-jwt2/issues/73/events","html_url":"https://github.com/dwyl/hapi-auth-jwt2/issues/73","id":98408452,"number":73,"title":"TypeErrors: jwtString.split and this._next are not functions","user":{"login":"primitive-type","id":1878644,"avatar_url":"https://avatars.githubusercontent.com/u/1878644?v=3","gravatar_id":"","url":"https://api.github.com/users/primitive-type","html_url":"https://github.com/primitive-type","followers_url":"https://api.github.com/users/primitive-type/followers","following_url":"https://api.github.com/users/primitive-type/following{/other_user}","gists_url":"https://api.github.com/users/primitive-type/gists{/gist_id}","starred_url":"https://api.github.com/users/primitive-type/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/primitive-type/subscriptions","organizations_url":"https://api.github.com/users/primitive-type/orgs","repos_url":"https://api.github.com/users/primitive-type/repos","events_url":"https://api.github.com/users/primitive-type/events{/privacy}","received_events_url":"https://api.github.com/users/primitive-type/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-31T14:57:22Z","updated_at":"2015-07-31T15:05:03Z","closed_at":null,"body":"After upgrading from version 4.6.x to 4.7x or 4.8.x I get the following error when running my tests:\r\n\r\n```Debug: internal, implementation, error \r\n    TypeError: jwtString.split is not a function\r\n    at Object.JWT.verify (/.../node_modules/jsonwebtoken/index.js:115:25)\r\n    at /.../node_modules/hapi-auth-jwt2/lib/index.js:39:13\r\n    at keyFunc (/.../node_modules/hapi-auth-jwt2/lib/index.js:30:104)\r\n    at Object.authenticate (/.../node_modules/hapi-auth-jwt2/lib/index.js:31:7)\r\n    at /.../node_modules/hapi/lib/auth.js:227:30\r\n    at internals.Protect.run (/.../node_modules/hapi/lib/protect.js:56:5)\r\n    at authenticate (/.../node_modules/hapi/lib/auth.js:218:26)\r\n    at internals.Auth._authenticate (/.../node_modules/hapi/lib/auth.js:348:5)\r\n    at internals.Auth.authenticate (/.../node_modules/hapi/lib/auth.js:177:17)\r\n    at /.../node_modules/hapi/lib/request.js:370:13\r\n    at iterate (/.../node_modules/hapi/node_modules/items/lib/index.js:35:13)\r\n    at done (/.../node_modules/hapi/node_modules/items/lib/index.js:27:25)\r\n    at /.../node_modules/hapi/node_modules/hoek/lib/index.js:841:22\r\n    at doNTCallback0 (node.js:408:9)\r\n    at process._tickDomainCallback (node.js:378:13)```\r\n\r\nAdditionally, the following error also appears a few times during my tests and seems to be related: \r\n\r\n```Debug: internal, implementation, error \r\n    TypeError: Uncaught error: this._next is not a function\r\n    at Function.internals.response (/.../node_modules/hapi/lib/reply.js:137:14)\r\n    at reply (/.../node_modules/hapi/lib/reply.js:68:22)\r\n    at /.../node_modules/hapi-auth-jwt2/lib/index.js:44:20\r\n    at /.../node_modules/jsonwebtoken/index.js:101:18\r\n    at doNTCallback0 (node.js:408:9)\r\n    at process._tickDomainCallback (node.js:378:13)```\r\n\r\nMy version of hapi is 8.8.1. Everything works perfectly for me up to and including version 4.6.x of hapi-auth-jwt2."},"comment":{"url":"https://api.github.com/repos/dwyl/hapi-auth-jwt2/issues/comments/126720144","html_url":"https://github.com/dwyl/hapi-auth-jwt2/issues/73#issuecomment-126720144","issue_url":"https://api.github.com/repos/dwyl/hapi-auth-jwt2/issues/73","id":126720144,"user":{"login":"nelsonic","id":194400,"avatar_url":"https://avatars.githubusercontent.com/u/194400?v=3","gravatar_id":"","url":"https://api.github.com/users/nelsonic","html_url":"https://github.com/nelsonic","followers_url":"https://api.github.com/users/nelsonic/followers","following_url":"https://api.github.com/users/nelsonic/following{/other_user}","gists_url":"https://api.github.com/users/nelsonic/gists{/gist_id}","starred_url":"https://api.github.com/users/nelsonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nelsonic/subscriptions","organizations_url":"https://api.github.com/users/nelsonic/orgs","repos_url":"https://api.github.com/users/nelsonic/repos","events_url":"https://api.github.com/users/nelsonic/events{/privacy}","received_events_url":"https://api.github.com/users/nelsonic/received_events","type":"User","site_admin":false},"created_at":"2015-07-31T15:05:03Z","updated_at":"2015-07-31T15:05:03Z","body":"@primitive-type thanks for pasting the stack trace. We are looking into it now. "}}