nodeSolidServer / nodeSolidServer/node-solid-server

500 error on read public document - NamedNode IRI "null" must be absolute.

Đang mở
#1,640 11 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
JavaScript
Star
1.8k
Fork
308
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

A strange obug. When the document is read by a webapp it gets a 500 error, but a simple curl gives 200.

$ curl -I https://solidos.solidcommunity.net/public/2021/10_example_data/example.ttl
HTTP/1.1 200 OK
X-Powered-By: solid-server/5.6.16
Vary: Accept, Authorization, Origin
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate, MS-Author-Via, X-Powered-By
Allow: OPTIONS, HEAD, GET, PATCH, POST, PUT, DELETE
Link: <example.ttl.acl>; rel="acl", <example.ttl.meta>; rel="describedBy", <http://www.w3.org/ns/ldp#Resource>; rel="type"
WAC-Allow: user="read write append",public="read write append"
MS-Author-Via: SPARQL
Updates-Via: wss://solidos.solidcommunity.net
Content-Type: text/turtle; charset=utf-8
Content-Length: 2
ETag: W/"2-nOO9QiTIwXgNtWtBJezz8kv3SLc"
Date: Tue, 16 Nov 2021 23:45:39 GMT
Connection: keep-alive
Keep-Alive: timeout=5

but the same URI when fetched by mashlib gives 500

HTTP/1.1 500 Internal Server Error
X-Powered-By: solid-server/5.6.16
Access-Control-Allow-Origin: null
Vary: Accept, Authorization, Origin
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate, MS-Author-Via, X-Powered-By
Allow: OPTIONS, HEAD, GET, PATCH, POST, PUT, DELETE
Link: <example.ttl.acl>; rel="acl", <example.ttl.meta>; rel="describedBy", <http://www.w3.org/ns/ldp#Resource>; rel="type"
Content-Type: text/plain; charset=utf-8
Content-Length: 39
ETag: W/"27-AVbkXABETaBBBb89giO49PTSQHQ"
Date: Tue, 16 Nov 2021 23:52:01 GMT
Connection: keep-alive
Keep-Alive: timeout=5

where it looks ss though the server log may look something like


0|solid  | 2021-11-16T23:32:33.227Z solid:server Error page because of: Error: NamedNode IRI "null" must be absolute.
0|solid  |     at new NamedNode (/Users/timbl/src/github.com/solid/node-solid-server/node_modules/rdflib/lib/named-node.js:64:13)
0|solid  |     at Object.namedNode (/Users/timbl/src/github.com/solid/node-solid-server/node_modules/rdflib/lib/factories/canonical-data-factory.js:150:12)
0|solid  |     at new ACLChecker (/Users/timbl/src/github.com/solid/node-solid-server/lib/acl-checker.js:31:74)
0|solid  |     at Function.createFromLDPAndRequest (/Users/timbl/src/github.com/solid/node-solid-server/lib/acl-checker.js:189:12)
0|solid  |     at allowHandler (/Users/timbl/src/github.com/solid/node-solid-server/lib/handlers/allow.js:47:21)
0|solid  | /Users/timbl/src/github.com/solid/node-solid-server/lib/handlers/allow.js:78
0|solid  |     const error = req.authError || await req.acl.getError(userId, mode)
0|solid  |                                                  ^
0|solid  | TypeError: Cannot read properties of undefined (reading 'getError')
0|solid  |     at allowHandler (/Users/timbl/src/github.com/solid/node-solid-server/lib/handlers/allow.js:78:50)

and the httop response body is

NamedNode IRI "null" must be absolute.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện sự khác biệt giữa yêu cầu curl và yêu cầu của ứng dụng web mashlib, sau đó kiểm tra lib/acl-checker.js quanh các dòng 31 và 189 cũng như lib/handlers/allow.js quanh các dòng 47 và 78. Truy tìm lý do đường dẫn webapp tạo ra một NamedNode null và xác minh rằng việc đọc tài liệu công khai không còn trả về lỗi 500.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
authorization, backend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.