code-with-sam / steemconnect-node-js-boilerplate

Express.js App Boilerplate using Steemconnect SDK & Steem.js
MIT License
11 stars 5 forks source link

Having errors with newly created account. #2

Open anilkilic opened 6 years ago

anilkilic commented 6 years ago

Hey Sam,

I created an account through steemconnect and when I tried to log-in with it, I get the following error. account: https://steemd.com/@anilkilic

Cannot read property 'about' of undefined
TypeError: Cannot read property 'about' of undefined
    at router.get (/Users/anilkilic/Documents/javascript/steemconnect-node-js-boilerplate/routes/user.js:16:37)
    at Layer.handle [as handle_request] (/Users/anilkilic/Documents/javascript/steemconnect-node-js-boilerplate/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/anilkilic/Documents/javascript/steemconnect-node-js-boilerplate/node_modules/express/lib/router/route.js:137:13)
    at module.exports.isAuthenticated (/Users/anilkilic/Documents/javascript/steemconnect-node-js-boilerplate/modules/util.js:12:14)
    at Layer.handle [as handle_request] (/Users/anilkilic/Documents/javascript/steemconnect-node-js-boilerplate/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/anilkilic/Documents/javascript/steemconnect-node-js-boilerplate/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/Users/anilkilic/Documents/javascript/steemconnect-node-js-boilerplate/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/Users/anilkilic/Documents/javascript/steemconnect-node-js-boilerplate/node_modules/express/lib/router/layer.js:95:5)
    at /Users/anilkilic/Documents/javascript/steemconnect-node-js-boilerplate/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/Users/anilkilic/Documents/javascript/steemconnect-node-js-boilerplate/node_modules/express/lib/router/index.js:335:12)

I'm not sure if it was default or not but I'm pretty sure I didn't touched that account yet. So its steemconnect.json_metadata returns '{}' instead of '' or undefined. edit: https://steemd.com/tx/17902fcf836d2c35935e97779aff267bb8baaedc Here it's set to '{}' if the first thing is authenticate the application.

https://github.com/code-with-sam/steemconnect-node-js-boilerplate/blob/da4e1d7209b0e72efaf4981b26a0af4aa0270f27/routes/user.js#L8

Thanks for the boilerplate again. It will help me a lot.

Sambillingham commented 6 years ago

Thanks for the issue @anilkilic, I've not had a chance to check this but what you say about returning {} is probably right. I'll update this in the next couple days and have some bigger additions for the boilerplate too.

anilkilic commented 6 years ago

Hey again, I recently able to get back to this project. I just noticed that @anilkilic account doesn't return anything because of the same empty javascript object. When I updated my profile through steemit I finally able to see my profile information screenshot below, but my post is not showing this time. I'm digging it why. I can't reach to my post through url aswell, I believe both happening due to the same issue, I'll let you know if I can find the reason,

Peace ✌️

screen shot 2018-04-23 at 06 49 33

code-with-sam commented 6 years ago

hey @anilkilic I just updated the boilerplate to a new version with a few extra features and this is mostly cleared up. I still need to add a fallback for the profile image but it no longer breaks the page load.