Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[contacts] Error: Fetcher: <http://localhost:3000/alice/public-contacts/index.ttl> Unauthorized #98

Closed
michielbdejong opened this issue Mar 24, 2024 · 2 comments

Comments

@michielbdejong
Copy link
Collaborator

In the contacts/ folder I tried:

npm ci
npm run build
npm run pod

And then in a second window, reading the public contacts failed:

michiel-2:contacts michiel$ node ./examples/read-address-book.mjs
/Users/michiel/gh/solid-contrib/data-modules/contacts/node_modules/rdflib/lib/fetcher.js:1048
      var err = new Error('Fetcher: ' + errorMessage);
                ^

Error: Fetcher: <http://localhost:3000/alice/public-contacts/index.ttl> Unauthorized
    at Fetcher.failFetch (/Users/michiel/gh/solid-contrib/data-modules/contacts/node_modules/rdflib/lib/fetcher.js:1048:17)
    at /Users/michiel/gh/solid-contrib/data-modules/contacts/node_modules/rdflib/lib/fetcher.js:1706:26
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fetchNode (file:///Users/michiel/gh/solid-contrib/data-modules/contacts/dist/rdflib/web-operations/fetchNode.js:3:9)
    at async ContactsModuleRdfLib.readAddressBook (file:///Users/michiel/gh/solid-contrib/data-modules/contacts/dist/rdflib/ContactsModuleRdfLib.js:25:9)
    at async file:///Users/michiel/gh/solid-contrib/data-modules/contacts/examples/read-address-book.mjs:9:16 {
  status: 401,
  statusText: '<http://localhost:3000/alice/public-contacts/index.ttl> Unauthorized',
  response: Response {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: {
      body: PassThrough {
        _events: {
[...]

I also see no public-contacts folder on http://localhost:3000/alice/ although I do see it in https://github.com/solid-contrib/data-modules/tree/main/contacts/dev-server/initial-data/alice

@michielbdejong
Copy link
Collaborator Author

dev-server logs:

2024-03-24T10:57:32.441Z [HandlerServerConfigurator] {Primary} info: Received GET request for /alice/public-contacts/index.ttl
2024-03-24T10:57:32.446Z [WebAclReader] {Primary} info: Found applicable ACL document http://localhost:3000/alice/.acl
2024-03-24T10:57:32.450Z [PermissionBasedAuthorizer] {Primary} warn: Unauthenticated agent has no read permissions

And that second line is weird because it should find https://github.com/solid-contrib/data-modules/blob/main/contacts/dev-server/initial-data/alice/public-contacts/index.ttl.acl applicable. Maybe I have an old data dir on my laptop and it's not deploying the fixture?

@michielbdejong
Copy link
Collaborator Author

Ah yes, fixed after npm run pod:clean and npm run pod:init!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant