strongloop / loopback-example-passport

LoopBack example for facebook login
Other
185 stars 134 forks source link

Missing page #46

Closed PhilippeCorreges closed 9 years ago

PhilippeCorreges commented 9 years ago

500 Error: Failed to lookup view "pages/link" in views directory

The Jade page does not exist

superkhau commented 9 years ago

Can you provide a link to a test project on GitHub? See https://github.com/strongloop/loopback/wiki/Issues#bug-report

PhilippeCorreges commented 9 years ago

Hi Simon,

My repos are private but here is a way to reproduce :

Cheers

Philippe

Le 27 août 2015 à 02:12, Simon Ho notifications@github.com a écrit :

Can you provide a link to a test project on GitHub? See https://github.com/strongloop/loopback/wiki/Issues#bug-report https://github.com/strongloop/loopback/wiki/Issues#bug-report — Reply to this email directly or view it on GitHub https://github.com/strongloop/loopback-example-passport/issues/46#issuecomment-135214157.

GeoffreyEmery commented 9 years ago

here is a repo i am not sure why i am providing this but wheatever... https://github.com/GeoffreyEmery/Loopback-AuthBug as you can see there is no view with /link in the partial view directory causing a error when you click on the link account buttons this was caused by this checkin https://github.com/dstroot/loopback-example-passport/commit/f3d2845311f83be5aa66f22140a3cd1ed5743906 and is linked to these other same issues https://github.com/strongloop/loopback-example-passport/issues/28 https://github.com/strongloop/loopback-example-passport/issues/46 https://github.com/strongloop/loopback-example-passport/pull/35 https://github.com/strongloop/loopback-example-passport/pull/18

superkhau commented 9 years ago

@jannyHou Please try to reproduce this locally with the sample repo provided by @GeoffreyEmery to confirm the issue.

jannyHou commented 9 years ago

@superkhau yeah I can reproduce that error:

Express
500 Error: Failed to lookup view "pages/link" in views directory "C:\Users\IBM_ADMIN\Desktop\passport-sample\Loopback-AuthBug\server\views"

       at EventEmitter.render (C:\Users\IBM_ADMIN\Desktop\passport-sample\Loopback-AuthBug\node_modules\express\lib\application.js:579:17)
       at ServerResponse.render (C:\Users\IBM_ADMIN\Desktop\passport-sample\Loopback-AuthBug\node_modules\express\lib\response.js:961:7)
       at ServerResponse.res.render (C:\Users\IBM_ADMIN\Desktop\passport-sample\Loopback-AuthBug\node_modules\express-flash\lib\express-flash.js:29:16)
       at C:\Users\IBM_ADMIN\Desktop\passport-sample\Loopback-AuthBug\server\server.js:154:7
       at Layer.handle [as handle_request] (C:\Users\IBM_ADMIN\Desktop\passport-sample\Loopback-AuthBug\node_modules\express\lib\router\layer.js:95:5)
       at next (C:\Users\IBM_ADMIN\Desktop\passport-sample\Loopback-AuthBug\node_modules\express\lib\router\route.js:131:13)
       at Route.dispatch (C:\Users\IBM_ADMIN\Desktop\passport-sample\Loopback-AuthBug\node_modules\express\lib\router\route.js:112:3)
       at Layer.handle [as handle_request] (C:\Users\IBM_ADMIN\Desktop\passport-sample\Loopback-AuthBug\node_modules\express\lib\router\layer.js:95:5)
       at C:\Users\IBM_ADMIN\Desktop\passport-sample\Loopback-AuthBug\node_modules\express\lib\router\index.js:277:22
       at Function.process_params (C:\Users\IBM_ADMIN\Desktop\passport-sample\Loopback-AuthBug\node_modules\express\lib\router\index.js:330:12)
jannyHou commented 9 years ago

@GeoffreyEmery @superkhau And I think the problem is there is no link.jade file in /server/views/pages but the route app.get('/link', function (req, res, next){ res.render('pages/link', { user: req.user, url: req.url }); }); directs to that non-existed page.

superkhau commented 9 years ago

@jannyHou Can you check the history to see if there ever was one? Or else you can just update the example and remove or update that feature accordingly.

jannyHou commented 9 years ago

@superkhau ok, no problem, I will look into it.

superkhau commented 9 years ago

@jannyHou TY.

GeoffreyEmery commented 9 years ago

all you need to do is go back to the checkin i listed above that is the last refrence

jannyHou commented 9 years ago

hey @superkhau link.htmlexisted before, from the history file we can know that it implemented the same function(link social account to local account) as this code we have now So it's only a duplicate link that appears on index page. I will create a pr to delete it, then that would be done.

jannyHou commented 9 years ago

Fixed in this pr: https://github.com/strongloop/loopback-example-passport/pull/55

handonam commented 8 years ago

Per https://github.com/strongloop/loopback-example-passport/issues/46#issuecomment-156450649

app.get('/link', function (req, res, next){
  res.render('pages/link', {
    user: req.user,
    url: req.url
  });
});

Should this line be removed since it doesn't have a page there? I was confused as to why it's still there when looking over the example.

jannyHou commented 8 years ago

@handonam Thanks! I should remove that together. I will delete it ASAP.