# Can not access node solid development server localhost

**URL:** <https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377>\
**Category:** General Discussion\
**Created:** [June 9, 2021, 5:36am UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377 "2021-06-09T05:36:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tapu106](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/tapu106/32/2035_2.png) [@Tapu106](https://forum.solidproject.org/u/Tapu106)\
**Post date:** [June 9, 2021, 5:36am UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/1 "2021-06-09T05:36:11Z")

</div>

Hello everyone. I am new to solid. I’ve been trying to integrate ExpressJS with node solid client using [node-solid-client](https://github.com/solid/solid-node-client). But when I use the development node solid server using localhost, express can not access the [https://localhost:8443](https://localhost:8443) . I am uploading my express server on Docker. My Code is given below

```auto
console.log("done");
  try {
    console.log("try ")
    let ses = await client.login({
      idp: YOUR_IDENTITY_PROVIDER, // e.g. https://localhost:8443
      username: "my username",
      password: "my password",
    });
    console.log(ses.isLoggedIn);
    return res.send("hi");
  } catch (error) {
    console.log(error.message);
  }

```

Instead, it prints the console and ses.isLoggedIn returns false. But if I use [https://solidcommunity.net](https://solidcommunity.net) , it works. What could be the error here? Can anybody help please?  
My console:  
 ![Screenshot from 2021-06-09 11-34-43](https://europe1.discourse-cdn.com/flex017/uploads/solidproject/original/2X/f/f12621e8b4c05dab4ca0a01437d55472a402d703.png)

---

<div class="post-metadata">

**Author:** ![jeffz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/jeffz/32/600_2.png) [@jeffz](https://forum.solidproject.org/u/jeffz)\
**Post date:** [June 9, 2021, 6:32am UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/2 "2021-06-09T06:32:11Z")

</div>

[Solidcommunity.net](http://Solidcommunity.net) is using v5.6.6. Are you using the same version? Do you have version 2.0.5 of solid-node-client? I can’t see enough of the log to figure anything out, can you show more?

---

<div class="post-metadata">

**Author:** ![Tapu106](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/tapu106/32/2035_2.png) [@Tapu106](https://forum.solidproject.org/u/Tapu106)\
**Post date:** [June 9, 2021, 6:58am UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/3 "2021-06-09T06:58:18Z")

</div>

I have an account on [SolidCommunity.net](http://SolidCommunity.net) just. I am using solid-node-client 2.0.4. Actually, my error logs nothing shows more than the screenshot I provided in the post. Another thing, I am running my express server on Docker . My route:

 ![Screenshot from 2021-06-09 12-56-45](https://europe1.discourse-cdn.com/flex017/uploads/solidproject/original/2X/a/ae0e10875833c034267cc70d537c8450b1b95d46.png)

Error:

 ![Screenshot from 2021-06-09 12-57-47](https://europe1.discourse-cdn.com/flex017/uploads/solidproject/original/2X/d/d043c8d50d77c594beed9cab6e4929aaa67eea21.png)

---

<div class="post-metadata">

**Author:** ![jeffz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/jeffz/32/600_2.png) [@jeffz](https://forum.solidproject.org/u/jeffz)\
**Post date:** [June 9, 2021, 6:09pm UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/4 "2021-06-09T18:09:40Z")

</div>

Ah, I just though of something - have you set solid-node-client as a trustedApp on your localhhost? You’ll need to use the databrowser on the localhost and set [https://solid-node-client](https://solid-node-client) as a trustedApp. Let me know if that fixes it for you.

---

<div class="post-metadata">

**Author:** ![Tapu106](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/tapu106/32/2035_2.png) [@Tapu106](https://forum.solidproject.org/u/Tapu106)\
**Post date:** [June 9, 2021, 7:40pm UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/5 "2021-06-09T19:40:31Z")

</div>

I already tried that, but didn’t work.

 ![Screenshot from 2021-06-10 00-17-10](https://europe1.discourse-cdn.com/flex017/uploads/solidproject/original/2X/4/4e712cb50cfc4b3245ad098d44d606b0d33c5096.png)

---

<div class="post-metadata">

**Author:** ![jeffz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/jeffz/32/600_2.png) [@jeffz](https://forum.solidproject.org/u/jeffz)\
**Post date:** [June 9, 2021, 7:55pm UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/6 "2021-06-09T19:55:39Z")

</div>

Hmm, maybe ask your question in the [gitter chat room for NSS](https://gitter.im/solid/node-solid-server) .

---

<div class="post-metadata">

**Author:** ![ewingson](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/ewingson/32/454_2.png) [@ewingson](https://forum.solidproject.org/u/ewingson)\
**Post date:** [July 1, 2021, 8:01am UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/7 "2021-07-01T08:01:00Z")

</div>

@Tapu106 maybe the `require/import` of the auth-library doesn’ t work proper, but that’s just a thought from the tip of my head…

---

<div class="post-metadata">

**Author:** ![Tapu106](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/tapu106/32/2035_2.png) [@Tapu106](https://forum.solidproject.org/u/Tapu106)\
**Post date:** [July 1, 2021, 4:05pm UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/8 "2021-07-01T16:05:48Z")

</div>

Did you mean requiring the node-solid-client part? If that’s the case, I also tested solid community pod. Authentication works just fine. But in the case of my local host, solid server pod doesn’t work. As I’ve given my code and the console part, you can see there isn’t any essential information about the error on the console.

---

<div class="post-metadata">

**Author:** ![jeffz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/jeffz/32/600_2.png) [@jeffz](https://forum.solidproject.org/u/jeffz)\
**Post date:** [July 1, 2021, 4:19pm UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/9 "2021-07-01T16:19:38Z")

</div>

Just in case … could you show the part where you import Solid-Node-Client and create the client object?

---

<div class="post-metadata">

**Author:** ![Tapu106](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/tapu106/32/2035_2.png) [@Tapu106](https://forum.solidproject.org/u/Tapu106)\
**Post date:** [July 1, 2021, 4:28pm UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/10 "2021-07-01T16:28:38Z")

</div>

Sure. The screenshot is given below:

 ![Screenshot from 2021-07-01 22-29-31](https://europe1.discourse-cdn.com/flex017/uploads/solidproject/original/2X/4/4448a178c9a9230e551f3b6385c7924a8acce0f8.png)

---

<div class="post-metadata">

**Author:** ![jeffz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/jeffz/32/600_2.png) [@jeffz](https://forum.solidproject.org/u/jeffz)\
**Post date:** [July 1, 2021, 4:31pm UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/11 "2021-07-01T16:31:08Z")

</div>

Well, that looks fine. Maybe, instead of redirecting in your test code above, try to read or write a private file. Perhaps isLoggedIn is giving a false negative.

---

<div class="post-metadata">

**Author:** ![Tapu106](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/tapu106/32/2035_2.png) [@Tapu106](https://forum.solidproject.org/u/Tapu106)\
**Post date:** [July 2, 2021, 8:03am UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/12 "2021-07-02T08:03:18Z")

</div>

I’ve consoled my session information.But it returns as “undefined” object.

---

<div class="post-metadata">

**Author:** ![Tapu106](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/tapu106/32/2035_2.png) [@Tapu106](https://forum.solidproject.org/u/Tapu106)\
**Post date:** [July 2, 2021, 8:45am UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/13 "2021-07-02T08:45:54Z")

</div>

Off topic, sorry. Not sure if I should ask this in another discussion post. Instead local host I’ve added solid community as pod temporarily. Now I have my webID. How can I retrieve my profile information from webID using solid-node-client? I’ve tried installing rdflib but rdflib is giving error with nodejs 10 in which I am currently working on.

---

<div class="post-metadata">

**Author:** ![jeffz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/jeffz/32/600_2.png) [@jeffz](https://forum.solidproject.org/u/jeffz)\
**Post date:** [July 2, 2021, 3:10pm UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/14 "2021-07-02T15:10:48Z")

</div>

OH! There are several other needed libraries in addition to rdflib that require a minimum of node 12. I’m afraid your only option is to upgrade your node.

Here’s how to retrieve a profile from a WebID using Solid-Node-Client:

```javascript
/* Follow-Your-Nose (traversal)                                                 
   ----------------------------                                                 
   opens a profile                                                              
   finds the prefernces file in the profile                                     
   opens the preferences file                                                   
   finds the preferred mailbox in the preferences file                          
*/                                                                              
import {SolidNodeClient} from 'solid-node-client';                              
let client = new SolidNodeClient();                                             
import * as $rdf from 'rdflib';                                                 
const kb = $rdf.graph();                                                        
const fetcher = $rdf.fetcher(kb,{fetch:client.fetch.bind(client)});             
                                                                                
const webid = "https://jeff-zucker.solidcommunity.net/profile/card#me";         
const profile = $rdf.sym(webid).doc();                                          
const me = $rdf.sym(webid);                                                     
                                                                                
const foaf = $rdf.Namespace('http://xmlns.com/foaf/0.1/');                      
const pim = $rdf.Namespace('http://www.w3.org/ns/pim/space#');                  
                                                                                
async function main(){                                                          
  await client.login(); // grabs credentials from environ vars                  
  await fetcher.load(profile);                                                  
  let myPrefs = kb.any( me, pim('preferencesFile') );                           
  await fetcher.load(myPrefs);                                                  
  let mbox = kb.any( me,foaf('mbox'));                                          
  console.log(mbox.value);                                                      
}                                                                               
main(); 

```

---

<div class="post-metadata">

**Author:** ![Tapu106](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/tapu106/32/2035_2.png) [@Tapu106](https://forum.solidproject.org/u/Tapu106)\
**Post date:** [July 2, 2021, 8:20pm UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/15 "2021-07-02T20:20:42Z")

</div>

Oh…Thank you very much. But how can solve this problem mentioned before. A note, I am accessing localhost:8443 from docker.Is there any issue for this?

---

<div class="post-metadata">

**Author:** ![jeffz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/jeffz/32/600_2.png) [@jeffz](https://forum.solidproject.org/u/jeffz)\
**Post date:** [July 2, 2021, 8:22pm UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/16 "2021-07-02T20:22:18Z")

</div>

The problem is that solid-node-client requires at least version 12 of nodejs. It will not work with version 10, sorry.

---

<div class="post-metadata">

**Author:** ![Tapu106](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/tapu106/32/2035_2.png) [@Tapu106](https://forum.solidproject.org/u/Tapu106)\
**Post date:** [July 2, 2021, 8:31pm UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/17 "2021-07-02T20:31:50Z")

</div>

Oh sorry. I was talking about the problem I have posted here. How can I access my localhost pod using solid-node-client.?

---

<div class="post-metadata">

**Author:** ![jeffz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/jeffz/32/600_2.png) [@jeffz](https://forum.solidproject.org/u/jeffz)\
**Post date:** [July 2, 2021, 8:33pm UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/18 "2021-07-02T20:33:52Z")

</div>

With the same methods you have used but the correct node version.

---

<div class="post-metadata">

**Author:** ![Tapu106](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/tapu106/32/2035_2.png) [@Tapu106](https://forum.solidproject.org/u/Tapu106)\
**Post date:** [July 5, 2021, 5:03am UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/19 "2021-07-05T05:03:02Z")

</div>

Hi! About local NSS. I am not sure about the installation of NSS on my PC. I want to install solid on development environment . That’s why I am using self-signed certificates. I followed [Solid server Running in development environments](https://github.com/solid/node-solid-server) section. Now any specific action I should be concerned about?I followed these steps:

1. cloned the NSS into my pc.
2. generated self-signed certificates
3. in NSS directory, followed commands to setup server

```auto
{
  "root": "/home/csepc09/Documents/node-solid-server/data",
  "port": "8443",
  "serverUri": "https://localhost:8443",
  "webid": true,
  "mount": "/",
  "configPath": "./config",
  "configFile": "./config.json",
  "dbPath": "./.db",
  "sslKey": "/home/csepc09/Documents/privkey.pem",
  "sslCert": "/home/csepc09/Documents/fullchain.pem",
  "multiuser": false,
  "server": {
    "name": "localhost",
    "description": "",
    "logo": ""
  }
}

```

1. then /bin/solid-test start  
Is there any mistake with my installation? My NSS runs just fine on my localhost.

---

<div class="post-metadata">

**Author:** ![Tapu106](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/tapu106/32/2035_2.png) [@Tapu106](https://forum.solidproject.org/u/Tapu106)\
**Post date:** [July 7, 2021, 2:22pm UTC](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377/20 "2021-07-07T14:22:27Z")

</div>

@jeffz I just noticed that when I started my local NSS pod, it shows “auth-method: oidc”. But I am not using any oidc token. Now I want to try without oidc. How should I proceed?  
My screenshot:

 ![Screenshot from 2021-07-07 20-07-45](https://europe1.discourse-cdn.com/flex017/uploads/solidproject/original/2X/9/98badad39f71e8a8bd31f7be3a6f67aac3b1d423.png)

[Next page](https://forum.solidproject.org/t/can-not-access-node-solid-development-server-localhost/4377.md?page=2)
