Closed PhilippeCorreges closed 9 years ago
Can you provide a link to a test project on GitHub? See https://github.com/strongloop/loopback/wiki/Issues#bug-report
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.
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
@jannyHou Please try to reproduce this locally with the sample repo provided by @GeoffreyEmery to confirm the issue.
@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)
@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.
@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.
@superkhau ok, no problem, I will look into it.
@jannyHou TY.
all you need to do is go back to the checkin i listed above that is the last refrence
hey @superkhau link.html
existed 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.
Fixed in this pr: https://github.com/strongloop/loopback-example-passport/pull/55
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.
@handonam Thanks! I should remove that together. I will delete it ASAP.
500 Error: Failed to lookup view "pages/link" in views directory
The Jade page does not exist