René's URL Explorer Experiment


Title: "Principal name not found" error on downloading a file · Issue #68 · a-schild/nextcloud-java-api · GitHub

Open Graph Title: "Principal name not found" error on downloading a file · Issue #68 · a-schild/nextcloud-java-api

X Title: "Principal name not found" error on downloading a file · Issue #68 · a-schild/nextcloud-java-api

Description: I am trying to download a file from Nextcloud (self-hosted, version is 20.0.8.1). The top level view in Nextcloud has a file "Nextcloud.mp4". I have verified that the username and password is correct (got a 401 error when I used the wron...

Open Graph Description: I am trying to download a file from Nextcloud (self-hosted, version is 20.0.8.1). The top level view in Nextcloud has a file "Nextcloud.mp4". I have verified that the username and password is corre...

X Description: I am trying to download a file from Nextcloud (self-hosted, version is 20.0.8.1). The top level view in Nextcloud has a file "Nextcloud.mp4". I have verified that the username and passwor...

Opengraph URL: https://github.com/a-schild/nextcloud-java-api/issues/68

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"Principal name not found\" error on downloading a file","articleBody":"I am trying to download a file from Nextcloud (self-hosted, version is 20.0.8.1). The top level view in Nextcloud has a file \"Nextcloud.mp4\". I have verified that the username and password is correct (got a 401 error when I used the wrong password). I have also tried other methods without success (see the commented lines).\r\n\r\nHere is my code:\r\n```\r\n        try {\r\n            NextcloudConnector nc = new NextcloudConnector(\"nextcloud.example.com\", true, 443, \"my.name@example.com\", \"mypassword\");\r\n            InputStream file = nc.downloadFile(\"/Nextcloud.mp4\");\r\n            //nc.createFolder(\"/Test\");\r\n            //List fileNames = nc.listFolderContent(\"/\");\r\n        } catch (Exception e) {\r\n            System.out.println(e);\r\n        }\r\n```\r\nAnd here is the log file output:\r\n```\r\n09:50:31.858 [main] DEBUG org.apache.http.headers - http-outgoing-1 \u003e\u003e GET /remote.php/dav/files/my.name@example.com/Nextcloud.mp4/ HTTP/1.1\r\n09:50:31.858 [main] DEBUG org.apache.http.headers - http-outgoing-1 \u003e\u003e Host: nextcloud.example.com:443\r\n09:50:31.858 [main] DEBUG org.apache.http.headers - http-outgoing-1 \u003e\u003e Connection: Keep-Alive\r\n09:50:31.858 [main] DEBUG org.apache.http.headers - http-outgoing-1 \u003e\u003e User-Agent: Sardine/5.10\r\n09:50:31.858 [main] DEBUG org.apache.http.headers - http-outgoing-1 \u003e\u003e Accept-Encoding: gzip,deflate\r\n09:50:31.858 [main] DEBUG org.apache.http.headers - http-outgoing-1 \u003e\u003e Authorization: Basic QXJu.....\r\n09:50:31.858 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003e\u003e \"GET /remote.php/dav/files/my.name@example.com/Nextcloud.mp4/ HTTP/1.1[\\r][\\n]\"\r\n09:50:31.858 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003e\u003e \"Host: nextcloud.example.com:443[\\r][\\n]\"\r\n09:50:31.859 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003e\u003e \"Connection: Keep-Alive[\\r][\\n]\"\r\n09:50:31.859 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003e\u003e \"User-Agent: Sardine/5.10[\\r][\\n]\"\r\n09:50:31.859 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003e\u003e \"Accept-Encoding: gzip,deflate[\\r][\\n]\"\r\n09:50:31.859 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003e\u003e \"Authorization: Basic QXJu...[\\r][\\n]\"\r\n09:50:31.859 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003e\u003e \"[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"HTTP/1.1 404 Not Found[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Date: Wed, 06 Oct 2021 07:50:31 GMT[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Server: Apache/2.4.25 (Debian)[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Strict-Transport-Security: max-age=15768000 ; includeSubDomains[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Expires: Thu, 19 Nov 1981 08:52:00 GMT[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Cache-Control: no-store, no-cache, must-revalidate[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Pragma: no-cache[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Content-Security-Policy: default-src 'none';[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Referrer-Policy: no-referrer[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"X-Content-Type-Options: nosniff[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"X-Download-Options: noopen[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"X-Frame-Options: SAMEORIGIN[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"X-Permitted-Cross-Domain-Policies: none[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"X-Robots-Tag: none[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"X-XSS-Protection: 1; mode=block[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Content-Length: 253[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Content-Type: application/xml; charset=utf-8[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Set-Cookie: oc4ld86aguy6=0ca6a655f8a1e9e694af6eaf6b4b2616; path=/; secure; HttpOnly; SameSite=Lax[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Set-Cookie: oc_sessionPassphrase=An5OH5L.....; path=/; secure; HttpOnly; SameSite=Lax[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Set-Cookie: oc4ld8....; path=/; secure; HttpOnly; SameSite=Lax[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Set-Cookie: __Host-nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Set-Cookie: __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict[\\r][\\n]\"\r\n09:50:33.499 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Set-Cookie: oc4ld86a....; path=/; secure; HttpOnly; SameSite=Lax[\\r][\\n]\"\r\n09:50:33.500 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Set-Cookie: cookie_test=test; expires=Wed, 06-Oct-2021 08:50:33 GMT; Max-Age=3600[\\r][\\n]\"\r\n09:50:33.500 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Keep-Alive: timeout=5, max=100[\\r][\\n]\"\r\n09:50:33.500 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"Connection: Keep-Alive[\\r][\\n]\"\r\n09:50:33.500 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"[\\r][\\n]\"\r\n09:50:33.500 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e[\\n]\"\r\n09:50:33.500 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"\u003cd:error xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\"\u003e[\\n]\"\r\n09:50:33.500 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"  \u003cs:exception\u003eSabre\\DAV\\Exception\\NotFound\u003c/s:exception\u003e[\\n]\"\r\n09:50:33.500 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"  \u003cs:message\u003ePrincipal with name my.name@example.com not found\u003c/s:message\u003e[\\n]\"\r\n09:50:33.500 [main] DEBUG org.apache.http.wire - http-outgoing-1 \u003c\u003c \"\u003c/d:error\u003e[\\n]\"\r\n...\r\norg.aarboard.nextcloud.api.exception.NextcloudApiException: com.github.sardine.impl.SardineException: Unexpected response (404 Not Found)\r\n```\r\nThe url \"https://nextcloud.example.com/remote.php/dav/files/my.name@example.com/Nextcloud.mp4/\" results in fact in a 404 error when pasted into the browser. However, when I replace the user name part with the uuid that is listed in the Nextcloud administrator user listing near my full name (\"https://nextcloud.example.com/remote.php/dav/files/BA00370B-3FFZ-4295-8D76-C232DA9B3565/Nextcloud.mp4/\"), I can successfully download the file via the browser.\r\n\r\nSo this shows that the path to the file in the nc.downloadFile call seems to be correct. I also tried replacing my user name by the uuid in the code, but then the login fails.\r\n\r\nPlease advise what to do to successfully download the file by a Java program.","author":{"url":"https://github.com/schirmacher","@type":"Person","name":"schirmacher"},"datePublished":"2021-10-06T09:06:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/68/nextcloud-java-api/issues/68"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3bb6bd7e-b630-a2d1-d4d5-54edb3f07574
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8DCE:3D126:D52F98:1129D3C:6990C1B5
html-safe-nonce9c5c0b905a4c300012db1ff88d4911a38a432ce57450d73c35fa119ad0e15cd8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RENFOjNEMTI2OkQ1MkY5ODoxMTI5RDNDOjY5OTBDMUI1IiwidmlzaXRvcl9pZCI6IjIyNjU1NTk3MjY3MzY1ODkyMzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacda145e29efbe7ef5013f387af5bc94d9677039f7ae787e29d27a7bf4ca7f95d1
hovercard-subject-tagissue:1017850328
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/a-schild/nextcloud-java-api/68/issue_layout
twitter:imagehttps://opengraph.githubassets.com/280f123c880a428a6c180e6e54f3ed57527b87528e36f0fa3fcfeb906c282726/a-schild/nextcloud-java-api/issues/68
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/280f123c880a428a6c180e6e54f3ed57527b87528e36f0fa3fcfeb906c282726/a-schild/nextcloud-java-api/issues/68
og:image:altI am trying to download a file from Nextcloud (self-hosted, version is 20.0.8.1). The top level view in Nextcloud has a file "Nextcloud.mp4". I have verified that the username and password is corre...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameschirmacher
hostnamegithub.com
expected-hostnamegithub.com
None42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b
turbo-cache-controlno-preview
go-importgithub.com/a-schild/nextcloud-java-api git https://github.com/a-schild/nextcloud-java-api.git
octolytics-dimension-user_id1441009
octolytics-dimension-user_logina-schild
octolytics-dimension-repository_id86676911
octolytics-dimension-repository_nwoa-schild/nextcloud-java-api
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id86676911
octolytics-dimension-repository_network_root_nwoa-schild/nextcloud-java-api
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release848bc6032dcc93a9a7301dcc3f379a72ba13b96e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/issues/68#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fa-schild%2Fnextcloud-java-api%2Fissues%2F68
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fa-schild%2Fnextcloud-java-api%2Fissues%2F68
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=a-schild%2Fnextcloud-java-api
Reloadhttps://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/issues/68
Reloadhttps://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/issues/68
Reloadhttps://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/issues/68
a-schild https://patch-diff.githubusercontent.com/a-schild
nextcloud-java-apihttps://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fa-schild%2Fnextcloud-java-api
Fork 52 https://patch-diff.githubusercontent.com/login?return_to=%2Fa-schild%2Fnextcloud-java-api
Star 77 https://patch-diff.githubusercontent.com/login?return_to=%2Fa-schild%2Fnextcloud-java-api
Code https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api
Issues 8 https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/issues
Pull requests 0 https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/pulls
Actions https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/actions
Projects 0 https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/projects
Security 0 https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/security
Insights https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/pulse
Code https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api
Issues https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/issues
Pull requests https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/pulls
Actions https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/actions
Projects https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/projects
Security https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/security
Insights https://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/a-schild/nextcloud-java-api/issues/68
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/a-schild/nextcloud-java-api/issues/68
"Principal name not found" error on downloading a filehttps://patch-diff.githubusercontent.com/a-schild/nextcloud-java-api/issues/68#top
bughttps://github.com/a-schild/nextcloud-java-api/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/schirmacher
https://github.com/schirmacher
schirmacherhttps://github.com/schirmacher
on Oct 6, 2021https://github.com/a-schild/nextcloud-java-api/issues/68#issue-1017850328
https://nextcloud.example.com/remote.php/dav/files/my.name@example.com/Nextcloud.mp4/https://nextcloud.example.com/remote.php/dav/files/my.name@example.com/Nextcloud.mp4/
https://nextcloud.example.com/remote.php/dav/files/BA00370B-3FFZ-4295-8D76-C232DA9B3565/Nextcloud.mp4/https://nextcloud.example.com/remote.php/dav/files/BA00370B-3FFZ-4295-8D76-C232DA9B3565/Nextcloud.mp4/
bughttps://github.com/a-schild/nextcloud-java-api/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.