Error: This parser can only read from strings or streams

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): AIO 4.0.1 with NC 25.0.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04.1
Apache or nginx version (eg, Apache 2.4.25): AIO version
PHP version (eg, 7.4): AIO version

The issue you are facing:
Davx5 and Nextcloud throw errors when updating a contact on my Android phone. I noticed this for the first time after Nextcloud AIO updated to 25.0.2. The logs below are from the last time I edited, this morning. I noticed the same error yesterday evening.

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. Edit a contact on my Android phone
  2. DAVx5 handels the update and throws an error
  3. Nextcloud shows the errors below

The output of your Nextcloud log in Admin > Logging:

[PHP] Fout: Error: Attempt to read property "uri" on array at /var/www/html/custom_apps/maps/lib/Listener/CardUpdatedListener.php#53 at <<closure>>

 0. /var/www/html/custom_apps/maps/lib/Listener/CardUpdatedListener.php line 53
    OC\Log\ErrorHandler::onError(2, "Attempt to read ... y", "/var/www/html/c ... p", 53)
 1. /var/www/html/lib/private/EventDispatcher/ServiceEventListener.php line 87
    OCA\Maps\Listener\CardUpdatedListener->handle(OCA\DAV\Events\CardUpdatedEvent {})
 2. /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke(OCA\DAV\Events\CardUpdatedEvent {}, "OCA\\DAV\\Events\\CardUpdatedEvent", Symfony\Componen ... {})
 3. /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners([Closure {},Clos ... }], "OCA\\DAV\\Events\\CardUpdatedEvent", OCA\DAV\Events\CardUpdatedEvent {})
 4. /var/www/html/lib/private/EventDispatcher/EventDispatcher.php line 88
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch(OCA\DAV\Events\CardUpdatedEvent {}, "OCA\\DAV\\Events\\CardUpdatedEvent")
 5. /var/www/html/lib/private/EventDispatcher/EventDispatcher.php line 100
    OC\EventDispatcher\EventDispatcher->dispatch("OCA\\DAV\\Events\\CardUpdatedEvent", OCA\DAV\Events\CardUpdatedEvent {})
 6. /var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php line 732
    OC\EventDispatcher\EventDispatcher->dispatchTyped(OCA\DAV\Events\CardUpdatedEvent {})
 7. /var/www/html/3rdparty/sabre/dav/lib/CardDAV/Card.php line 94
    OCA\DAV\CardDAV\CardDavBackend->updateCard("*** sensitive parameters replaced ***")
 8. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1137
    Sabre\CardDAV\Card->put("*** sensitive parameters replaced ***")
 9. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 492
    Sabre\DAV\Server->updateFile("*** sensitive parameters replaced ***")
10. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
11. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit("method:PUT", [Sabre\HTTP\Requ ... }])
12. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
13. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
14. /var/www/html/apps/dav/lib/Server.php line 360
    Sabre\DAV\Server->exec()
15. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
16. /var/www/html/remote.php line 171
    require_once("/var/www/html/a ... p")

PUT /remote.php/dav/addressbooks/users/joho/contacts/7844003f-ddd2-438c-96cb-f1c07fabd527.vcf
from 84.107.118.207 by joho at 2022-12-31T13:09:22+00:00
[webdav] Fout: InvalidArgumentException: This parser can only read from strings or streams. at <<closure>>

 0. /var/www/html/3rdparty/sabre/vobject/lib/Parser/MimeDir.php line 83
    Sabre\VObject\Parser\MimeDir->setInput(["*** sensitive  ... "])
 1. /var/www/html/3rdparty/sabre/vobject/lib/Reader.php line 47
    Sabre\VObject\Parser\MimeDir->parse(["*** sensitive  ... "], 0)
 2. /var/www/html/custom_apps/maps/lib/Service/AddressService.php line 223
    Sabre\VObject\Reader::read(["*** sensitive  ... "])
 3. /var/www/html/custom_apps/maps/lib/Listener/CardUpdatedListener.php line 54
    OCA\Maps\Service\AddressService->scheduleVCardForLookup(["*** sensitive  ... "], "*** sensitive parameters replaced ***")
 4. /var/www/html/lib/private/EventDispatcher/ServiceEventListener.php line 87
    OCA\Maps\Listener\CardUpdatedListener->handle(OCA\DAV\Events\CardUpdatedEvent {})
 5. /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke(OCA\DAV\Events\CardUpdatedEvent {}, "OCA\\DAV\\Events\\CardUpdatedEvent", Symfony\Componen ... {})
 6. /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners([Closure {},Clos ... }], "OCA\\DAV\\Events\\CardUpdatedEvent", OCA\DAV\Events\CardUpdatedEvent {})
 7. /var/www/html/lib/private/EventDispatcher/EventDispatcher.php line 88
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch(OCA\DAV\Events\CardUpdatedEvent {}, "OCA\\DAV\\Events\\CardUpdatedEvent")
 8. /var/www/html/lib/private/EventDispatcher/EventDispatcher.php line 100
    OC\EventDispatcher\EventDispatcher->dispatch("OCA\\DAV\\Events\\CardUpdatedEvent", OCA\DAV\Events\CardUpdatedEvent {})
 9. /var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php line 732
    OC\EventDispatcher\EventDispatcher->dispatchTyped(OCA\DAV\Events\CardUpdatedEvent {})
10. /var/www/html/3rdparty/sabre/dav/lib/CardDAV/Card.php line 94
    OCA\DAV\CardDAV\CardDavBackend->updateCard("*** sensitive parameters replaced ***")
11. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1137
    Sabre\CardDAV\Card->put("*** sensitive parameters replaced ***")
12. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 492
    Sabre\DAV\Server->updateFile("*** sensitive parameters replaced ***")
13. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
14. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit("method:PUT", [Sabre\HTTP\Requ ... }])
15. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
16. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
17. /var/www/html/apps/dav/lib/Server.php line 360
    Sabre\DAV\Server->exec()
18. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
19. /var/www/html/remote.php line 171
    require_once("/var/www/html/a ... p")

PUT /remote.php/dav/addressbooks/users/joho/contacts/7844003f-ddd2-438c-96cb-f1c07fabd527.vcf
from 84.107.118.207 by joho at 2022-12-31T13:09:22+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):
link to config.php on pastebin.com

The output of your Apache/nginx/system log in /var/log/____:

No errors shown in log of nextcloud-aio-apache container

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

1 Like

Hi, you could try to disable the maps app and check if that resolves the issue!

1 Like

Disabling the Maps app seems to have solved the error. Edits of two contacts did not result in the error. So it looks like a bug in the Maps app?

Yes indeed.

How to proceed with that? Should I file a bug report somewhere?

Best would be to create one here GitHub - nextcloud/maps: 🌍🌏🌎 The whole world fits inside your cloud! if there is not an open one with the same problem already.

It appears there was already an issue submitted and a solution committed (yesterday :grinning:). So it will be solved in an upcoming update.

1 Like