InvalidUriException Invalid, or could not parse URI

Error appears after unsuccessful attempt of uploading video files via iOS app.

Nextcloud version: 29.0.0
Operating system and version: Ubuntu 22.04
Apache version: 2.4.52
PHP version: 8.3.6

Level Error
Application webdav
Messagem InvalidUriException
Invalid, or could not parse URI

raw entry

{"reqId":"DkDesVwCUrivEWQwUz5O","level":3,"time":"2024-05-08T17:29:12+00:00","remoteAddr":"189.120.78.124","user":"***","app":"webdav","method":"PUT","url":"/remote.php/dav/uploads/***/0A7B4168-50AD-41BF-966C-6C0DB3B51873/1","message":"Invalid, or could not parse URI","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/5.2.7","version":"29.0.0.19","exception":{"Exception":"Sabre\\Uri\\InvalidUriException","Message":"Invalid, or could not parse URI","Code":0,"Trace":[{"file":"/var/www/***/3rdparty/sabre/uri/lib/functions.php","line":120,"function":"Sabre\\Uri\\parse"},{"file":"/var/www/***/3rdparty/sabre/dav/lib/DAV/Server.php","line":565,"function":"Sabre\\Uri\\normalize"},{"file":"/var/www/***/apps/dav/lib/Connector/Sabre/QuotaPlugin.php","line":100,"function":"calculateUri","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/***/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeCreateFile","class":"OCA\\DAV\\Connector\\Sabre\\QuotaPlugin","type":"->"},{"file":"/var/www/***/3rdparty/sabre/dav/lib/DAV/Server.php","line":1094,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/***/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/***/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/***/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/***/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/***/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/***/apps/dav/lib/Server.php","line":374,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/d***/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/***m/remote.php","line":172,"args":["/var/www/***/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/***m/3rdparty/sabre/uri/lib/functions.php","Line":206,"message":"Invalid, or could not parse URI","exception":[],"CustomMessage":"Invalid, or could not parse URI"},"id":"663bbaf4e1564"}

formatted entry

[webdav] Error: Invalid, or could not parse URI
	PUT /remote.php/dav/uploads/***/0A7B4168-50AD-41BF-966C-6C0DB3B51873/1
	from *** by *** at 8 de mai. de 2024, 14:29:12

If you can downgrade to PHP 8.2, that cloud be a solution.

Well, I tried everything I could and the problem persists. :persevere:

I downgraded to PHP 8.2 and didn’t work. I managed to do a clean install because I thought I must have messed up some files settings at some time in the past, but also didn’t work.

This happens when a user try to upload a file via iOS app. I also tried cleaning the app cache, restarting the app, logging out and logging in, deleting and reinstalling the app. Nothing worked, it is driving me crazy. This started to happen after the 29 update.

Error

There is some information available about Webdav and Sabredav (which is used by Nextcloud. Maybe you are getting in a good direction to find a solution

https://docs.nextcloud.com/server/latest/admin_manual/issues/general_troubleshooting.html#troubleshooting-webdav

I’ll take some time to read it more carefully, thank you!

1 Like

I tried this, but now I’m getting another error:

  • Your web server is not properly set up to resolve .well-known URLs, failed on: /.well-known/webfinger

Hi.
I’m getting same error “Error: Invalid, or could not parse URI”

Did you manage to solve it?
Thanks!

Unfortunately, no. :confused:

I managed to check that the only videos that fail are the heaviest ones. If I try to upload, for example, a 5 secs video, it uploads with no problem. However, if the video is longer (and heavier) the upload fails.

Exactly. I can confirm this too.