App crashes when creating share-link

Open Beginner friendly
#3,469 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
android, java
Domain
mobile

Research direction

The crash passes through DateExtensions.kt at toExpirationDateLong and CreateShareResponseExtensions.kt at toOCShare, then reaches NoteShareActivity.java while creating a public share link. Start by reading those stacktrace locations and checking how the response date 2026-12-10 23:59:59 is parsed. Done when creating a share link no longer crashes for this response and the expiration date is handled successfully.

Written by the indexing model from the issue text.

Description

0. Needs triage bug
This issue respects the following points:
Describe the bug
  1. Click on the share icon next to a note
  2. Click the plus icon next to "Share link"
  3. The app crashes
Expected behavior

I dont expect the app to crash, but allow me to create a share-link instead.

Notes Android version

35.0.0

Notes server version

6.1.1

Nextcloud Android version

35.0.0

Nextcloud version

35.0.3

Device

Google Pixel 10 Pro XL

Android Version

17

App Store
  • Google Play Store
  • F-Droid
  • Huawei App Gallery
Stacktrace
App Version: 35.0.0
App Version Code: 350000090
App Flavor: play

Files App Version Code: 350010090 (PROD)

---

OS Version: 6.12.81-android16-6-g4a1a020d156e-ab16388316-4k(16581829)
OS API Level: 37
Device: mustang
Manufacturer: Google
Model (and Product): Pixel 10 Pro XL (mustang)

---

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:585)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:906)
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:575)
	... 1 more
Caused by: java.text.ParseException: Unparseable date: "2026-12-10 23:59:59"
	at java.text.DateFormat.parse(DateFormat.java:400)
	at it.niedermann.owncloud.notes.shared.util.extensions.DateExtensionsKt.toExpirationDateLong(DateExtensions.kt:22)
	at it.niedermann.owncloud.notes.share.model.CreateShareResponseExtensionsKt.toOCShare(CreateShareResponseExtensions.kt:48)
	at it.niedermann.owncloud.notes.share.NoteShareActivity.lambda$createPublicShareLink$8(NoteShareActivity.java:417)
	at it.niedermann.owncloud.notes.share.NoteShareActivity.$r8$lambda$U-RJDka-Da36UgQywALdXhtR03w(NoteShareActivity.java:0)
	at it.niedermann.owncloud.notes.share.NoteShareActivity$$ExternalSyntheticLambda4.run(D8$$SyntheticClass:0)
	at android.os.Handler.handleCallback(Handler.java:1080)
	at android.os.Handler.dispatchMessageImpl(Handler.java:135)
	at android.os.Handler.dispatchMessage(Handler.java:126)
	at android.os.Looper.loopOnce(Looper.java:285)
	at android.os.Looper.loop(Looper.java:390)
	at android.app.ActivityThread.main(ActivityThread.java:9884)
	... 3 more

Dominant language
Java
Stars
1.1k
Forks
178
Avg merge
10h 48m
Merged PRs (30d)
41

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextcloud/notes-android

All issues in nextcloud/notes-android

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.