tchapi / davis

🗓 A simple, fully translatable admin interface for sabre/dav based on Symfony 5 and Bootstrap 5, initially inspired by Baïkal.

Home Page:https://github.com/users/tchapi/projects/1/views/1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Geo-Request not Working

spammads opened this issue · comments

Thanks for the great app.
This is probably a backend-issue.
If i put in a suggested location in the apple-calendar-app, the request to the backend fails (Screenshot 1).
Furthermore, the whole calendar falls out of sync (Screenshot 2).
If I don't accept the suggested location and just put in a plain-text-location everything is fine.
Probably the same for Baikal?!
Nevertheless. Just wanted to have this mentioned somewhere.
prod.log complains the following (I use a Postgres-DB).
Tried to redact sensitive information:

[2023-10-31T17:30:30.008069+01:00] app.ERROR: [500]: PDOException - SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type bytea CONTEXT: unnamed portal parameter $3 = '...' [{"file":"/var/www/davis/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php","line":548,"function":"execute","class":"PDOStatement","type":"->","args":[[3,"E0A449AB-4C25-41A4-B727-1ED7CDEA3744.ics","BEGIN:VCALENDAR\r\nCALSCALE:GREGORIAN\r\nPRODID:-//Apple Inc.//macOS 13.3.1//EN\r\nVERSION:2.0\r\nBEGIN:VTIMEZONE\r\nTZID:NOT/RELEVANT\r\nBEGIN:DAYLIGHT\r\nDTSTART:123\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nTZNAME:CEST\r\nTZOFFSETFROM:+0000\r\nTZOFFSETTO:+0000\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nDTSTART:19961027T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nTZNAME:CET\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nCREATED:20231031T162956Z\r\nDTEND;TZID=NOT/RELEVANT:20231104T100000\r\nDTSTAMP:20231031T163029Z\r\nDTSTART;TZID=NOT/RELEVANT:20231104T090000\r\nLAST-MODIFIED:20231031T162956Z\r\nLOCATION:Lustspielhaus\\nOccamstraße 8\\, 80802 Munich\\, Germany\r\nSEQUENCE:0\r\nSUMMARY:Test\r\nTRANSP:OPAQUE\r\nUID:E0A449AB-4C25-41A4-B727-1ED7CDEA3744\r\nX-APPLE-STRUCTURED-LOCATION;VALUE=URI;X-APPLE-MAPKIT-HANDLE=CAESogIIrk0Q\r\n 7eeF+6rx2dEvGhIJWI0xRrcUSEARxLw31OotJ0AidwoHR2VybWFueRICREUaB0JhdmFyaWEq\r\n Bk11bmljaDIGTXVuaWNoOgU4MDgwMkISU2Nod2FiaW5nLUZyZWltYW5uUgxPY2NhbXN0cmHD\r\n n2VaAThiDk9jY2Ftc3RyYcOfZSA4igESTcO8bmNobmVyIEZyZWloZWl0Kg1MdXN0c3BpZWxo\r\n YXVzMg5PY2NhbXN0cmHDn2UgODIMODA4MDIgTXVuaWNoMgdHZXJtYW55OC9QAVpMCiQI7eeF\r\n +6rx2dEvEhIJDeznA7gUSEARekhCbPotJ0AYrk2QAwGiHyMI7eeF+6rx2dEvGhcKDUx1c3Rz\r\n cGllbGhhdXMQACoCZW5AAA==;X-APPLE-RADIUS=141.1750335693359;X-APPLE-REFERE\r\n NCEFRAME=0;X-TITLE=\"Lustspielhaus\\nOccamstraße 8, 80802 Munich, Germany\"\r\n :geo:48.161843,11.589682\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n",1698769830,"17b5ae0dea08166825f3c864146eff93",1420,"VEVENT",1699084800,1699088400,"E0A449AB-4C25-41A4-B727-1ED7CDEA3744"]]},

Sreenshot 1:
sc1

Screenshot 2:
sc2

Hi and thanks for reporting

Can you tell me on which Davis version you are + the version of your Postgres?

Sure. Davis is on 4.1.0 and Postgres on 15.2.

Interesting. Would you mind trying this (not merged yet) PR, by any chance: #111 ? It changes the underlying storage type which is directly linked to the error you're having AFAIK

It's only a migration to pass, in fact. It should be straightforward but please make a backup of your full database before doing so in case you're dealing with a production instance 🙏🏼

(Related Issue: #110)

Thanks for the fix. Can you provide a tag for the PR? I'm running davis in Kubernetes and need a tag to deploy it on my cluster.

I've built the edge variant with the fix included, does that help?

{
    "containerimage.descriptor": {
      "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
      "digest": "sha256:3165cc5ac51d7a11ed2c65f75d1f07fe025237d4d54901d1fb897904c2d6d917",
      "size": 685
    },
    "containerimage.digest": "sha256:3165cc5ac51d7a11ed2c65f75d1f07fe025237d4d54901d1fb897904c2d6d917",
    "image.name": "ghcr.io/tchapi/davis:edge"
  }

You will need to run the DB migrations.

Thanks for adding the migrations to the edge image. It helped.
I was able to perform the 3 migrations successfully.
Now the Geo-Reqest (and probably some others) are successful.
Tested it extensively.
Thanks again for the great app and the assist.
BR!

My pleasure @spammads, thanks for taking the time to test

I will "officially" release the fix in the next version of Davis, I hope in the next weeks